From 62c7287e0ca2c548e6ab8c2a2f4e676042ba8519 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 27 十一月 2023 14:03:47 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/MateOutController.cs |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index 3cb7c26..7c84e13 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1341,6 +1341,7 @@
             public string HProductName;
             public string HProductModel;
             public string RandomSearch;
+            public string OtherSearch;
         }
 
         #region 鐧藉澂鍙戝竷姹囨�绘姤琛�
@@ -1353,10 +1354,18 @@
                 //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
                 MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
 
+                //string sql = "" +
+                //    "( (鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
+                //    "and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
+                //    "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
+                //    "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+                //    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch +
+                //    " " + com.OtherSearch;
+
                 string sql = "" +
                     "( (鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
                     "and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
-                    "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''"+ com.HBillNo + "''='''') " +
+                    "and (鍗曟嵁鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
                     "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
                     "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
 
@@ -1474,6 +1483,14 @@
             {
                 //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
                 MaterOutSumReport com = JsonConvert.DeserializeObject<MaterOutSumReport>(sWhere.ToString());
+
+                //string sql = "" +
+                //    "( (鐢熶骇璁㈠崟鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
+                //    "and (浜у搧浠g爜=''" + com.HMaterNumber + "'' or ''" + com.HMaterNumber + "''='''') " +
+                //    "and (鐢熶骇璁㈠崟鍙�=''" + com.HBillNo + "'' or ''" + com.HBillNo + "''='''') " +
+                //    "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+                //    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch +
+                //    " " + com.OtherSearch;
 
                 string sql = "" +
                     "( (鐢熶骇璁㈠崟鏃ユ湡 between ''" + com.HBeginDate + "'' and ''" + com.HEndDate + "'') or (''" + com.HBeginDate + "'' = '''' and ''" + com.HEndDate + "''='''') ) " +
@@ -2051,12 +2068,13 @@
         #endregion
 
         #region  鐢熶骇鏃ヨ鎶ヨ〃
-        public class DayRkReport { 
-        public string HBeginDate { get; set; }
-        public string HEndDate { get; set; }
-        public string HMaterNumber { get; set; }
-        public string HCustomerName { get; set; }
-        public string HProductName { get; set; }
+        public class DayRkReport {
+            public string HBeginDate { get; set; }
+            public string HEndDate { get; set; }
+            public string HMaterNumber { get; set; }
+            public string HCustomerName { get; set; }
+            public string HProductName { get; set; }
+            public string HOtherSearch { get; set; }
         }
         [Route("MaterOutEntryReport/SC_DayRkReport")]
         [HttpGet]
@@ -2065,9 +2083,12 @@
             try
             {
                DayRkReport DayRkReportList = JsonConvert.DeserializeObject<DayRkReport>(sWhere);
-              
+
+                //string sql = $"exec h_p_Gy_DayRkReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
+                //    $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}','{DayRkReportList.HOtherSearch}'";
                 string sql = $"exec h_p_Gy_DayRkReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
                     $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'";
+
                 ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport");
 
                 DataTable dt = null;
@@ -2129,6 +2150,7 @@
             public string HMaterNumber { get; set; }
             public string HCustomerName { get; set; }
             public string HProductName { get; set; }
+            public string HOtherSearch { get; set; }
         }
         [Route("MaterOutEntryReport/SemiFinishedProductsReportList")]
         [HttpGet]
@@ -2138,6 +2160,8 @@
             {
                 SemiFinishedProductsReport DayRkReportList = JsonConvert.DeserializeObject<SemiFinishedProductsReport>(sWhere);
 
+                //string sql = $"exec h_p_sc_SemiFinishedProductsReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
+                //    $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}','{DayRkReportList.HOtherSearch}'";
                 string sql = $"exec h_p_sc_SemiFinishedProductsReport '{DayRkReportList.HBeginDate}','{DayRkReportList.HEndDate}','{DayRkReportList.HMaterNumber}'" +
                     $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'";
                 ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport");

--
Gitblit v1.9.1