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/BaseSet/Gy_MaterialController.cs |   47 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 4d4d311..161a2af 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -570,6 +570,7 @@
                     oItem.HShortNumber = sShortNumber;//鐭唬鐮�
                     oItem.HEndFlag = true;//鏈骇鏍囧織
                     oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+                    oItem.HMakeEmp = msg2;
                     oBill.oModel = oItem;
                 }
                 //淇濆瓨
@@ -582,6 +583,18 @@
                 }
                 else
                 {
+                    //宸插鏍镐笉鍏佽淇敼
+                    DataSet dss;
+                    dss = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + oBill.oModel.HItemID, "Gy_Material");
+                    //鍒ゆ柇鏄惁鍙紪杈�
+                    if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                     bResult = oBill.ModifyByID(oBill.oModel.HItemID);
                 }
                 if (bResult)
@@ -1747,7 +1760,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄愶紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1758,7 +1771,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍒犻櫎鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
+                    objJsonResult.Message = "[3899-1-001]鍒犻櫎鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1768,9 +1781,9 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+                        objJsonResult.Message = "[0000-1-007]" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                         objJsonResult.data = null;
-                        return objJsonResult;                       
+                        return objJsonResult;
                     }
                 }
                 //Int64 lngBillKey = 0;
@@ -1779,7 +1792,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                    objJsonResult.Message = "[0000-1-009]鍗曟嵁ID涓虹┖锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1824,7 +1837,7 @@
                     oCN.Commit();
                     objJsonResult.code = "1";
                     objJsonResult.count = 1;
-                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1832,7 +1845,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                    objJsonResult.Message = "[0000-1-045]鍗曟嵁鏈壘鍒�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1842,7 +1855,7 @@
                 oCN.RollBack();
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = e.Message;
+                objJsonResult.Message = "[0000-1-007]" + e.Message;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1869,7 +1882,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "浣滃簾澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.Message = "[0000-1-063]浣滃簾澶辫触锛佹棤鏉冮檺锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1878,7 +1891,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.Message = "[0000-1-009]HInterID灏忎簬0锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1906,7 +1919,7 @@
 
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
-                        objJsonResult.Message = "浣滃簾鎴愬姛";
+                        objJsonResult.Message = "[0000-1-040]浣滃簾鎴愬姛";
                         objJsonResult.data = null;
 
                         oCN.Commit();
@@ -1915,7 +1928,7 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.Message = "[0000-1-042]浣滃簾澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
                         objJsonResult.data = null;
 
                         oCN.RollBack();
@@ -1938,7 +1951,7 @@
 
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "鍙嶄綔搴熷け璐ワ紝鍘熷洜锛氬弽浣滃簾鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
+                        objJsonResult.Message = "[0000-1-042]鍙嶄綔搴熷け璐ワ紝鍘熷洜锛氬弽浣滃簾鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
@@ -1950,7 +1963,7 @@
 
                             objJsonResult.code = "1";
                             objJsonResult.count = 1;
-                            objJsonResult.Message = "鍙嶄綔搴熷け璐ワ紝鍘熷洜锛�" + DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]);
+                            objJsonResult.Message = "[0000-1-042]鍙嶄綔搴熷け璐ワ紝鍘熷洜锛�" + DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]);
                             objJsonResult.data = null;
                             return objJsonResult;
                         }
@@ -1972,7 +1985,7 @@
 
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
-                        objJsonResult.Message = "鍙嶄綔搴熸垚鍔�";
+                        objJsonResult.Message = "[0000-1-043]鍙嶄綔搴熸垚鍔�";
                         objJsonResult.data = null;
                         oCN.Commit();
                         return objJsonResult;
@@ -1981,7 +1994,7 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.Message = "[0000-1-042]鍙嶄綔搴熷け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
                         objJsonResult.data = null;
                         oCN.RollBack();
                         return objJsonResult;
@@ -1994,7 +2007,7 @@
                 oCN.RollBack();
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "浣滃簾澶辫触鎴栬�呭弽浣滃簾澶辫触锛�" + e.ToString();
+                objJsonResult.Message = "[0000-1-044]浣滃簾澶辫触鎴栬�呭弽浣滃簾澶辫触锛�" + e.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }

--
Gitblit v1.9.1