From 8e8c42556ebcaca3e14ab6307a51fdcab5fc0092 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 22 一月 2024 16:30:44 +0800
Subject: [PATCH] 1
---
WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs b/WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs
index 1878702..b288f48 100644
--- a/WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs
+++ b/WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs
@@ -81,8 +81,20 @@
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
//若MAINDI重复则重新获取
oCn.BeginTran();
- //主表
+ DataSet ds;
+ //保存前控制=========================================
+ ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl");
+
+ 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("Insert Into Sc_ICMOBillWorkQtyStatus_Tmp " +
"(HInterID,HBillType,HSourceID,HReportType,HPieceQty" +
",HMaterID,HGroupID,HWorkManID,HWorkReportDate,HDate" +
@@ -103,7 +115,7 @@
oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty+" + sumqty + " where HICMOBillNo='" + omodel.HICMOBillNo + "' and HSourceID='" + omodel.HSourceID + "' and HICMOInterID='" + omodel.HICMOInterID + "' and HICMOEntryID='" + omodel.HICMOEntryID + "' and HInterID="+ omodel.HSourceInterID.ToString());
//再次验证 保存是否 合理
- DataSet ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl");
+ ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
sReturn = "无验证数据!";
@@ -116,6 +128,18 @@
oCn.RollBack();
return false;
}
+
+ //保存后控制=========================================
+ ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl");
+
+ 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;
+ }
+ //=========================================================
+
sReturn = omodel.HInterID.ToString();
oCn.Commit();
--
Gitblit v1.9.1