From 1e1425d8a7cfad573ff77f2cb3a84064bc056a81 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期日, 09 七月 2023 13:20:03 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/LMESController.cs |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index e4ae870..97bc966 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -447,6 +447,73 @@
             return GetObjectJson(ds);
         }
 
+        #endregion
+
+        #region 宸ヨ壓璺嚎鍘嗗彶鍒楄〃
+        /// <summary>
+        /// 杩斿洖宸ヨ壓璺嚎鍘嗗彶鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("LEMS/MES_Gy_RoutingBillList_His")]
+        [HttpGet]
+        public object MES_Gy_RoutingBillList_His(string sWhere, string user)
+        {
+            DataSet ds;
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鑾峰彇绯荤粺鍙傛暟
+                string Ret = "";
+                if (oSystemParameter.ShowBill(ref Ret))
+                {
+                    //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+                    if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+                    {
+                        //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+                        string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "宸ヨ壓璺嚎鍒楄〃");
+
+                        sWhere += sql_splice;
+                    }
+                }
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList_His where 1 = 1" + sWhere + " order by hmainid desc", "h_v_Gy_RoutingBillList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Gy_RoutingBillList_His where 1 = 1 ";
+                    //瀹㈡埛鑷畾涔�
+                    if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
+                    {
+                        sql1 = "select top 1000 * from h_v_Gy_RoutingBillList_His where 1 = 1 ";
+                    }
+                    string sql = sql1 + sWhere + " order by hmainid desc,cast(宸ュ簭鍙� as int)";
+                    ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList_His");
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            return GetObjectJson(ds);
+        }
+
         #endregion       
 
         #region 鏌ョ湅宸ヨ壓璺嚎鍒楄〃宸ヤ环鏉冮檺

--
Gitblit v1.9.1