|
|
@ -193,7 +193,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|
where sa.BusinessType == businessType && sa.MappingType == EnumMappingType.None |
|
|
@ -206,7 +208,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|
where sa.BusinessType == businessType && sa.Version == version |
|
|
@ -219,7 +223,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
//发运
|
|
|
|
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
@ -253,7 +259,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SAQty = sa.Qty, |
|
|
|
SaCustomerPartCode = sa.CustomerPartCodeNoSpace, |
|
|
|
SaFactoryPartCode = sa.PartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
//无结算有发运
|
|
|
|
var notHaveSaHaveSeList = (from se in seGroup |
|
|
@ -294,7 +302,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SeFactoryPartCode = se.FactoryPartCode, |
|
|
|
SaCustomerPartCode = sa.CustomerPartCodeNoSpace, |
|
|
|
SaFactoryPartCode = sa.PartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList(); |
|
|
|
} |
|
|
@ -318,7 +328,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|
where sa.BusinessType == EnumBusinessType.YinDuJian && sa.MappingType == EnumMappingType.None |
|
|
@ -330,7 +342,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|
where sa.BusinessType == EnumBusinessType.YinDuJian && sa.Version == version |
|
|
@ -342,7 +356,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
PartCode = groupItem.Max(t => t.PartCode), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
//发运
|
|
|
|
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
@ -374,7 +390,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SAQty = sa.Qty, |
|
|
|
SaCustomerPartCode = sa.CustomerPartCodeNoSpace, |
|
|
|
SaFactoryPartCode = sa.PartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
//无结算有发运
|
|
|
|
var notHaveSaHaveSeList = (from se in seGroup |
|
|
@ -413,7 +431,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SeFactoryPartCode = se.FactoryPartCode, |
|
|
|
SaCustomerPartCode = sa.CustomerPartCodeNoSpace, |
|
|
|
SaFactoryPartCode = sa.PartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
return haveSaHaveSeList.Union(haveSaNotHaveSeList).Union(notHaveSaHaveSeList).ToList(); |
|
|
|
} |
|
|
@ -435,7 +455,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate) |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
|
|
|
|
var saGroupByMappingType = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
@ -448,7 +470,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate) |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
var saGroupByVersion = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|
where sa.BusinessType == businessType && sa.Version == version |
|
|
@ -460,7 +484,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
Version = groupItem.Max(t => t.Version), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate) |
|
|
|
SettleDate = groupItem.Max(t => t.SettleDate), |
|
|
|
Site = groupItem.Max(t => t.Site), |
|
|
|
Price = groupItem.Max(t => t.Price) |
|
|
|
}; |
|
|
|
|
|
|
|
//发运
|
|
|
@ -494,7 +520,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SAQty = sa.Qty, |
|
|
|
SaCustomerPartCode = sa.LU, |
|
|
|
SaFactoryPartCode = sa.FactoryPartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
//无结算有发运
|
|
|
|
var notHaveSaHaveSeList = (from se in seGroup |
|
|
@ -535,7 +563,9 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
SeFactoryPartCode = se.FactoryPartCode, |
|
|
|
SaCustomerPartCode = sa.LU, |
|
|
|
SaFactoryPartCode = sa.FactoryPartCode, |
|
|
|
CustomerPartCode = sa.LU |
|
|
|
CustomerPartCode = sa.LU, |
|
|
|
Site = sa.Site, |
|
|
|
Price = sa.Price |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
var saGroupByPnPartCodeLu = from sa in _settleAccountDbContext.Set<PUB_SA_DETAIL>() |
|
|
|