Administrator 3 years ago
parent
commit
83305b8e0f
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs
  2. 6
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs

@ -64,7 +64,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" FROM\n" + " FROM\n" +
" Set_KanBanSettle AS a\n" + " Set_KanBanSettle AS a\n" +
" LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode\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" + " 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" + " 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" + " ) TEMP1\n" +

6
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 OutputService _outputService;
private readonly ErpPartDapperRepository _erpdapperRepository; private readonly ErpPartDapperRepository _erpdapperRepository;
public SettleKBWithCodeExportService(SettleKBWithCodeDapperReportRepository dapper, public SettleKBWithCodeExportService(SettleKBWithCodeDapperReportRepository dapper,
OutputService outputService, OutputService outputService,
ErpPartDapperRepository erpdapperRepository) 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(); _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(); _list = _list.Where(p => DateTime.Parse(endTime) >= p.WMSActualGoodsDate).ToList();
} }

Loading…
Cancel
Save