From 37da233a7ed8212982acdad3d6dbd09338678b4b Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 09 四月 2025 13:55:40 +0800
Subject: [PATCH] 设备节拍基础资料

---
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs |   82 +++++++++++++++++++++++++++++++----------
 1 files changed, 62 insertions(+), 20 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 15da306..e89d391 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1120,11 +1120,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 +1152,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 +1386,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>
@@ -1705,7 +1747,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.Message = "[0000-1-058]鏃犲垹闄ゆ潈闄愶紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1716,7 +1758,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍒犻櫎鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
+                    objJsonResult.Message = "[3899-1-001]鍒犻櫎鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1726,9 +1768,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;
@@ -1737,7 +1779,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                    objJsonResult.Message = "[0000-1-009]鍗曟嵁ID涓虹┖锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1782,7 +1824,7 @@
                     oCN.Commit();
                     objJsonResult.code = "1";
                     objJsonResult.count = 1;
-                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.Message = "[0000-1-008]鍒犻櫎鎴愬姛";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1790,7 +1832,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                    objJsonResult.Message = "[0000-1-045]鍗曟嵁鏈壘鍒�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1800,7 +1842,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;
             }
@@ -1827,7 +1869,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "浣滃簾澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.Message = "[0000-1-063]浣滃簾澶辫触锛佹棤鏉冮檺锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1836,7 +1878,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.Message = "[0000-1-009]HInterID灏忎簬0锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -1864,7 +1906,7 @@
 
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
-                        objJsonResult.Message = "浣滃簾鎴愬姛";
+                        objJsonResult.Message = "[0000-1-040]浣滃簾鎴愬姛";
                         objJsonResult.data = null;
 
                         oCN.Commit();
@@ -1873,7 +1915,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();
@@ -1896,7 +1938,7 @@
 
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "鍙嶄綔搴熷け璐ワ紝鍘熷洜锛氬弽浣滃簾鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
+                        objJsonResult.Message = "[0000-1-042]鍙嶄綔搴熷け璐ワ紝鍘熷洜锛氬弽浣滃簾鏉$爜鍓嶅垽鏂彂鐢熼敊璇紒";
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
@@ -1908,7 +1950,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;
                         }
@@ -1930,7 +1972,7 @@
 
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
-                        objJsonResult.Message = "鍙嶄綔搴熸垚鍔�";
+                        objJsonResult.Message = "[0000-1-043]鍙嶄綔搴熸垚鍔�";
                         objJsonResult.data = null;
                         oCN.Commit();
                         return objJsonResult;
@@ -1939,7 +1981,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;
@@ -1952,7 +1994,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