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