From 5898d7f62ec4b29f313a018c7526ce100e9d30a6 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 09 四月 2025 15:02:05 +0800
Subject: [PATCH] 加日志

---
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs |  247 ++++++++++++++++++++++++++++--------------------
 1 files changed, 143 insertions(+), 104 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index c1d5dbb..f92698d 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;
             }
@@ -306,9 +307,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 +351,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -346,16 +362,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 +393,7 @@
                     {
                         objJsonResult.code = "2";
                         objJsonResult.count = 2;
-                        objJsonResult.Message = "";
+                        objJsonResult.Message = "[0000-1-037]";
                         objJsonResult.data = dataSet.Tables[0];
                         return objJsonResult;
                     }
@@ -374,7 +401,7 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!";
+                        objJsonResult.Message = "[3791-2-019]閰嶄欢娓呭崟鏌ユ棤鏁版嵁锛�,鍙兘鏄綋鍓嶇敤鎴峰伐搴忎笉姝g‘鎴栬�呮祦杞崱杈撳叆閿欒!";
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
@@ -383,7 +410,7 @@
                 {
                     objJsonResult.code = "1";
                     objJsonResult.count = 1;
-                    objJsonResult.Message = "";
+                    objJsonResult.Message = "[0000-1-037]";
                     objJsonResult.data = ds.Tables[0];
                 }
 
@@ -394,7 +421,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 +450,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+                    objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -436,7 +463,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 +494,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "淇濆瓨鎴愬姛!";
+                objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!";
                 objJsonResult.data = null;
                 return objJsonResult;
 
@@ -477,7 +504,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 +530,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+                    objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -523,7 +550,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏌ユ棤鏁版嵁!";
+                    objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -531,7 +558,7 @@
                 {
                     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;
                 }
@@ -543,7 +570,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 +589,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;
                         }
@@ -735,7 +762,7 @@
                     oCN.RollBack();
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!";
+                    objJsonResult.Message = "[3791-2-028]鍑虹珯鏁伴噺瓒呰繃娴佽浆鍗℃暟閲�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -744,7 +771,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "淇濆瓨鎴愬姛!";
+                objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛!";
                 objJsonResult.data = null;
                 return objJsonResult;
 
@@ -754,7 +781,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 +838,7 @@
                             {
                                 objJsonResult.code = "0";
                                 objJsonResult.count = 0;
-                                objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                                objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
                                 objJsonResult.data = null;
                                 return objJsonResult;
                             }
@@ -843,7 +870,7 @@
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
-                            objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                            objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
                             objJsonResult.data = null;
                             return objJsonResult;
                         }
@@ -858,7 +885,7 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "鏉$爜鏍煎紡涓嶆纭�!";
+                        objJsonResult.Message = "[0000-2-036]鏉$爜鏍煎紡涓嶆纭�!";
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
@@ -887,7 +914,7 @@
                             {
                                 objJsonResult.code = "0";
                                 objJsonResult.count = 0;
-                                objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                                objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
                                 objJsonResult.data = null;
                                 return objJsonResult;
                             }
@@ -907,7 +934,7 @@
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
-                            objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                            objJsonResult.Message = "[3791-2-016]鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
                             objJsonResult.data = null;
                             return objJsonResult;
                         }
@@ -917,7 +944,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 +952,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "";
+                objJsonResult.Message = "[0000-1-037]";
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
             }
@@ -934,7 +961,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 +984,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�";
+                    objJsonResult.Message = "[0000-2-019]鏉″舰鐮佷笉鑳戒负绌猴紝涓嶈兘鐢熸垚鏉$爜锛�";
                     return objJsonResult;
                 }
 
@@ -1028,7 +1055,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "";
+                objJsonResult.Message = "[0000-1-037]";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1037,7 +1064,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 +1083,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1066,7 +1093,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "SN鐮佹煡鏃犳暟鎹紒";
+                    objJsonResult.Message = "[3791-2-023]SN鐮佹煡鏃犳暟鎹紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1075,7 +1102,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 +1113,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�";
+                    objJsonResult.Message = "[3791-2-024]閰嶄欢鏉$爜鍒ゆ柇澶辫触锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1094,14 +1121,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 +1137,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 +1156,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1143,7 +1170,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�";
+                    objJsonResult.Message = "[0000-1-045]鏉$爜鏌ユ棤鏁版嵁锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1159,7 +1186,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
+                    objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1167,14 +1194,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 +1210,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 +1229,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1211,7 +1238,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "";
+                objJsonResult.Message = "[0000-1-037]";
                 objJsonResult.data = ds;
                 return objJsonResult;
             }
@@ -1220,7 +1247,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 +1266,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1248,7 +1275,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "";
+                objJsonResult.Message = "[0000-1-037]";
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
             }
@@ -1257,7 +1284,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 +1303,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+                    objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1287,7 +1314,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 +1347,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.Message = "[0000-1-037]Sucess锛�";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1329,7 +1356,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 +1375,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+                    objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1361,7 +1388,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+                    objJsonResult.Message = "[0000-1-045]鏌ユ棤鏁版嵁锛�";
                     objJsonResult.data = null;
                 }
 
@@ -1390,7 +1417,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.Message = "[0000-1-037]Sucess锛�";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1399,7 +1426,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 +1445,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1432,7 +1459,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏉$爜鏌ユ棤鏁版嵁锛�";
+                    objJsonResult.Message = "[0000-2-020]鏉$爜鏌ユ棤鏁版嵁锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1449,7 +1476,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
+                    objJsonResult.Message = "[3791-2-017]褰撳墠鏉$爜涓庡綋鍓嶅伐搴忎笉鍖归厤!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1458,7 +1485,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 +1493,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "";
+                objJsonResult.Message = "[0000-1-037]";
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
             }
@@ -1475,7 +1502,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 +1569,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1562,7 +1589,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 +1598,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 +1625,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犱繚瀛樻潈闄�!";
+                    objJsonResult.Message = "[0000-2-038]鏃犱繚瀛樻潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1674,15 +1701,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 +1731,7 @@
                     oCN.RollBack();
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "淇濆瓨澶辫触,鏃犵粨鏋滐紒";
+                    objJsonResult.Message = "[0000-1-051]淇濆瓨澶辫触,鏃犵粨鏋滐紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1702,7 +1741,7 @@
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.Message = "[0000-1-050]Sucess锛�";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1711,7 +1750,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 +1769,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+                    objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1740,7 +1779,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 +1818,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 +1890,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.Message = "[0000-1-068]鏃犳煡璇㈡潈闄�!";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1861,7 +1900,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 +1908,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 +1978,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 +1988,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 +2018,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 +2028,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 +2058,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 +2068,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 +2098,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 +2107,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 +2137,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 +2147,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;
             }
@@ -2138,7 +2177,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 +2187,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 +2217,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 +2227,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