From a4bcd77a358483d6de0b2e766d7f6223e0df1784 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期四, 24 六月 2021 13:35:08 +0800
Subject: [PATCH] 包装单缓存列表

---
 WebAPI/Controllers/LMESController.cs   |   53 ++++++++++++++++++++++++++
 WebAPI/Controllers/ReportController.cs |   41 ++++++++++++++++++++
 2 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 16a2d83..e0442fd 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1220,6 +1220,59 @@
             }
         }
 
+        /// <summary>
+        /// 缂撳瓨琛ㄥ寘瑁呭崟璁板綍
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("LEMS/PackUnionCacheList")]
+        [HttpGet]
+        public object PackUnionCacheList(string sWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select top 5000 * from h_v_PackUnionBillCacheList order by 鎵爜鏃堕棿 desc", "h_v_PackUnionBillCacheList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_PackUnionBillCacheList where 1 = 1 ";
+                    string sql = sql1 + sWhere;
+                    string sql2 = " order by 鎵爜鏃堕棿 desc";
+                    sql += sql2;
+                    ds = oCN.RunProcReturn(sql, "h_v_PackUnionBillCacheList");
+                }
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳暟鎹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
         //
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/ReportController.cs b/WebAPI/Controllers/ReportController.cs
index a8294e9..a60ca4b 100644
--- a/WebAPI/Controllers/ReportController.cs
+++ b/WebAPI/Controllers/ReportController.cs
@@ -73,6 +73,47 @@
             }
         }
 
+        /// <summary>
+        /// 杩斿洖宸ュ簭鍦ㄥ埗鍝佹姤琛�
+        /// </summary>
+        /// <param name="EdDate">鎴鏃堕棿</param>
+        /// <param name="sWhere">鎷兼帴鐨凷QL</param>
+        /// <returns>object</returns>
+        [Route("Report/ProcessWIPReport")]
+        [HttpGet]
+        public object ProcessWIPReport(DateTime EdDate, string sWhere)
+        {
+            DataSet ds;
+            try
+            {
+                ds = oCN.RunProcReturn("exec h_p_K3_Sc_WIPSumReportDateReport '" + EdDate + "','" + sWhere + "'", "h_p_K3_Sc_WIPSumReportDateReport");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳暟鎹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
         //
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1