From 1e9a12d7b0bbc7dc9c125a9767727d7246411966 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期二, 18 三月 2025 16:59:03 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 106 insertions(+), 2 deletions(-)

diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index f65d4a8..1d7cd1a 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -1775,6 +1775,7 @@
                 string fProWorkShopId = omdelMian.HWorkShopID.ToString();
                 var fPrdOrgId = omdelMian.HProdORGID;
                 string sqlName = "";//AIS20210811135644
+                string WMS_CampanyName = "";    //瀹㈡埛鍚嶇О
                 //瀹㈡埛鍒跺畾
                 string sErr = "";
                 if (oSystemParameter.ShowBill(ref sErr))
@@ -1794,6 +1795,7 @@
                     else if (oSystemParameter.omodel.WMS_CampanyName == "瀹濆伐")
                     {
                         sqlName = "AIS20250102123554";
+                        WMS_CampanyName = "瀹濆伐";
                     }
                     else
                     {
@@ -1801,8 +1803,11 @@
                     }
                 }
 
-
-                if (HTLType == "缂烘枡")
+                if (WMS_CampanyName == "瀹濆伐")
+                {
+                    objJsonResult = (json)JIT_MOMaterLack(fProWorkShopId, fPrdOrgId, user, sqlName);
+                }
+                else if (HTLType == "缂烘枡")
                 {
                     objJsonResult = (json)JIT_QL(fProWorkShopId, fPrdOrgId, user, sqlName);
                 }
@@ -2733,6 +2738,51 @@
                 return objJsonResult;
             }
         }
+
+        /// <summary>
+        /// 閫氳繃娆犳枡琛�   绠楁彁鏂� 瀹濆伐
+        /// </summary>
+        /// <returns></returns>
+        public object JIT_MOMaterLack(string HWorkShopID, int? HProdORGID, string user, string sqlName)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("exec h_p_JIT_PODemandPlanBill_MOMaterLack " + HWorkShopID.ToString() + ",'" + user + "'," + HProdORGID.ToString(), "h_p_JIT_PODemandPlanBill_MOMaterLack");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎻愭枡杩愮畻鍙戠敓閿欒锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);    //杩愮畻鎴愬姛
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎻愭枡杩愮畻澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
         #endregion
 
         #region 鐢熶骇鏃ヨ鍒掑钩鍙� 閿佸畾
@@ -3322,5 +3372,59 @@
         }
         #endregion
 
+        #region 宸ュ簭璐熻嵎鍒嗘瀽姹囨�绘姤琛� 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰闃舵鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("JIT_DayPlanPlatFormBill/JIT_FuHeFenXiReport")]
+        [HttpGet]
+        public object JIT_FuHeFenXiReport(string sWhere, string user)
+        {
+            try
+            {
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("JIT_FuHeFenXiReport", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> columnNameList = new List<object>();
+                string sql = "exec h_p_JIT_FuHeFenXiReport   '" + sWhere + "','" + user + "'";
+
+                ds = oCN.RunProcReturn(sql, "h_p_JIT_FuHeFenXiReport");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1