白坯发布汇总报表、染厂汇总报表、生产日记、半成品报表:增加根据用户关联客户过滤
1个文件已修改
48 ■■■■ 已修改文件
WebAPI/Controllers/MateOutController.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 (产品代码=''" + 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 (产品代码=''" + 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 (产品代码=''" + 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 (产品代码=''" + 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 (产品代码=''" + 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 (产品代码=''" + 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");
@@ -2084,10 +2084,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}'";
                //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");
@@ -2160,10 +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.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;