From 7572a344a88ca913d277117a708eb3ad31364b36 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Sat, 22 Jan 2022 14:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E7=9B=B8=E5=85=B3=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Report/SettleKBWithCodeDapperReportRepository.cs | 2 +- .../Services/Report/SettleKBWithCodeExportService.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs index f6e01205..8af3cb0f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs @@ -64,7 +64,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " FROM\n" + " Set_KanBanSettle AS a\n" + " LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode\n" + - " LEFT JOIN Set_WMSKanBanSettle c ON a.Kanban= c.Kanban \n" + + " INNER JOIN Set_WMSKanBanSettle c ON a.Kanban= c.Kanban \n" + " AND a.MaterialCode= c.MaterialCode\n" + " LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) d ON a.MaterialCode= d.MaterialCode where a.VERSION='{0}'\n" + " ) TEMP1\n" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs index 3e16e839..730c84ff 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs @@ -16,7 +16,7 @@ namespace SettleAccount.Job.Services.Report private readonly OutputService _outputService; private readonly ErpPartDapperRepository _erpdapperRepository; - public SettleKBWithCodeExportService(SettleKBWithCodeDapperReportRepository dapper, + public SettleKBWithCodeExportService(SettleKBWithCodeDapperReportRepository dapper, OutputService outputService, ErpPartDapperRepository erpdapperRepository) { @@ -91,11 +91,11 @@ namespace SettleAccount.Job.Services.Report } } - if (!string.IsNullOrEmpty(beginTime)) + if (!string.IsNullOrEmpty(beginTime) && Convert.ToDateTime(beginTime) != DateTime.MinValue) { _list = _list.Where(p => DateTime.Parse(beginTime) <= p.WMSActualGoodsDate).ToList(); } - if (!string.IsNullOrEmpty(endTime)) + if (!string.IsNullOrEmpty(endTime) && Convert.ToDateTime(beginTime) != DateTime.MinValue) { _list = _list.Where(p => DateTime.Parse(endTime) >= p.WMSActualGoodsDate).ToList(); }