From cd4e5d51b7825f28bf44c37bd75bdb14ec2feb8c Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期二, 02 四月 2024 15:41:01 +0800
Subject: [PATCH] 生产汇报单反写生产订单关联汇报数量,设备点检规程单修改连接检验项目表
---
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 2
WebAPI/DLL/ClsSc_ICMOReportBill.cs | 56 +++++++++++++--------------
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 4 +-
3 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
index 5b456da..4144b8a 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
@@ -176,7 +176,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
string sql1 = @"select * from h_v_Sb_EquipDotCheckRuleList a
- left join Gy_QCCheckItem b on a.鐐规椤圭洰ID =b.HItemID where 1 = 1 ";
+ left join Gy_DotCheck b on a.鐐规椤圭洰ID =b.HItemID where 1 = 1 ";
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList");
objJsonResult.code = "0";
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 53cfdf3..398d627 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -120,7 +120,7 @@
HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅 HUnitName,HSourceID,鐢熶骇璧勬簮浠g爜 HSourceCode,鐢熶骇璧勬簮 HSourceName,
HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞 HRemark,
HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID,
- HICMOBillNo as HSourceBillNo,3710 as HSourceBillType
+ HICMOBillNo as HSourceBillNo,3710 as HSourceBillType,涓嶈壇鏁伴噺 HBadQty
FROM h_v_IF_ICMOReportBillList_Edit"), "h_v_IF_ICMOReportBillList_Edit");
objJsonResult.code = "0";
@@ -137,7 +137,7 @@
HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞
HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo,
HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID,
- HICMOBillNo as HSourceBillNo,3710 as HSourceBillType
+ HICMOBillNo as HSourceBillNo,3710 as HSourceBillType,涓嶈壇鏁伴噺 HBadQty
FROM h_v_IF_ICMOReportBillList_Edit where 1 = 1 ");
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit");
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index 345fc26..f426fbe 100644
--- a/WebAPI/DLL/ClsSc_ICMOReportBill.cs
+++ b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
@@ -71,7 +71,7 @@
//鑾峰彇鏄庣粏琛屼慨鏀瑰墠鏁伴噺
Int64 HBackQty = 0;
- Ds = oCn.RunProcReturn("select isnull(sum(isnull(HQty,0)),0) + isnull(sum(isnull(HWasterQty,0)),0) as HBackQty from Sc_ICMOReportBillSub where HInterID = " + lngBillKey, "Sc_ICMOReportBillSub");
+ Ds = oCn.RunProcReturn("select isnull(sum(isnull(HQty,0)),0) + isnull(sum(isnull(HBadQty,0)),0) as HBackQty from Sc_ICMOReportBillSub where HInterID = " + lngBillKey, "Sc_ICMOReportBillSub");
if (Ds != null && Ds.Tables[0].Rows.Count > 0)
{
HBackQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBackQty"]);
@@ -92,7 +92,7 @@
"HCloseMan,HCloseType,HRemark," +
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
- ",HICMOInterID,HICMOBillNo,HBarCode,HICMOEntryID" +
+ ",HICMOInterID,HICMOBillNo,HBarCode,HICMOEntryID,HBadQty" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber +"'"+
"," + oSub.HQty.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HTimes.ToString() + "," + oSub.HSourceID.ToString() +
@@ -100,20 +100,19 @@
",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
"," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
"," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
- "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "'," + oSub.HICMOEntryID +
- ") ");
-
- //鍙嶅啓浜ч噺姹囨姤鍗曪紝璐ㄩ噺姹囨姤鍗曞叧鑱斿瓧娈�,鐢熶骇璁㈠崟鍏宠仈鏁伴噺
- Ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_ReverseWriteQty " + omodel.HInterID + "," + oSub.HEntryID + ",'" + omodel.HBillNo + "'," +
- DetailColl[0].HICMOInterID + "," + DetailColl[0].HICMOEntryID + ",'" + DetailColl[0].HICMOBillNo + "','" + DetailColl[0].HSourceID + "','" +
- "Edit" + "'," + HBackQty + "," + DetailColl[0].HICMOTempID
- , "h_p_Sc_ICMOReportBill_ReverseWriteQty");
- if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "1")
- {
- sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
- oCn.RollBack();
- return false;
- }
+ "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "'," + oSub.HICMOEntryID + "," + oSub.HBadQty +
+ ") ");
+ }
+ //鍙嶅啓浜ч噺姹囨姤鍗曪紝璐ㄩ噺姹囨姤鍗曞叧鑱斿瓧娈�,鐢熶骇璁㈠崟鍏宠仈鏁伴噺
+ Ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_ReverseWriteQty " + omodel.HInterID + "," + oSub.HEntryID + ",'" + omodel.HBillNo + "'," +
+ DetailColl[0].HICMOInterID + "," + DetailColl[0].HICMOEntryID + ",'" + DetailColl[0].HICMOBillNo + "','" + DetailColl[0].HSourceID + "','" +
+ "Edit" + "'," + HBackQty + "," + DetailColl[0].HICMOTempID
+ , "h_p_Sc_ICMOReportBill_ReverseWriteQty");
+ if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "1")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
}
if (omodel.HCheckType == "鍚堟牸")
{
@@ -257,19 +256,18 @@
// " HRelationBillNo ='" + omodel.HBillNo +
// "', HRelationInterID='" + omodel.HInterID +
// "' from Sc_ICMOBillQualityStatus_Tmp a where a.HICMOBillNo='" + DetailColl[0].HICMOBillNo + "' and a.HSourceID='" + DetailColl[0].HSourceID + "' and HICMOInterID='" + DetailColl[0].HICMOInterID + "' and a.HICMOEntryID='" + DetailColl[0].HICMOEntryID + "' and HRelationInterID='0'");
- //oCn.RunProc(sql2);
-
- //鍙嶅啓浜ч噺姹囨姤鍗曪紝璐ㄩ噺姹囨姤鍗曞叧鑱斿瓧娈�,鐢熶骇璁㈠崟鍏宠仈鏁伴噺
- ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_ReverseWriteQty " + omodel.HInterID + "," + oSub.HEntryID + ",'" + omodel.HBillNo + "'," +
- DetailColl[0].HICMOInterID + "," + DetailColl[0].HICMOEntryID + ",'" + DetailColl[0].HICMOBillNo + "','" + DetailColl[0].HSourceID + "','" +
- "Add" + "'," + 0 + "," + DetailColl[0].HICMOTempID
- , "h_p_Sc_ICMOReportBill_ReverseWriteQty");
- if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
- {
- sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
- oCn.RollBack();
- return false;
- }
+ //oCn.RunProc(sql2);
+ }
+ //鍙嶅啓浜ч噺姹囨姤鍗曪紝璐ㄩ噺姹囨姤鍗曞叧鑱斿瓧娈�,鐢熶骇璁㈠崟鍏宠仈鏁伴噺
+ ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_ReverseWriteQty " + omodel.HInterID + "," + oSub.HEntryID + ",'" + omodel.HBillNo + "'," +
+ DetailColl[0].HICMOInterID + "," + DetailColl[0].HICMOEntryID + ",'" + DetailColl[0].HICMOBillNo + "','" + DetailColl[0].HSourceID + "','" +
+ "Add" + "'," + 0 + "," + DetailColl[0].HICMOTempID
+ , "h_p_Sc_ICMOReportBill_ReverseWriteQty");
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
}
//
//foreach (Model.ClsSc_ICMOReportBillSub oSub in DetailColl)
--
Gitblit v1.9.1