From c2e615f525c8ae97861295a253e8be0644624bb1 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 17 一月 2024 10:28:00 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs index 9597e8d..658339a 100644 --- a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs +++ b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs @@ -37,6 +37,21 @@ { try { + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipRepairWorkBill_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; + } + //========================================================= + // oCn.BeginTran(); //鏇存柊涓昏〃 @@ -116,6 +131,25 @@ // return false; // } //} + + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipRepairWorkBill_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; @@ -134,6 +168,23 @@ { //寰楀埌mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); + + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipRepairWorkBill_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; + } + //========================================================= + + //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCn.BeginTran(); @@ -200,6 +251,23 @@ // } //} // + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipRepairWorkBill_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