From fb4e1fa0c8902a54c5388431bb7da9a20a8b9c21 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期五, 24 十一月 2023 12:22:57 +0800 Subject: [PATCH] 白坯发布汇总报表、染厂汇总报表、生产日记汇总报表、半成品报表:取消根据用户管理客户过滤 --- WebAPI/Controllers/MateOutController.cs | 35 +++++++++++++++++++++++++++-------- 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs index 6a5d839..80f87be 100644 --- a/WebAPI/Controllers/MateOutController.cs +++ b/WebAPI/Controllers/MateOutController.cs @@ -1354,13 +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.HBillNo + "'' or ''" + com.HBillNo + "''='''') " + "and (浜у搧鍚嶇О=''" + com.HProductName + "'' or ''" + com.HProductName + "''='''') " + - "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch + - " " + com.OtherSearch; + "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"); @@ -1477,13 +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 + - " " + com.OtherSearch; + "and (瑙勬牸鍨嬪彿=''" + com.HProductModel + "'' or ''" + com.HProductModel + "''='''') " + com.RandomSearch; ds = oCN.RunProcReturn($"exec h_p_Kf_ProdProcessSumReport_DyeColor '{sql}'", "h_p_Kf_ProdProcessSumReport_DyeColor"); @@ -2069,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}','{DayRkReportList.HOtherSearch}'"; + $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'"; + ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport"); DataTable dt = null; @@ -2143,8 +2160,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.HOtherSearch}'"; + $",'{DayRkReportList.HProductName}','{DayRkReportList.HCustomerName}'"; ds = oCN.RunProcReturn(sql, "h_p_Gy_DayRkReport"); DataTable dt = null; -- Gitblit v1.9.1