From 9ee34bf1bd73a56a8b2730952e46467b992801e3 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 1 Dec 2021 11:06:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.Domain/Reports/ReportDetailBase.cs | 2 ++ .../Report/ErpPartDapperRepository.cs | 6 ------ .../InvoiceSettledDetailDiffDapperRepository.cs | 6 +++--- .../Report/InvoiceSettledDetailDiffExportService.cs | 12 +++++++----- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/ReportDetailBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/ReportDetailBase.cs index 8aa92fd2..f80957f4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/ReportDetailBase.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/ReportDetailBase.cs @@ -41,6 +41,8 @@ namespace Win.Sfs.SettleAccount.Reports [ExporterHeader(DisplayName = "结算日期")] public virtual DateTime CP7Time { set; get; } + [ExporterHeader(DisplayName = "开票单价")] + public virtual decimal InvoicePrice { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs index ea39d7df..c12ba0a6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs @@ -98,12 +98,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report Amt = tm1.SapPrice, MaterialGroup = tm2.EstimateTypeDesc, CP7Time=itm1.CP7Time, - - - - - - }; tmpList = query.ToList(); diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs index 87672801..3982a388 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs @@ -68,7 +68,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public decimal InvoiceQty { set; get; } //开票单价 [ExporterHeader(DisplayName = "开票单价")] - public decimal InvoicePrice { set; get; } + public override decimal InvoicePrice { set; get; } //开票金额 [ExporterHeader(DisplayName = "开票金额")] public decimal InvocieAmt { set; get; } @@ -79,8 +79,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ExporterHeader(DisplayName = "单价差异")] public decimal DiffPrice { set; get; } //总金额差异 - [ExporterHeader(DisplayName = "总金额差异")] - public decimal AmtDiffPrice { set; get; } + //[ExporterHeader(DisplayName = "总金额差异")] + //public decimal AmtDiffPrice { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs index bc5d0435..6a8a8f41 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs @@ -77,18 +77,20 @@ namespace SettleAccount.Job.Services }); + - foreach (var itm in diffList) + + foreach (var itm in diffList) { var _first= _ls.FirstOrDefault(p => p.MaterialCode == itm.MaterialCode); _first.InvoiceQty= _first.SettledQty + itm.DiffQty; _first.DiffSettleInvQty = itm.DiffQty; - } - - - + foreach (var itm in _ls) + { + itm.InvocieAmt = itm.InvoiceQty * itm.InvoicePrice; + } _ls.AddRange(rangeList); _ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList();