|
|
@ -33,9 +33,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
[Authorize(SettleAccountPermissions.WMSJIT.Default)] |
|
|
|
[Route("api/settleaccount/WMSOutputDetailCancelDiffReport")] |
|
|
|
public class WMSOutputDetailCancelDiffReportAppService : |
|
|
|
SettleAccountApplicationBase<WmsDetailDiffReport> |
|
|
|
SettleAccountApplicationBase<WmsDetailCancelReport> |
|
|
|
{ |
|
|
|
private readonly ISettleAccountBranchEfCoreRepository<WmsDetailDiffReport, Guid> _wmsRepository; |
|
|
|
private readonly ISettleAccountBranchEfCoreRepository<WmsDetailCancelReport, Guid> _wmsRepository; |
|
|
|
private readonly WmsOutputSumDapperRepository _dapper; |
|
|
|
private readonly IExcelImportAppService _excelImportService; |
|
|
|
|
|
|
@ -48,10 +48,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
|
|
|
|
public WMSOutputDetailCancelDiffReportAppService( |
|
|
|
WmsOutputSumDapperRepository dapper, |
|
|
|
ISettleAccountBranchEfCoreRepository<WmsDetailDiffReport, Guid> wmsRepository, |
|
|
|
ISettleAccountBranchEfCoreRepository<WmsDetailCancelReport, Guid> wmsRepository, |
|
|
|
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job, |
|
|
|
IExcelImportAppService excelImportService, |
|
|
|
IDistributedCache<WmsDetailDiffReport> cache, |
|
|
|
IDistributedCache<WmsDetailCancelReport> cache, |
|
|
|
ISnowflakeIdGenerator snowflakeIdGenerator, |
|
|
|
ICommonManager commonManager, |
|
|
|
ErpSumOutputDapperRepository erpDapper |
|
|
@ -81,12 +81,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
var query = _wmsRepository.Where(p => p.Version == version); |
|
|
|
await query.BatchDeleteAsync(); |
|
|
|
} |
|
|
|
List<WmsDetailDiffReport> _lst = new List<WmsDetailDiffReport>(); |
|
|
|
List<WmsDetailCancelReport> _lst = new List<WmsDetailCancelReport>(); |
|
|
|
if (_ls != null && _ls.Count() > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in _ls) |
|
|
|
{ |
|
|
|
_lst.Add(new WmsDetailDiffReport( |
|
|
|
_lst.Add(new WmsDetailCancelReport( |
|
|
|
Guid.NewGuid(), |
|
|
|
itm.客户, |
|
|
|
itm.出库类型, |
|
|
@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
[HttpPost] |
|
|
|
[Route("WmsDetailReport")] |
|
|
|
|
|
|
|
virtual public async Task<PagedResultDto<WmsDetailDiffReport>> GetListAsync(WmsRequestDetailReportDto input) |
|
|
|
virtual public async Task<PagedResultDto<WmsDetailCancelReport>> GetListAsync(WmsRequestDetailReportDto input) |
|
|
|
{ |
|
|
|
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); |
|
|
|
//客户过滤
|
|
|
@ -131,7 +131,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, |
|
|
|
input.SkipCount, true); |
|
|
|
var totalCount = await GetCountAsync(input); |
|
|
|
return new PagedResultDto<WmsDetailDiffReport>(totalCount, entities); |
|
|
|
return new PagedResultDto<WmsDetailCancelReport>(totalCount, entities); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -176,7 +176,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
//{
|
|
|
|
// var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
|
|
|
|
// 0, true);
|
|
|
|
// List<WmsDetailDiffReport> _ls = new List<WmsDetailDiffReport>();
|
|
|
|
// List<WmsDetailCancelReport> _ls = new List<WmsDetailCancelReport>();
|
|
|
|
// if (entities.Count() > 0)
|
|
|
|
// {
|
|
|
|
// var _entity = entities.FirstOrDefault();
|
|
|
@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS |
|
|
|
} |
|
|
|
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, |
|
|
|
0, true); |
|
|
|
var dtoDetails = ObjectMapper.Map<List<WmsDetailDiffReport>, List<WmsDetailDiffReportDto>>(entities); |
|
|
|
var dtoDetails = ObjectMapper.Map<List<WmsDetailCancelReport>, List<WmsDetailCancelReportDto>>(entities); |
|
|
|
IExporter _excel = new ExcelExporter(); |
|
|
|
byte[] result = null; |
|
|
|
var _fileName = string.Format("撤销清单报表_{0}.xlsx", Guid.NewGuid().ToString()); |
|
|
|