From 22d714a3febae6e27513f924301e8c4635e648da Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期四, 14 九月 2023 13:58:21 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index 364928c..17c2d00 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -132,16 +132,32 @@ string user = sArray[3].ToString();//鐢ㄦ埛鍚� string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О user_LongShan = sArray[3].ToString();//鐢ㄦ埛鍚� + string HBillSubType = sArray[4].ToString();//鍗曟嵁瀛愮被鍨� try { - //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄� - if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) + if (HBillSubType == "3301") { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳潈闄愮紪杈�!"; - objJsonResult.data = null; - return objJsonResult; + //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "宸ヨ壓璺嚎鏃犳潈闄愮紪杈�!"; + objJsonResult.data = null; + return objJsonResult; + } + + } + else { + //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Sub_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀛愬伐鑹鸿矾绾挎棤鏉冮檺缂栬緫!"; + objJsonResult.data = null; + return objJsonResult; + } } msg2 = "[" + msg2.ToString() + "]"; @@ -241,7 +257,7 @@ ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); - if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板 + if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板 { //涓昏〃 oCN.RunProc("Insert Into Gy_RoutingBillMain " + @@ -251,7 +267,7 @@ ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + - " values('" + BillType + "','"+(OperationType==4?"SUB":"") +"'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + + " values('" + BillType + "','"+ HBillSubType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID + "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) + "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty + @@ -310,7 +326,7 @@ oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); } } - else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4)) + else if (IsProNo == 1 && (OperationType == 1)) { ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); -- Gitblit v1.9.1