From 5898d7f62ec4b29f313a018c7526ce100e9d30a6 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 09 四月 2025 15:02:05 +0800
Subject: [PATCH] 加日志

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_ICMOSortBillController.cs |   52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_ICMOSortBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_ICMOSortBillController.cs"
index c1b29f4..3fcd8eb 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_ICMOSortBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_ICMOSortBillController.cs"
@@ -17,6 +17,8 @@
         public DataSet ds = new DataSet();
         public WebServer webserver = new WebServer();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+
         #region 鐢熶骇鏃ヨ鍒� 鏌ヨ
         [Route("JIT_ICMOSortBill/JIT_ICMOSortBillList")]
         [HttpGet]
@@ -34,7 +36,18 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOSortBillList", "h_v_Sc_ICMOSortBillList");
+
+                string Ret = "";
+                if (oSystemParameter.ShowBill(ref Ret)) {
+                    //鍒ゆ柇瀹㈡埛涓哄嚡璐�
+                    if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒") //绯荤粺鍙傛暟                      
+                    {
+                        ds = oCN.RunProcReturn("select top 1000 * from h_v_Sc_ICMOSortBillList where 1=1"+ sWhere, "h_v_Sc_ICMOSortBillList");
+                    }
+                    else {
+                        ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOSortBillList where 1=1"+ sWhere , "h_v_Sc_ICMOSortBillList");
+                    }
+                }
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
@@ -78,5 +91,42 @@
             }
         }
         #endregion
+
+        #region 鐢熶骇鏃ヨ鍒� 杞﹂棿鎵ц纭  鎾ら攢杞﹂棿鎵ц纭
+        [Route("JIT_ICMOSortBill/JIT_ICMOSortBillWorkShopTure")]
+        [HttpGet]
+        public object JIT_ICMOSortBillWorkShopTure(string HSourceID, string HICMOInterID, DateTime HDate, int HStatus, string user)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn($"select * from Sc_ICMOBillStatus_Tmp_Extend where HSourceID = {HSourceID} and HSourceInterID = {HICMOInterID} and HDate = '{HDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}' ", "Sc_ICMOBillStatus_Tmp_Extend");
+
+                if (ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠撳簱鏈‘璁�,涓嶈兘杩涜杞﹂棿纭锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyStart " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'," + HStatus.ToString() + ",'" + user + "'");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                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