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