Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
14fc9b4644
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  2. 18
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  4. 12
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettle/UnSettleDetailReport.cs
  5. 81
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -482,7 +482,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
string.Empty,
string.Empty,
0,
!string.IsNullOrEmpty(itm.Extend1) ? itm.Extend1 : string.Empty,
!string.IsNullOrEmpty(itm.Extend1) ?itm.Extend1 : string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,

18
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -400,28 +400,12 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(request.ChassisNumber) ? string.Empty : request.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode });
var _taskid = await _service.ExportEnqueueAsync("", ExportExtentsion.Excel, request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
///发票与结算核对明细表
/// </summary>
@ -554,7 +538,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
}
/// <summary>
///准时化未结差异比对
///统计汇总
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>

2
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -3894,7 +3894,7 @@
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.WmsOutputSumExport(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary>
准时化未结差异比对
统计汇总
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>

12
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettle/UnSettleDetailReport.cs

@ -1,4 +1,5 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
@ -8,9 +9,11 @@ using Win.Sfs.SettleAccount.Reports;
namespace Win.Sfs.SettleAccount.Entities.UnSettle
{
[ExcelExporter( MaxRowNumberOnASheet = 900000)]
public class UnSettleDetailReport:ReportDetailBase
{
[ExporterHeader(DisplayName = "交货单号 ")]
public override string WmsBillNum { set; get; }
[ExporterHeader(DisplayName = "实际发货日期 ")]
@ -37,25 +40,18 @@ namespace Win.Sfs.SettleAccount.Entities.UnSettle
public override decimal Price { set; get; }
[ExporterHeader(DisplayName = "金额 ")]
public override decimal Amt { set; get; }
[ExporterHeader(DisplayName = "结算日期",IsIgnore =true)]
public override DateTime CP7Time { set; get; }
[ExporterHeader(DisplayName = "开票单价",IsIgnore =true)]
public override decimal InvoicePrice { set; get; }
[ExporterHeader(DisplayName = "结算平台未结数量 ")]
public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "大众R3未结数量")]
public decimal UnSettleQty { set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public decimal DiffAMT { set; get; }
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "漏结标识 ")]
public string Flag { set; get; }
[ExporterHeader(DisplayName = "漏结期间 ")]

81
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

@ -220,22 +220,99 @@ namespace SettleAccount.Job.Services.Report
// DiffAmt = p.Sum(p => p.DiffAMT)
// });
if (_ls1.Count() > 900000)
{
if (_ls1.Count() > 2700000)
{
var _lsSheet1 = _ls1.Skip(0 * 900000).Take(900000);
var _lsSheet2 = _ls1.Skip(1* 900000).Take(900000);
var _lsSheet3 = _ls1.Skip(2 * 900000).Take(900000);
var _lsSheet4 = _ls1.Skip(3 * 900000).Take(900000);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls, "R3大众未结对比系统未结")
.SeparateBySheet()
.Append(_lsSheet2.ToList(), "系统未结对比R3大众未结(第1页)")
.SeparateBySheet()
.Append(_lsSheet2.ToList(), "系统未结对比R3大众未结(第2页)")
.SeparateBySheet()
.Append(_lsSheet3.ToList(), "系统未结对比R3大众未结(第3页)")
.SeparateBySheet()
.Append(_lsSheet3.ToList(), "系统未结对比R3大众未结(第4页)")
.SeparateBySheet()
.Append(_lsSum.ToList(), "大众R3未结对比结算系统差异汇总")
.SeparateBySheet()
.Append(_lsSum1.ToList(), "结算系统对比大众R3未结差异汇总")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_first, result.Result, true);
}
else
{
if (_ls1.Count() > 18000000)
{
var _lsSheet1 = _ls1.Skip(0 * 900000).Take(900000);
var _lsSheet2 = _ls1.Skip(1 * 900000).Take(900000);
var _lsSheet3 = _ls1.Skip(2 * 900000).Take(900000);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls, "R3大众未结对比系统未结")
.SeparateBySheet()
.Append(_ls1.ToList(),"系统未结对比R3大众未结")
.Append(_lsSheet2.ToList(), "系统未结对比R3大众未结(第1页)")
.SeparateBySheet()
.Append(_lsSheet2.ToList(), "系统未结对比R3大众未结(第2页)")
.SeparateBySheet()
.Append(_lsSheet3.ToList(), "系统未结对比R3大众未结(第3页)")
.SeparateBySheet()
.Append(_lsSum.ToList(), "大众R3未结对比结算系统差异汇总")
.SeparateBySheet()
.Append(_lsSum1.ToList(),"结算系统对比大众R3未结差异汇总")
.Append(_lsSum1.ToList(), "结算系统对比大众R3未结差异汇总")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_first, result.Result, true);
}
else
{
var _lsSheet1 = _ls1.Skip(0 * 900000).Take(900000);
var _lsSheet2 = _ls1.Skip(1 * 900000).Take(900000);
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "R3大众未结对比系统未结")
.SeparateBySheet()
.Append(_lsSheet1.ToList(), "系统未结对比R3大众未结(第1页)")
.SeparateBySheet()
.Append(_lsSheet2.ToList(), "系统未结对比R3大众未结(第2页)")
.SeparateBySheet()
.Append(_lsSum.ToList(), "大众R3未结对比结算系统差异汇总")
.SeparateBySheet()
.Append(_lsSum1.ToList(), "结算系统对比大众R3未结差异汇总")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_first, result.Result, true);
}
}
}
else
{
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls, "R3大众未结对比系统未结")
.SeparateBySheet()
.Append(_ls1.ToList(), "系统未结对比R3大众未结")
.SeparateBySheet()
.Append(_lsSum.ToList(), "大众R3未结对比结算系统差异汇总")
.SeparateBySheet()
.Append(_lsSum1.ToList(), "结算系统对比大众R3未结差异汇总")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_first, result.Result, true);
}
return id.ToString();

Loading…
Cancel
Save