From d6d4851e59fada3d2819c750a643ad6480233890 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 04 十二月 2023 09:34:03 +0800
Subject: [PATCH] 经销商供应商

---
 WebAPI/Controllers/MateOutController.cs |   49 +++++++++++++++++++++++++------------------------
 1 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index 7ef7404..858190a 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1354,20 +1354,20 @@
                 //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
                 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.HProductName + "'' or ''" + com.HProductName + "''='''') " +
-                    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
+                    "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.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+                //    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
 
                 ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutSumReport_Cloth_New '{sql}'" , "h_p_Kf_MaterOutSumReport_Cloth_New");
 
@@ -1484,20 +1484,20 @@
                 //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
                 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.HProductName + "'' or ''" + com.HProductName + "''='''') " +
-                    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
+                    "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.HProductName + "'' or ''" + com.HProductName + "''='''') " +
+                //    "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch;
 
                 ds = oCN.RunProcReturn($"exec h_p_Kf_ProdProcessSumReport_DyeColor '{sql}'", "h_p_Kf_ProdProcessSumReport_DyeColor");
 
@@ -2076,6 +2076,7 @@
             public string HProductName { get; set; }
             public string HOtherSearch { get; set; }
             public string HEmpName { get; set; }
+            public string sWheres { get; set; }
         }
         [Route("MaterOutEntryReport/SC_DayRkReport")]
         [HttpGet]
@@ -2085,10 +2086,10 @@
             {
                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}'";
+                    $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}','{DayRkReportList.HOtherSearch}','{DayRkReportList.HEmpName}','{DayRkReportList.sWheres}'";
+                //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");
 
@@ -2161,10 +2162,10 @@
             {
                 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}'";
+                    $",'{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");
 
                 DataTable dt = null;

--
Gitblit v1.9.1