yangle
2023-12-04 d6d4851e59fada3d2819c750a643ad6480233890
WebAPI/Controllers/MateOutController.cs
@@ -1357,10 +1357,17 @@
                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.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;
                ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutSumReport_Cloth_New '{sql}'" , "h_p_Kf_MaterOutSumReport_Cloth_New");
@@ -1484,6 +1491,13 @@
                    "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;
                ds = oCN.RunProcReturn($"exec h_p_Kf_ProdProcessSumReport_DyeColor '{sql}'", "h_p_Kf_ProdProcessSumReport_DyeColor");
@@ -2061,6 +2075,8 @@
            public string HCustomerName { get; set; }
            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]
@@ -2069,9 +2085,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}'";
                    $",'{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");
                DataTable dt = null;
@@ -2145,6 +2164,8 @@
                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");
                DataTable dt = null;