|
|
@ -222,21 +222,21 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
}; |
|
|
|
//发运
|
|
|
|
var seGroup = from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == businessType |
|
|
|
group se by new { se.PN, se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.PN, |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}; |
|
|
|
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == businessType |
|
|
|
group se by new { se.PN, se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.PN, |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}).Where(t => t.Qty > 0M); |
|
|
|
|
|
|
|
//有结算无发运
|
|
|
|
var haveSaNotHaveSeList = (from sa in saGroupByMappingType |
|
|
@ -345,20 +345,20 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
PartCode = groupItem.Max(t => t.PartCode) |
|
|
|
}; |
|
|
|
//发运
|
|
|
|
var seGroup = from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == EnumBusinessType.YinDuJian |
|
|
|
group se by new { se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}; |
|
|
|
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == EnumBusinessType.YinDuJian |
|
|
|
group se by new { se.CustomerPartCodeNoSpace } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.CustomerPartCodeNoSpace, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}).Where(t => t.Qty > 0M); |
|
|
|
|
|
|
|
//有结算无发运
|
|
|
|
var haveSaNotHaveSeList = (from sa in saGroupByMappingType |
|
|
@ -464,20 +464,20 @@ namespace SettleAccount.Job.Services.Report |
|
|
|
}; |
|
|
|
|
|
|
|
//发运
|
|
|
|
var seGroup = from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == businessType |
|
|
|
group se by new { se.PN, se.FactoryPartCode } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.PN, |
|
|
|
groupItem.Key.FactoryPartCode, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}; |
|
|
|
var seGroup = (from se in _settleAccountDbContext.Set<PUB_SE_DETAIL>() |
|
|
|
where se.BusinessType == businessType |
|
|
|
group se by new { se.PN, se.FactoryPartCode } into groupItem |
|
|
|
select new |
|
|
|
{ |
|
|
|
groupItem.Key.PN, |
|
|
|
groupItem.Key.FactoryPartCode, |
|
|
|
Qty = groupItem.Sum(t => t.Qty), |
|
|
|
LU = groupItem.Max(t => t.LU), |
|
|
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
|
|
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
|
|
|
ToLocCode = groupItem.Max(t => t.ToLocCode), |
|
|
|
ToErpLocCode = groupItem.Max(t => t.ToErpLocCode) |
|
|
|
}).Where(t => t.Qty > 0M); |
|
|
|
|
|
|
|
//有结算无发运
|
|
|
|
var haveSaNotHaveSeList = (from sa in saGroupByMappingType |
|
|
|