From b7ede349929b44bd664d059728919f6c8eede66a Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期四, 30 三月 2023 09:39:44 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs |   74 ++++++++++++++++++++++++++++--------
 1 files changed, 57 insertions(+), 17 deletions(-)

diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index 3a69b83..5b7a717 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -143,7 +143,7 @@
                 string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
                 DateTime HDate = mainList[0].HDate;//鏃ユ湡
                 int HYear = DateTime.Now.Year;
-                double HPeriod = 1;
+                double HPeriod = DateTime.Now.Month;
                 string HRemark = mainList[0].HRemark;//澶囨敞
                 string HMaker = mainList[0].HMaker;//鍒跺崟浜�
                 long HMaterID = mainList[0].HMaterID;//浜у搧ID
@@ -231,24 +231,24 @@
                     return objJsonResult;
                 }
 
-                //string sErrMsg = "";
-                //if (oSystemParameter.ShowBill(ref sErrMsg))
-                //{
-                //    if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
-                //    {
-                //        if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
-                //        {
-                //            //璁剧疆杞伐搴�
-                //            oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
-                //        }
-                //    }
-                //}
-
-                if (IsProNo == 1 && OperationType == 1)
+                string sErrMsg = "";
+                if (oSystemParameter.ShowBill(ref sErrMsg))
                 {
-                    //璁剧疆杞伐搴�
-                    oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
+                    if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
+                    {
+                        if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
+                        {
+                            //璁剧疆杞伐搴�
+                            oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
+                        }
+                    }
+                    else if (IsProNo == 1 && OperationType == 1)
+                    {
+                        //璁剧疆杞伐搴�
+                        oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
+                    }
                 }
+
 
                 //鏄惁鍕鹃�夐粯璁ゅ伐鑹鸿矾绾�
                 if (HStandard)
@@ -354,6 +354,46 @@
 
         #endregion
 
+        #region 宸ヨ壓璺嚎鍒楄〃 鏌ヨ绯荤粺鍙傛暟
+        /// <summary>
+        /// 杩斿洖宸ヨ壓璺嚎鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("LEMS/MES_XT_List")]
+        [HttpGet]
+        public object MES_XT_List(string sWhere)
+        {
+            try
+            {
+                string flag = "flase";
+                string sErrMsg = "";
+                if (oSystemParameter.ShowBill(ref sErrMsg))
+                {
+                    if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y")
+                    {
+                        flag = "true";
+                    }
+                }
+                
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "";
+                objJsonResult.data = flag;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #region 宸ヨ壓璺嚎 鏂囦欢涓婁紶
         [Route("Gy_RoutingBill/Gy_RoutingBillimport")]
         [HttpPost]

--
Gitblit v1.9.1