From d762be6327c842ec49f3fb15999be3b1f129c003 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 19 三月 2025 14:41:08 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 63 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 63d1641..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 鐢熶骇鏃ヨ鍒掑钩鍙� 閿佸畾
@@ -3334,6 +3384,17 @@
         {
             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 + "'";
 

--
Gitblit v1.9.1