From 1b3088f4c63ddff298eb0ca49c222ce72f3b91a4 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Wed, 9 Mar 2022 11:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E6=97=97=E6=9C=AA=E7=BB=93=E6=A0=B8?= =?UTF-8?q?=E5=AF=B9=E8=AE=BE=E7=BD=AEKey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReportServices/ReportMakeService.cs | 2 +- .../HQFactorySettledDetailDapperRepository.cs | 30 ++++++++++++++++--- .../SettleAccountJobModule.cs | 5 ++++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index 3df4b177..75ca24a4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -745,7 +745,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode }); - var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactorySettledDetailDapperRepository), customConditionList, (rs) => + var _taskid = await _service.ExportEnqueueAsync("红旗未结核对", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFactoryUnSettledDetailDiffExportService), customConditionList, (rs) => { }); return _taskid; diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs index 29f7f275..2d351f02 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs @@ -75,7 +75,25 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " ISNULL( h.Qty, 0 ) AS UnHQQty,\n" + " ISNULL( h.Amt, 0 ) AS UnHQAmt \n" + " FROM\n" + - " Set_UnHQSettleAccount AS h\n" + + " (\n" + + " SELECT SUM\n" + + " ( Qty ) Qty,\n" + + " Amt,\n" + + " HQHKanBan,\n" + + " StorageLocation,\n" + + " StorageLocationDesc,\n" + + " AcceptanceNo,\n" + + " MaterialCode \n" + + " FROM\n" + + " Set_UnHQSettleAccount \n" + + " GROUP BY\n" + + " HQHKanBan,\n" + + " StorageLocation,\n" + + " StorageLocationDesc,\n" + + " AcceptanceNo,\n" + + " Amt,\n" + + " MaterialCode \n" + + " ) AS h\n" + " LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" + " ) AS unhq\n" + " LEFT JOIN (\n" + @@ -89,7 +107,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " b.AcceptanceNo AS 结算验收单号,\n" + " C.EstimateTypeDesc AS 物料组 \n" + " FROM\n" + - " Set_HQ_H_Kanban AS a\n" + + " ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + " AND a.MaterialCode = b.MaterialCode\n" + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + @@ -167,7 +185,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " b.AcceptanceNo AS 结算验收单号,\n" + " C.EstimateTypeDesc AS 物料组 \n" + " FROM\n" + - " Set_HQ_H_Kanban AS a\n" + + " ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" + " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" + " AND a.MaterialCode = b.MaterialCode\n" + " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" + @@ -176,7 +194,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " AND b.MaterialCode IS NULL {0}\n" + " ) AS temp1\n" + " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" + - " LEFT JOIN ( SELECT Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount ) temp3 ON temp1.[结算验收单号] = temp3.HQHKanBan \n" + + " LEFT JOIN ( SELECT SUM(Qty) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" + " AND temp1.[客户物料号] = temp3.MaterialCode"; var _sql = string.Format(str, condition); @@ -189,6 +207,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public class HQFactoryUnSettledDetailDiff { + [ExporterHeader(DisplayName = "交货单号")] + public string 交货单号 { set; get; } + [ExporterHeader(DisplayName = "交货日期")] + public string 交货日期 { set; get; } [ExporterHeader(DisplayName = "收货仓库")] public string 收货仓库 { set; get; } [ExporterHeader(DisplayName = "收货仓库描述")] diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs index 84025fd4..a34ac671 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs @@ -179,6 +179,11 @@ namespace Win.Sfs.SettleAccount { return implementationFactory.GetService(); } + //红旗未结核对 + if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName)) + { + return implementationFactory.GetService(); + } if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName)) { return implementationFactory.GetService();