Browse Source

更新

master
学 赵 7 months ago
parent
commit
77d0c5782a
  1. 52
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

52
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

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

Loading…
Cancel
Save