From d75389a66b12181a0954519cc6d9fbac63da2586 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期六, 15 三月 2025 22:57:11 +0800
Subject: [PATCH] 物料:根据id获取数据,数据中 增加 默认仓库

---
 WebAPI/Controllers/WebAPIController.cs |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index a826123..98bd60c 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -37,7 +37,7 @@
         string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
 
         /// <summary>
-        /// 閫佽揣鍗曡〃澶翠俊鎭�
+        /// 鑾峰彇鍗曟嵁鍙蜂笌鍗曟嵁鍐呯爜
         /// </summary>
         /// <param name="sMsg"></param>
         /// <returns></returns>
@@ -352,6 +352,16 @@
                     objjson.code = "0";
                     objjson.count = 0;
                     objjson.Message = "瀵嗙爜閿欒锛�";
+                    objjson.data = null;
+                    return objjson;
+                }
+                //鍒ゆ柇鐢ㄦ埛鏁版槸鍚﹀ぇ浜庡鎴疯处鍙锋暟
+                DataSet ds1 = oCN.RunProcReturn("Exec h_p_Xt_BaseInfo ", "h_p_Xt_BaseInfo");               
+                if (DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = ds1.Tables[0].Rows[0]["HBackRemark"].ToString();
                     objjson.data = null;
                     return objjson;
                 }
@@ -16856,12 +16866,16 @@
         /// <returns></returns>
         [Route("Web/GetCheckItemID")]
         [HttpGet]
-        public object GetCheckItemID(string HName,string HProName)
+        public object GetCheckItemID(string HName,string HProName,string HSourceID)
         {         
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where 鐗╂枡鍚嶇О='"+HName+ "' and 宸ュ簭鍚嶇О='" + HProName + "'   order by 鏃ユ湡 desc ", "h_v_Gy_QCCheckProjectList_Main");
+                ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where 鐗╂枡鍚嶇О='"+HName+ "' and 宸ュ簭鍚嶇О='" + HProName + "' and HSourceID='" + HSourceID + "'   order by 鏃ユ湡 desc ", "h_v_Gy_QCCheckProjectList_Main");
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    ds = oCN.RunProcReturn("select  top 1 * from h_v_Gy_QCCheckProjectList_Main where 鐗╂枡鍚嶇О='" + HName + "' and 宸ュ簭鍚嶇О='" + HProName + "'  order by 鏃ユ湡 desc ", "h_v_Gy_QCCheckProjectList_Main");
+                }
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
                     objjson.code = "0";
@@ -18019,7 +18033,7 @@
                     if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0))
                     {
                         sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID  ";
-                        ds = oCn.RunProcReturn(sql, "Gy_Menu");
+                        ds = oCn.RunProcReturn(sql, "Gy_Menu_1");
                     }                 
                 }
 

--
Gitblit v1.9.1