From e29ae70b1af16d15c488398a3ee5c82735365f22 Mon Sep 17 00:00:00 2001 From: dengyu Date: Tue, 17 Dec 2024 11:12:31 +0800 Subject: [PATCH] 1 --- .../Controllers/MsRptNoTotalController.cs | 20 ++++++++++++++++--- DSWeb/Web.config | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs index 1d9dab17..e11d1ff9 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptNoTotalController.cs @@ -375,6 +375,11 @@ namespace DSWeb.MvcShipping.Controllers } + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } + var jsonRespose = new JsonResponse { Success = true, @@ -628,7 +633,10 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append(" Where " + condition); } - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { @@ -812,7 +820,10 @@ namespace DSWeb.MvcShipping.Controllers } strSql.Append(" Group by B.SALE "); - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { @@ -1007,7 +1018,10 @@ namespace DSWeb.MvcShipping.Controllers } strSql.Append(" Group by F.CUSTOMERNAME,C.[DESCRIPTION],P.PRMBDR,P.PUSDDR,P.PRMBCR,P.PUSDCR "); - + if (!strSql.ToString().Contains(" A ")) + { + strSql = strSql.Replace(" A.ACCDATE", " B.ACCDATE"); + } if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true")) { diff --git a/DSWeb/Web.config b/DSWeb/Web.config index ba0b3ed6..c31b9036 100644 --- a/DSWeb/Web.config +++ b/DSWeb/Web.config @@ -45,7 +45,7 @@ - +