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 |   61 +++++++++++++++++++++++++++++-
 1 files changed, 58 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 5129042..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)
@@ -1120,11 +1133,11 @@
         [HttpGet]
         public object DeltetGy_Material(string HItemID, string user)
         {
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            oCN.BeginTran();//寮�濮嬩簨鍔�
             DataSet ds;
             try
             {
-                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-
                 if (user == "10000")//api鍚屾鏂瑰紡
                 {
                     oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID);
@@ -1152,7 +1165,7 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
-                oCN.BeginTran();//寮�濮嬩簨鍔�
+                
                 ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
@@ -1386,7 +1399,49 @@
         }
         #endregion
 
+        #region 鑾峰彇褰撳墠鍏徃鍚�
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Xt_getInfo/getCompanyName")]
+        [HttpGet]
+        public object getCompanyName()
+        {
+            try
+            {
+                string sErr = "";
+                if(oSystemParameter.ShowBill(ref sErr))
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = oSystemParameter.omodel.WMS_CampanyName;
+                    objJsonResult.data = oSystemParameter.omodel.WMS_CampanyName;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "褰撳墠鍏徃鍚嶈幏鍙栧け璐ワ紒" ;
+                    objJsonResult.data = null;
+                }
 
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
 
 
         /// <summary>

--
Gitblit v1.9.1