|
|
@ -259,6 +259,8 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SEQty = p.Sum(t => t.SEQty), |
|
|
|
EdiQty = p.Sum(t => t.EdiQty) |
|
|
|
}).ToList(); |
|
|
|
//有结算无发运
|
|
|
|
var haveSaNotHaveSeExport = saSeEdiCompareDetailExports.FindAll(t => new EnumSaSeEdiCompareCategory[] { EnumSaSeEdiCompareCategory.HaveSaNotHaveSeHaveEdi, EnumSaSeEdiCompareCategory.HaveSaNotHaveSeNotHaveEdi }.Contains(t.Category)); |
|
|
|
|
|
|
|
//有结算有发运
|
|
|
|
var haveSaHaveSeExports = saSeEdiCompareDetailExports.FindAll(t => new EnumSaSeEdiCompareCategory[] { EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi, EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi }.Contains(t.Category)); |
|
|
@ -295,28 +297,35 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
var excelExporter = new ExcelExporter(); |
|
|
|
//结算核对明细输出
|
|
|
|
excelExporter.Append(saSeEdiCompareDetailExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}结算核对明细输出"); |
|
|
|
for (var i = 1; i < saSeEdiCompareDetailExports.Count / detailMaxRowNumberOnASheet + ((saSeEdiCompareDetailExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
//有结算无发运
|
|
|
|
excelExporter.Append(haveSaNotHaveSeExport.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算无发运"); |
|
|
|
for (var i = 1; i < haveSaNotHaveSeExport.Count / detailMaxRowNumberOnASheet + ((haveSaNotHaveSeExport.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
{ |
|
|
|
var sheetDataItems = saSeEdiCompareDetailExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}结算核对明细输出-{i}"); |
|
|
|
var sheetDataItems = haveSaNotHaveSeExport.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算无发运-{i}"); |
|
|
|
} |
|
|
|
//结算核对汇总输出
|
|
|
|
excelExporter.Append(saSeEdiCompareSumExports.Take(sumMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}结算核对汇总输出"); |
|
|
|
for (var i = 1; i < saSeEdiCompareSumExports.Count / sumMaxRowNumberOnASheet + ((saSeEdiCompareSumExports.Count % sumMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
//无结算有发运
|
|
|
|
excelExporter.Append(notHaveSaHaveSeExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}无结算有发运"); |
|
|
|
for (var i = 1; i < notHaveSaHaveSeExports.Count / detailMaxRowNumberOnASheet + ((notHaveSaHaveSeExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
{ |
|
|
|
var sheetDataItems = saSeEdiCompareSumExports.Skip(i * sumMaxRowNumberOnASheet).Take(sumMaxRowNumberOnASheet).ToList(); ; |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}结算核对汇总输出-{i}"); |
|
|
|
var sheetDataItems = notHaveSaHaveSeExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}无结算有发运-{i}"); |
|
|
|
} |
|
|
|
////结算核对汇总输出
|
|
|
|
//excelExporter.Append(saSeEdiCompareSumExports.Take(sumMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}结算核对汇总输出");
|
|
|
|
//for (var i = 1; i < saSeEdiCompareSumExports.Count / sumMaxRowNumberOnASheet + ((saSeEdiCompareSumExports.Count % sumMaxRowNumberOnASheet) > 0 ? 1 : 0); i++)
|
|
|
|
//{
|
|
|
|
// var sheetDataItems = saSeEdiCompareSumExports.Skip(i * sumMaxRowNumberOnASheet).Take(sumMaxRowNumberOnASheet).ToList(); ;
|
|
|
|
// excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}结算核对汇总输出-{i}");
|
|
|
|
//}
|
|
|
|
|
|
|
|
//有结算有发货明细输出
|
|
|
|
excelExporter.Append(haveSaHaveSeExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算有发货明细输出"); |
|
|
|
for (var i = 1; i < haveSaHaveSeExports.Count / detailMaxRowNumberOnASheet + ((haveSaHaveSeExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
{ |
|
|
|
var sheetDataItems = haveSaHaveSeExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算有发货明细输出-{i}"); |
|
|
|
} |
|
|
|
//excelExporter.Append(haveSaHaveSeExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算有发货明细输出");
|
|
|
|
//for (var i = 1; i < haveSaHaveSeExports.Count / detailMaxRowNumberOnASheet + ((haveSaHaveSeExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++)
|
|
|
|
//{
|
|
|
|
// var sheetDataItems = haveSaHaveSeExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList();
|
|
|
|
// excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算有发货明细输出-{i}");
|
|
|
|
//}
|
|
|
|
//有结算有发货汇总输出
|
|
|
|
excelExporter.Append(haveSaHaveSeSumExports.Take(sumMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算有发货汇总输出"); |
|
|
|
for (var i = 1; i < haveSaHaveSeSumExports.Count / sumMaxRowNumberOnASheet + ((haveSaHaveSeSumExports.Count % sumMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
@ -325,20 +334,20 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算有发货汇总输出-{i}"); |
|
|
|
} |
|
|
|
|
|
|
|
//有结算有发货明细输出
|
|
|
|
excelExporter.Append(haveSaNotHaveSeExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算无发货明细输出"); |
|
|
|
for (var i = 1; i < haveSaNotHaveSeExports.Count / detailMaxRowNumberOnASheet + ((haveSaNotHaveSeExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
{ |
|
|
|
var sheetDataItems = haveSaNotHaveSeExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算无发货明细输出-{i}"); |
|
|
|
} |
|
|
|
//有结算有发货汇总输出
|
|
|
|
excelExporter.Append(haveSaNotHaveSeSumExports.Take(sumMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算无发货汇总输出"); |
|
|
|
for (var i = 1; i < haveSaNotHaveSeSumExports.Count / sumMaxRowNumberOnASheet + ((haveSaNotHaveSeSumExports.Count % sumMaxRowNumberOnASheet) > 0 ? 1 : 0); i++) |
|
|
|
{ |
|
|
|
var sheetDataItems = haveSaNotHaveSeSumExports.Skip(i * sumMaxRowNumberOnASheet).Take(sumMaxRowNumberOnASheet).ToList(); |
|
|
|
excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算无发货汇总输出-{i}"); |
|
|
|
} |
|
|
|
////有结算无发货明细输出
|
|
|
|
//excelExporter.Append(haveSaNotHaveSeExports.Take(detailMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算无发货明细输出");
|
|
|
|
//for (var i = 1; i < haveSaNotHaveSeExports.Count / detailMaxRowNumberOnASheet + ((haveSaNotHaveSeExports.Count % detailMaxRowNumberOnASheet) > 0 ? 1 : 0); i++)
|
|
|
|
//{
|
|
|
|
// var sheetDataItems = haveSaNotHaveSeExports.Skip(i * detailMaxRowNumberOnASheet).Take(detailMaxRowNumberOnASheet).ToList();
|
|
|
|
// excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算无发货明细输出-{i}");
|
|
|
|
//}
|
|
|
|
////有结算无发货汇总输出
|
|
|
|
//excelExporter.Append(haveSaNotHaveSeSumExports.Take(sumMaxRowNumberOnASheet).ToList(), $"{businessTypeDisplayName}有结算无发货汇总输出");
|
|
|
|
//for (var i = 1; i < haveSaNotHaveSeSumExports.Count / sumMaxRowNumberOnASheet + ((haveSaNotHaveSeSumExports.Count % sumMaxRowNumberOnASheet) > 0 ? 1 : 0); i++)
|
|
|
|
//{
|
|
|
|
// var sheetDataItems = haveSaNotHaveSeSumExports.Skip(i * sumMaxRowNumberOnASheet).Take(sumMaxRowNumberOnASheet).ToList();
|
|
|
|
// excelExporter.Append(sheetDataItems, $"{businessTypeDisplayName}有结算无发货汇总输出-{i}");
|
|
|
|
//}
|
|
|
|
|
|
|
|
return excelExporter; |
|
|
|
} |
|
|
|