From f02c7cbe27d7da079f057b464e2b179f1dc17b08 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 18 三月 2025 09:26:16 +0800
Subject: [PATCH] 新增提料运算(根据欠料单进行计算)调用方法

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 52 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 cd518ae..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 鐢熶骇鏃ヨ鍒掑钩鍙� 閿佸畾

--
Gitblit v1.9.1