|
|
@ -99,7 +99,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
businessTypeDisplayName = attributeOfType.Name; |
|
|
|
} |
|
|
|
var filename = exportName.FirstOrDefault(); |
|
|
|
var isWuLiu = filename.StartsWith("物流"); |
|
|
|
//var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(strBusinessType, version, seStartDateTime, seEndDateTime);
|
|
|
|
var pubSaSeCompareDiffs = GetSaSeCompareData(businessType, version, DateTime.Parse(seStartDateTime), DateTime.Parse(seEndDateTime)); |
|
|
|
|
|
|
@ -140,58 +139,26 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
{ |
|
|
|
case EnumBusinessType.ZhiGongJianBBAC: |
|
|
|
{ |
|
|
|
if (isWuLiu) |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBACWuLiu>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBACWuLiu>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBAC>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBAC>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianBBAC>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianBBAC>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
break; |
|
|
|
case EnumBusinessType.ZhiGongJianHBPO: |
|
|
|
{ |
|
|
|
if (isWuLiu) |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPOWuLiu>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPO>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPO>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportZhiGongJianHBPO>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportZhiGongJianHBPO>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
break; |
|
|
|
case EnumBusinessType.BeiJian: |
|
|
|
{ |
|
|
|
if (isWuLiu) |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJianWuLiu>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJianWuLiu>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJian>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJian>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportBeiJian>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportBeiJian>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
break; |
|
|
|
case EnumBusinessType.YinDuJian: |
|
|
|
{ |
|
|
|
if (isWuLiu) |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJianWuLiu>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJianWuLiu>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJian>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJian>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
var items = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExportYinDuJian>>(pubSaSeCompareDiffs); |
|
|
|
excelExporter = BindExcelExporter<PubSaSeCompareDetailExportYinDuJian>(items, businessTypeDisplayName); |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
@ -228,7 +195,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
Price = groupItem.Max(t => t.Price), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
}; |
|
|
@ -261,7 +227,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
PN = sa.PN, |
|
|
|
SAQty = sa.Qty, |
|
|
|
SEQty = se.Qty, |
|
|
|
FixPrice = sa.Price, |
|
|
|
ToLocCode = se.ToLocCode, |
|
|
|
ToErpLocCode = se.ToErpLocCode, |
|
|
|
SeCustomerPartCode = se.CustomerPartCodeNoSpace, |
|
|
@ -283,7 +248,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
PN = se.PN, |
|
|
|
SAQty = sa.Qty, |
|
|
|
SEQty = se.Qty, |
|
|
|
FixPrice = sa.Price, |
|
|
|
ToLocCode = se.ToLocCode, |
|
|
|
ToErpLocCode = se.ToErpLocCode, |
|
|
|
SeCustomerPartCode = se.CustomerPartCodeNoSpace, |
|
|
@ -310,7 +274,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
Price = groupItem.Max(t => t.Price), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
}; |
|
|
@ -341,7 +304,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
CustomerOfflineTime = sa.SettleDate, |
|
|
|
SAQty = sa.Qty, |
|
|
|
SEQty = se.Qty, |
|
|
|
FixPrice = sa.Price, |
|
|
|
ToLocCode = se.ToLocCode, |
|
|
|
ToErpLocCode = se.ToErpLocCode, |
|
|
|
SeCustomerPartCode = se.CustomerPartCodeNoSpace, |
|
|
@ -362,7 +324,6 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
CustomerOfflineTime = sa.SettleDate, |
|
|
|
SAQty = sa.Qty, |
|
|
|
SEQty = se.Qty, |
|
|
|
FixPrice = sa.Price, |
|
|
|
ToLocCode = se.ToLocCode, |
|
|
|
ToErpLocCode = se.ToErpLocCode, |
|
|
|
SeCustomerPartCode = se.CustomerPartCodeNoSpace, |
|
|
|