From 17400e7f9e0ab6ce4027ba8941baf48f01fdadbf Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期二, 12 三月 2024 09:23:25 +0800 Subject: [PATCH] 资产类别,资产位置 --- WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 90 ++++++++++++++++++++++---------------------- 1 files changed, 45 insertions(+), 45 deletions(-) diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" index 440c080..8f85031 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" @@ -487,32 +487,32 @@ string HMaker = user;//鍒跺崟浜� string HIsStockQty = mainList[0].HIsStockQty; string HRemark3 = mainList[0].HRemark3; - + + //淇濆瓨鍓嶆帶鍒�========================================= + ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_BeforeSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_BeforeSaveCtrl_New"); + + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ICMOBillList"); if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板 { - //淇濆瓨鍓嶆帶鍒�========================================= - ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_BeforeSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_BeforeSaveCtrl_New"); - - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; - objJsonResult.data = null; - return objJsonResult; - } - if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); - objJsonResult.data = null; - return objJsonResult; - } - //========================================================= //涓昏〃 oCN.RunProc(@"Insert Into Sc_ICMOBillMain (HBillType,HBillStatus,HInterID,HBillNo,HDate,HPRDORGID @@ -549,6 +549,9 @@ ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID); + //鐢熶骇璁㈠崟鍒犻櫎鍥炲~閿�鍞鍗曞叧鑱旀暟閲� + oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID); + //鍒犻櫎瀛愯〃 oCN.RunProc("delete from Sc_ICMOBillSub where HInterID='" + HInterID + "' and HEntryID='" + HEntryID + "'"); @@ -567,13 +570,30 @@ } else if (OperationType == 3) { - //鐢熶骇璁㈠崟鍒犻櫎鍥炲~閿�鍞鍗曞叧鑱旀暟閲� - oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID); //鐢熶骇璁㈠崟鏂板鍥炲~閿�鍞鍗曞叧鑱旀暟閲� oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Add " + HInterID); } + //淇濆瓨鍚庢帶鍒�========================================= + ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_AfterSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_AfterSaveCtrl_New"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= if (objJsonResult.code == "0") { @@ -659,26 +679,6 @@ ,{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',0,0 ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}','{oSub.HOrderPickRemark}','{oSub.HCusMaterNumber}')"); - //淇濆瓨鍚庢帶鍒�========================================= - ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_AfterSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_AfterSaveCtrl_New"); - - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒"; - objJsonResult.data = null; - return objJsonResult; - } - if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); - objJsonResult.data = null; - return objJsonResult; - } - //========================================================= objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1044,8 +1044,6 @@ //================================================================================== - - oCN.BeginTran();//寮�濮嬩簨鍔� ds = oCN.RunProcReturn("select * from Sc_ICMOBillMain where HInterID=" + HInterID, "Sc_ICMOBillMain"); if (ds == null || ds.Tables[0].Rows.Count == 0) { @@ -1114,6 +1112,7 @@ return objJsonResult; ; } + oCN.BeginTran();//寮�濮嬩簨鍔� //鐢熶骇璁㈠崟鍒犻櫎鍥炲~閿�鍞鍗曞叧鑱旀暟閲� oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID); @@ -1160,6 +1159,7 @@ } catch (Exception e) { + oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); -- Gitblit v1.9.1