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(); }