|
@ -262,8 +262,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var dtos = _maper.Map<List<VmiBalanceSumDetail>, List<VmiBalanceSumDetailDto>>(entities); |
|
|
var dtos = _maper.Map<List<VmiBalanceSumDetail>, List<VmiBalanceSumDetailDto>>(entities); |
|
|
dtos = dtos.OrderByDescending(p => p.BillTime).ToList(); |
|
|
dtos = dtos.OrderByDescending(p => p.BillTime).ToList(); |
|
|
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; |
|
|
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; |
|
|
var content = this.GetContent(dtos, "库存余额"); |
|
|
ExportImporter _exportImporter = new ExportImporter(); |
|
|
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); |
|
|
var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false); |
|
|
|
|
|
result.ShouldNotBeNull(); |
|
|
|
|
|
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false); |
|
|
return fileName; |
|
|
return fileName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -438,20 +440,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
{ |
|
|
{ |
|
|
var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting).ConfigureAwait(false); |
|
|
var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting).ConfigureAwait(false); |
|
|
var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; |
|
|
var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; |
|
|
|
|
|
|
|
|
if (entities.Count > 1000000) |
|
|
if (entities.Count > 1000000) |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException("导出行数超过100W不能导出,请重新录入查询条件导出", "400"); |
|
|
throw new UserFriendlyException("导出行数超过100W不能导出,请重新录入查询条件导出", "400"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var dtos = _maper.Map<List<VmiLog>, List<VmiLogExportDto>>(entities); |
|
|
var dtos = _maper.Map<List<VmiLog>, List<VmiLogExportDto>>(entities); |
|
|
|
|
|
|
|
|
var exportImporter = new ExportImporter(); |
|
|
var exportImporter = new ExportImporter(); |
|
|
var result = await exportImporter.ExcelExporter(dtos).ConfigureAwait(false); |
|
|
var result = await exportImporter.ExcelExporter(dtos).ConfigureAwait(false); |
|
|
result.ShouldNotBeNull(); |
|
|
result.ShouldNotBeNull(); |
|
|
|
|
|
|
|
|
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false); |
|
|
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false); |
|
|
|
|
|
|
|
|
return fileName; |
|
|
return fileName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -2083,34 +2080,47 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ExcelExporter(MaxRowNumberOnASheet = 900000)] |
|
|
public class VmiBalanceSumDetailDto |
|
|
public class VmiBalanceSumDetailDto |
|
|
{ |
|
|
{ |
|
|
[Display(Name = "生产码")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "生产码")] |
|
|
public string VinCode { set; get; } |
|
|
public string VinCode { set; get; } |
|
|
[Display(Name = "虚拟零件号")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "虚拟零件号")] |
|
|
public string MatchNumber { set; get; } |
|
|
public string MatchNumber { set; get; } |
|
|
[Display(Name = "零件类型")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "零件类型")] |
|
|
public string CodeType { set; get; } |
|
|
public string CodeType { set; get; } |
|
|
[Display(Name = "厂内零件号")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "厂内零件号")] |
|
|
public string RealPartCode { set; get; } |
|
|
public string RealPartCode { set; get; } |
|
|
[Display(Name = "库位")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "库位")] |
|
|
public string ErpToLoc { set; get; } |
|
|
public string ErpToLoc { set; get; } |
|
|
[Display(Name = "最后发运时间")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "最后发运时间")] |
|
|
public DateTime? ShippingTime { set; get; } |
|
|
public DateTime? ShippingTime { set; get; } |
|
|
[Display(Name = "最后结算时间")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "最后结算时间")] |
|
|
public DateTime? BillTime { set; get; } |
|
|
public DateTime? BillTime { set; get; } |
|
|
[Display(Name = "合计数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "合计数量")] |
|
|
public decimal Qty { set; get; } |
|
|
public decimal Qty { set; get; } |
|
|
[Display(Name = "发运入库数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "发运入库数量")] |
|
|
public decimal ShippingQty { set; get; } |
|
|
public decimal ShippingQty { set; get; } |
|
|
[Display(Name = "结算出库数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "结算出库数量")] |
|
|
public decimal SettleQty { set; get; } |
|
|
public decimal SettleQty { set; get; } |
|
|
[Display(Name = "退货出库数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "退货出库数量")] |
|
|
public decimal ReturnQty { set; get; } |
|
|
public decimal ReturnQty { set; get; } |
|
|
[Display(Name = "调整入库数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "调整入库数量")] |
|
|
public decimal InputQty { set; get; } |
|
|
public decimal InputQty { set; get; } |
|
|
[Display(Name = "调整出库数量")] |
|
|
|
|
|
|
|
|
[ExporterHeader(DisplayName = "调整出库数量")] |
|
|
public decimal OutputQty { set; get; } |
|
|
public decimal OutputQty { set; get; } |
|
|
} |
|
|
} |
|
|
public class VmiBalanceSumMainDto |
|
|
public class VmiBalanceSumMainDto |
|
|