From 3697b0dda739b38c33406d6e164714167e9ad5b5 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 22 十一月 2024 15:31:18 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/LMESController.cs |   50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index c63108f..a978efe 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1210,7 +1210,7 @@
         #region 宸ヨ壓璺嚎鍒嗛〉鍒楄〃
         [Route("Gy_RoutingBill/page")]
         [HttpGet]
-        public json Gy_RoutingBillPage(string sWhere, string user, int page, int size)
+        public object Gy_RoutingBillPage(string sWhere, string user, int page, int size)
         {
             DataSet ds;
             json res = new json();
@@ -1256,7 +1256,7 @@
                 res.count = CountConstant.FAIL;
                 res.Message = "Exception锛�" + e.ToString();
                 res.data = null;
-                return objJsonResult;
+                return res;
             }
         }
         #endregion
@@ -1326,7 +1326,7 @@
                 {
                     string sql1 = "select * from h_v_Gy_RoutingBillList where 1 = 1 ";
                     //瀹㈡埛鑷畾涔�
-                    if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�" || oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒" || oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧")
+                    if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�" || oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒" )
                     {
                          sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 ";
                     }
@@ -3559,7 +3559,23 @@
                         return objJsonResult;
                     }
                 }
-               
+
+                //鑾峰彇绯荤粺鍙傛暟鍒ゆ柇宸ヨ壓璺嚎鏄惁鍚敤澶氱骇瀹℃壒绂佺敤鏅�氬鎵�
+                Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+                string sReturn = "";
+                if (oSystemParameter.ShowBill(ref sReturn) == true)
+                {
+                    if (oSystemParameter.omodel.Gy_RoutingBill_EnableMultiLevel.ToUpper() == "Y") //绯荤粺鍙傛暟  鍚敤鑷姩瀹℃牳 
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "宸ヨ壓璺嚎宸插惎鐢ㄥ绾у鎵规櫘閫氬鏍哥鐢�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+
 
                 if (string.IsNullOrWhiteSpace(HInterID))
                 {
@@ -3595,9 +3611,18 @@
 
                     //瀹℃牳宸ヨ壓璺嚎
                     oCN.RunProc(" Update Gy_RoutingBillMain set HChecker='" + user + "',HCheckDate=getdate(),HBillStatus=2 Where HInterID=" + HInterID.ToString());
-                   
-                    ////鍒锋柊榛樿宸ヨ壓璺嚎
-                    //oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID);
+
+                    //鑾峰彇绯荤粺鍙傛暟
+                    string Ret = "";
+                    if (oSystemParameter.ShowBill(ref Ret))
+                    {
+                        //鍒ゆ柇瀹㈡埛
+                        if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧") //绯荤粺鍙傛暟                      
+                        {
+                            //鍒锋柊榛樿宸ヨ壓璺嚎
+                            oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID + ",'" + user + "'");
+                        }
+                    }                 
 
                     ////瀹℃牳鍗曟嵁
                     //if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
@@ -3763,6 +3788,17 @@
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
+                    //鑾峰彇绯荤粺鍙傛暟璁剧疆澶辨晥鏃堕棿
+                    string Ret = "";
+                    if (oSystemParameter.ShowBill(ref Ret))
+                    {
+                        //鍒ゆ柇瀹㈡埛
+                        if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧") //绯荤粺鍙傛暟                      
+                        {
+                            //鍒锋柊澶辨晥鏃堕棿
+                            oCN.RunProc("update Gy_RoutingBillMain set HEndDate = CONVERT(date, DATEADD(day, -1, GETDATE())) where HInterID = " + HInterID);
+                        }
+                    }
                 }
                 else
                 {

--
Gitblit v1.9.1