yangle
2023-12-04 d6d4851e59fada3d2819c750a643ad6480233890
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");
@@ -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;