From 579d2b489f9565f6e506ddbef634d65aa20dc27e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 12 六月 2025 14:03:28 +0800
Subject: [PATCH] 解决合并冲突
---
DAL/计划管理/ClsGy_MaterialTechParamBillMain.cs | 82 +++++++++++++++++++++++++++++++++++++----
1 files changed, 74 insertions(+), 8 deletions(-)
diff --git "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs" "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
index e8c399c..f4e6bc0 100644
--- "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
+++ "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
@@ -38,6 +38,22 @@
try
{
oCn.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
+
//鏇存柊涓昏〃
string mainSql = "update Gy_MaterialTechParamBillMain set " +
" HBillNo = '" + omodel.HBillNo +
@@ -70,7 +86,7 @@
{
string subSql = "insert into Gy_MaterialTechParamBillSub" +
"(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
- ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " +
+ ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd,HIsRequired) " +
" values(" +
"" + omodel.HInterID.ToString() +
"," + oSub.HEntryID.ToString() +
@@ -80,9 +96,9 @@
"','" + oSub.HSourceBillType +
"','" + oSub.HTechParamID +
"','" + oSub.HTechParamUnitID +
- "'," + oSub.HStd +
- "," + oSub.HMax +
- ",'" + oSub.HMin +
+ "','" + oSub.HStd +
+ "','" + oSub.HMax +
+ "','" + oSub.HMin +
"','" + oSub.HDataForm +
"','" + oSub.HDataUnit +
"','" + oSub.HDataTimes +
@@ -90,9 +106,26 @@
"','" + oSub.HSNO +
"','" + oSub.HStdNextTimes +
"','" + oSub.HTechParamIDStd +
+ "','" + Convert.ToString(oSub.HIsRequired ? 1 : 0) +
"')";
oCn.RunProc(subSql);
}
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Gy_MaterialTechParamBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
oCn.Commit();
@@ -116,6 +149,21 @@
oCn.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ ds = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_MaterialTechParamBill_BeforeSaveCtrl");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
//妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
while (true)
@@ -163,7 +211,7 @@
{
string subSql = "insert into Gy_MaterialTechParamBillSub" +
"(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
- ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd) " +
+ ",HTechParamID,HTechParamUnitID,HStd,HMax,HMin,HDataForm,HDataUnit,HDataTimes,HTechParamClassID,HSNO,HStdNextTimes,HTechParamIDStd,HIsRequired) " +
" values(" +
"" + omodel.HInterID.ToString() +
"," + oSub.HEntryID.ToString() +
@@ -173,9 +221,9 @@
"','" + oSub.HSourceBillType +
"','" + oSub.HTechParamID +
"','" + oSub.HTechParamUnitID +
- "'," + oSub.HStd +
- "," + oSub.HMax +
- ",'" + oSub.HMin +
+ "','" + oSub.HStd +
+ "','" + oSub.HMax +
+ "','" + oSub.HMin +
"','" + oSub.HDataForm +
"','" + oSub.HDataUnit +
"','" + oSub.HDataTimes +
@@ -183,9 +231,27 @@
"','" + oSub.HSNO +
"','" + oSub.HStdNextTimes +
"','" + oSub.HTechParamIDStd +
+ "','" + Convert.ToString(oSub.HIsRequired ? 1 : 0)+
"')";
oCn.RunProc(subSql);
}
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Gy_MaterialTechParamBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Gy_MaterialTechParamBill_AfterSaveCtrl");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
--
Gitblit v1.9.1