From 5466e02176f2acf2f08ef1c16315c3185bae903f Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期一, 19 五月 2025 15:53:34 +0800 Subject: [PATCH] 异常反馈单,快捷开工接口调整 --- WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 259 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 152 insertions(+), 107 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs index c1d5dbb..699b9b2 100644 --- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs +++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs @@ -15,6 +15,7 @@ { private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); DataSet ds; #region 宸ュ簭鍗曞搧涓嶈壇閲囬泦 鐢ㄦ埛鏌ヨ鍏宠仈瀛楁 @@ -29,7 +30,7 @@ { objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-038]Sucess锛�"; objJsonResult.data = new DataTable(); return objJsonResult; } @@ -38,7 +39,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -46,7 +47,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -170,6 +171,7 @@ long HMainSourceEntryID = mainList[0].HICMOEntryID; string HMainSourceBillNo = mainList[0].HICMOBillNo; + //鍒ゆ柇鐢熶骇璐ㄩ噺姹囨姤鍗曟槸鍚﹀瓨鍦� ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain WITH(NOLOCK) where HInterID=" + HInterID + " and HBillNo='" + HBillNo + "'", "Sc_QualityReportBillMain"); if (ds.Tables[0].Rows.Count != 0) { objJsonResult.code = "0"; @@ -306,9 +308,24 @@ //淇敼鏉$爜琛ㄧ殑鐘舵�� oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'"); + LogService.Write("绫诲瀷:" + oSub.HBadTypeID + ",鍒跺崟浜�:" + oSub.HMaker + ",鍒跺崟鏃ユ湡:" + oSub.HMakeDate); //淇敼鍑虹珯鍗曠殑 涓嶈壇 鎶ュ簾鏁伴噺 - if (HResult == "涓嶈壇") { - oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); + if (HResult == "涓嶈壇") + { + LogService.Write("绫诲瀷:" + oSub.HBadTypeID); + //宸ュ簾 + if (oSub.HBadTypeID == 3) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Work+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); + }//鏂欏簾 + else if (oSub.HBadTypeID == 4) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HWasterQty_Mater+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); + }//杩斿伐 + else if (oSub.HBadTypeID == 6) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount+=1,HBackWorkQty+=1 where HProcExchBillNo='" + oSub.HProcExchBillNo + "' and HProcID=" + oSub.HProcID + " and HInterID=" + linterid); + } } else if (HResult == "鎶ュ簾") { @@ -335,7 +352,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -346,16 +363,27 @@ HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString(); } - //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸� - ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp"); - if (ds.Tables[0].Rows.Count == 0) + + + //瀹㈡埛鍒跺畾 + string sErr = ""; + if (oSystemParameter.ShowBill(ref sErr)) { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!"; - objJsonResult.data = null; - return objJsonResult; + if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") + { + //鍒ゆ柇褰撳墠娴佽浆鍗℃槸鍚︽槸寮�宸� + ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0'", "Sc_ICMOBillStatus_Tmp"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "[3791-2-018]鍗″彿:" + HBarCode + ",娴佽浆鍗℃湭寮�宸�!"; + objJsonResult.data = null; + return objJsonResult; + } + } } + ds = oCN.RunProcReturn(@"exec h_p_Gy_BarCodeBillBomList '" + HBarCode + "'," + HProcID, "h_p_Gy_BarCodeBillBomList"); if (ds.Tables[0].Rows.Count == 0) @@ -366,7 +394,7 @@ { objJsonResult.code = "2"; objJsonResult.count = 2; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = dataSet.Tables[0]; return objJsonResult; } @@ -374,7 +402,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!"; + objJsonResult.Message = "[3791-2-019]閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!"; objJsonResult.data = null; return objJsonResult; } @@ -383,7 +411,7 @@ { objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; } @@ -394,7 +422,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -423,7 +451,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚瀛樻潈闄�!"; + objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -436,7 +464,7 @@ if (tempList.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犻厤浠舵暟鎹�!"; + objJsonResult.Message = "[3791-2-026]鏃犻厤浠舵暟鎹�!"; objJsonResult.data = null; return objJsonResult; } @@ -467,7 +495,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨鎴愬姛!"; + objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!"; objJsonResult.data = null; return objJsonResult; @@ -477,7 +505,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-051]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -503,7 +531,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚瀛樻潈闄�!"; + objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -517,13 +545,13 @@ List<Model.ClsSc_AssemblyBillSub> sub = new List<Model.ClsSc_AssemblyBillSub>(); sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr); - + //鏉$爜涓婇亾宸ュ簭鏄惁杩囩珯 ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ユ棤鏁版嵁!"; + objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!"; objJsonResult.data = null; return objJsonResult; } @@ -531,11 +559,12 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�"; + objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�"; objJsonResult.data = null; return objJsonResult; } + //鍒ゆ柇鏉$爜鏄惁宸茬粡鍑虹珯 ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 浜у搧鏉$爜='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList"); if (ds.Tables[0].Rows.Count > 0) @@ -543,7 +572,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜:" + omodel.HBarCode_P + ",宸插瓨鍦�!"; + objJsonResult.Message = "[0000-2-039]鏉$爜:" + omodel.HBarCode_P + ",宸插瓨鍦�!"; objJsonResult.data = null; return objJsonResult; } @@ -562,7 +591,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "閰嶄欢浠g爜:" + HMaterNamePJ + ",鏁伴噺涓�0!"; + objJsonResult.Message = "[3791-2-020]閰嶄欢浠g爜:" + HMaterNamePJ + ",鏁伴噺涓�0!"; objJsonResult.data = null; return objJsonResult; } @@ -678,11 +707,13 @@ int HTemporaryAreaID = 0;//鏆傛斁鍖� int HShiftsID = 0; + //鑾峰彇褰撳墠鐝 DataSet set = oCN.RunProcReturn("exec h_p_Gy_GetWorkShiftInfo " + HDeptID + "," + HCenterID, "h_p_Gy_GetWorkShiftInfo"); if (set.Tables[0].Rows.Count > 0) { HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); } + //鍒ゆ柇褰撳ぉ褰撳墠鐨勬祦杞崱鏄惁鏈夊嚭绔欏崟 ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain a WITH(NOLOCK) left join Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain"); if (ds.Tables[0].Rows.Count == 0) @@ -735,7 +766,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!"; + objJsonResult.Message = "[3791-2-028]鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!"; objJsonResult.data = null; return objJsonResult; } @@ -744,7 +775,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨鎴愬姛!"; + objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!"; objJsonResult.data = null; return objJsonResult; @@ -754,7 +785,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-051]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -811,7 +842,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; + objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; objJsonResult.data = null; return objJsonResult; } @@ -843,7 +874,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; + objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; objJsonResult.data = null; return objJsonResult; } @@ -858,7 +889,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜鏍煎紡涓嶆纭�!"; + objJsonResult.Message = "[0000-2-036]鏉$爜鏍煎紡涓嶆纭�!"; objJsonResult.data = null; return objJsonResult; } @@ -887,7 +918,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; + objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; objJsonResult.data = null; return objJsonResult; } @@ -907,7 +938,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; + objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!"; objJsonResult.data = null; return objJsonResult; } @@ -917,7 +948,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�"; + objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�"; objJsonResult.data = null; return objJsonResult; } @@ -925,7 +956,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -934,7 +965,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -957,7 +988,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�"; + objJsonResult.Message = "[0000-2-019]鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�"; return objJsonResult; } @@ -1028,7 +1059,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = null; return objJsonResult; } @@ -1037,7 +1068,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1056,7 +1087,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1066,7 +1097,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "SN鐮佹煡鏃犳暟鎹紒"; + objJsonResult.Message = "[3791-2-023]SN鐮佹煡鏃犳暟鎹紒"; objJsonResult.data = null; return objJsonResult; } @@ -1075,7 +1106,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜鐨勭姸鎬佷负:"+ ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�"; + objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐨勭姸鎬佷负:" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1086,7 +1117,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�"; + objJsonResult.Message = "[3791-2-024]閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1094,14 +1125,14 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.isStrNull(dataSet.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.Message = "[0000-1-010]" + DBUtility.ClsPub.isStrNull(dataSet.Tables[0].Rows[0]["HBackRemark"]); objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -1110,7 +1141,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1129,7 +1160,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1137,13 +1168,14 @@ ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl"); string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString(); + //鏌ヨ娴佽浆鍗℃墍鏈夊伐搴忎俊鎭� ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBillHICOMProcessExchange WITH(NOLOCK) where 鏉$爜='" + HBarCode + "' ", "h_v_Gy_BarCodeBillHICOMProcessExchange"); if (ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�"; + objJsonResult.Message = "[0000-1-045]鏉$爜鏌ユ棤鏁版嵁锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1159,7 +1191,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!"; + objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!"; objJsonResult.data = null; return objJsonResult; } @@ -1167,14 +1199,14 @@ if (ds.Tables[0].Rows[0]["HStatus"].ToString() != "姝e父") { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜鐘舵�佷负"+ ds.Tables[0].Rows[0]["HStatus"].ToString() + "!"; + objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -1183,7 +1215,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1202,7 +1234,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1211,7 +1243,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds; return objJsonResult; } @@ -1220,7 +1252,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1239,7 +1271,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1248,7 +1280,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -1257,7 +1289,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1276,7 +1308,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!"; + objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1287,7 +1319,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ユ棤鏁版嵁锛�"; + objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�"; objJsonResult.data = null; } string HProcExchInterID = ds.Tables[0].Rows[0]["HProcExchInterID"].ToString(); @@ -1320,7 +1352,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1329,7 +1361,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1348,7 +1380,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!"; + objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1361,7 +1393,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ユ棤鏁版嵁锛�"; + objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�"; objJsonResult.data = null; } @@ -1390,7 +1422,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1399,7 +1431,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1418,7 +1450,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1432,7 +1464,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�"; + objJsonResult.Message = "[0000-2-020]鏉$爜鏌ユ棤鏁版嵁锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1449,7 +1481,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!"; + objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!"; objJsonResult.data = null; return objJsonResult; } @@ -1458,7 +1490,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!"; + objJsonResult.Message = "[0000-2-037]褰撳墠鏉$爜鐘舵�佷负" + ds.Tables[0].Rows[0]["HStatus"].ToString() + "!"; objJsonResult.data = null; return objJsonResult; } @@ -1466,7 +1498,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = ""; + objJsonResult.Message = "[0000-1-037]"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -1475,7 +1507,7 @@ objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1542,7 +1574,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1562,7 +1594,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -1571,7 +1603,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1598,7 +1630,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犱繚瀛樻潈闄�!"; + objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1611,7 +1643,7 @@ Model.Sc_AssemblyBill_BindSourceTemp temp = new Model.Sc_AssemblyBill_BindSourceTemp(); temp = JsonConvert.DeserializeObject<Model.Sc_AssemblyBill_BindSourceTemp>(sSubStr); - + //宸ュ簭杩斾慨璁板綍鍗� 閰嶄欢琛� ds = oCN.RunProcReturn("select * from Sc_SourceLineRepairBillSub_Mater where HInterID=" + model.HInterID+ " order by HEntryID desc", "Sc_SourceLineRepairBillSub_Mater"); oCN.RunProc($@"insert into Sc_SourceLineRepairBillSub_Mater @@ -1625,7 +1657,7 @@ oCN.RunProc("update Sc_AssemblyBillSub set HBarCode='" + temp.HBarCode + "' where HInterID=" + temp.HInterID + " and HEntryID=" + temp.HEntryID); //oCN.RunProc("exec h_p_AssemblyBill_Temp '" + temp.HProcExchBillNo + "'," + model.HProcess + "," + temp.HMaterID + ",'" + temp.HBatchNo + "'"); } - else if (HResult == "NG"|| HResult == "OK") { + else if (HResult == "NG"|| HResult == "OK") { Model.ClsSc_SourceLineRepairBillMain model = new Model.ClsSc_SourceLineRepairBillMain(); model = JsonConvert.DeserializeObject<Model.ClsSc_SourceLineRepairBillMain>(sMainStr); @@ -1674,15 +1706,27 @@ if (dataSet.Tables[0].Rows.Count > 0) { string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString(); - - oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1 where HInterID='" + HOutInterID + "'"); + //鏂帿灏旂殑鎯呭喌 鍒� 宸ュ簾鏂欏簾 杩斿伐 + //宸ュ簾 + if (subLsit[0].HBadTypeID == 3) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Work-=1 where HInterID='" + HOutInterID + "'"); + }//鏂欏簾 + else if (subLsit[0].HBadTypeID == 4) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HWasterQty_Mater-=1 where HInterID='" + HOutInterID + "'"); + }//杩斿伐 + else if (subLsit[0].HBadTypeID == 6) + { + oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1,HBackWorkQty-=1 where HInterID='" + HOutInterID + "'"); + } } else { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触,褰撳墠娴佽浆鍗″綋鍓嶅伐搴忕殑鍑虹珯鍗曟病鏈変笉鑹暟閲�!"; + objJsonResult.Message = "[3748-2-005]淇濆瓨澶辫触,褰撳墠娴佽浆鍗″綋鍓嶅伐搴忕殑鍑虹珯鍗曟病鏈変笉鑹暟閲�!"; objJsonResult.data = null; return objJsonResult; } @@ -1692,7 +1736,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触,鏃犵粨鏋滐紒"; + objJsonResult.Message = "[0000-1-051]淇濆瓨澶辫触,鏃犵粨鏋滐紒"; objJsonResult.data = null; return objJsonResult; } @@ -1702,7 +1746,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-050]Sucess锛�"; objJsonResult.data = null; return objJsonResult; } @@ -1711,7 +1755,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-051]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1730,7 +1774,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!"; + objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1740,7 +1784,7 @@ if (ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏌ユ棤鏁版嵁锛�"; + objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�"; objJsonResult.data = null; } @@ -1779,7 +1823,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-010]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1851,7 +1895,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } @@ -1861,7 +1905,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } @@ -1869,7 +1913,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1939,7 +1983,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -1949,7 +1993,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -1979,7 +2023,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -1989,7 +2033,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -2019,7 +2063,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -2029,7 +2073,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -2059,7 +2103,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -2068,7 +2112,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -2098,7 +2142,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -2108,7 +2152,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -2125,6 +2169,7 @@ List<object> columnNameList = new List<object>(); + //鏌ヨ閰嶄欢娓呭崟淇℃伅 string sql = @"exec h_p_GZ_BarCodeBillList '" + HMaterNumber + "','" + HBatchNo + "','" + sWhere + "'"; ds = oCN.RunProcReturn(sql, "h_p_GZ_BarCodeBillList"); @@ -2138,7 +2183,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -2148,7 +2193,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -2178,7 +2223,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "[0000-1-037]Sucess锛�"; objJsonResult.data = ds.Tables[0]; objJsonResult.list = columnNameList; return objJsonResult; @@ -2188,7 +2233,7 @@ oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } -- Gitblit v1.9.1