From b620afd2d990df8b9957a668374b421c989d7de5 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 30 八月 2023 09:21:17 +0800 Subject: [PATCH] 客诉处理单 及列表 --- WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 96 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 70 insertions(+), 26 deletions(-) diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index f5c918e..f99321a 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -121,12 +121,14 @@ public json AddBillMain(string msg1) { + string sErrMsg = ""; + oSystemParameter.ShowBill(ref sErrMsg); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); //int hentryid = int.Parse(sArray[2].ToString());//瀛愯〃鐨勯『搴廼d - int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗 + int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗 4娣诲姞瀛愬伐鑹鸿矾绾� string user = sArray[3].ToString();//鐢ㄦ埛鍚� string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О user_LongShan = sArray[3].ToString();//鐢ㄦ埛鍚� @@ -180,6 +182,50 @@ int IsProNo = mainList[0].IsProNo;//鏄惁杞伐搴� HName_LongShan = mainList[0].HName;//宸ヨ壓璺嚎鍚嶇О + + if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒") + { + if (HPicNumVer == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍥惧彿鐗堟湰涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HPicNumAssemble == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎬昏鍥惧彿涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HMaterTexture == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉愯川涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HProductNum == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎴愬搧缂栧彿涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HVerNum == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐗堟湰涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + } if (OperationType == 2) { ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); @@ -195,16 +241,17 @@ ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); - if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板 + if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板 { //涓昏〃 oCN.RunProc("Insert Into Gy_RoutingBillMain " + - "(HBillType,HInterID,HBillNo,HDate" + + "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + - ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + + ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + + " values('" + BillType + "','"+(OperationType==4?"SUB":"") +"'," + 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 + @@ -244,29 +291,9 @@ return objJsonResult; } - string sErrMsg = ""; - if (oSystemParameter.ShowBill(ref sErrMsg)) + if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�") { - if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�") - { - if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) - { - ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); - - if (ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏈缃浆宸ュ簭!"; - objJsonResult.data = null; - return objJsonResult; - } - - //璁剧疆杞伐搴� - oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); - } - } - else if (IsProNo == 1 && OperationType == 1) + if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) { ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); @@ -283,6 +310,23 @@ oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); } } + else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4)) + { + ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); + + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈缃浆宸ュ簭!"; + objJsonResult.data = null; + return objJsonResult; + } + + //璁剧疆杞伐搴� + oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); + } + //鏄惁鍕鹃�夐粯璁ゅ伐鑹鸿矾绾� -- Gitblit v1.9.1