Browse Source

1、同步发运数据调用寄售库 VinCode 赋值为 PN

2、发运、结算对比过滤掉Qty小于0的发运数据
master
mahao 1 year ago
parent
commit
136350ce42
  1. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs
  2. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  3. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs
  4. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs
  5. 86
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  6. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs

@ -92,7 +92,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
RealPartCode = t.RealPartCode, RealPartCode = t.RealPartCode,
Seq = t.Seq, Seq = t.Seq,
UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode, UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode,
VinCode = t.VinCode, VinCode = t.PN,
factory = t.Factory factory = t.Factory
}).ToList(); }).ToList();
var returnVmiLogList = returnSeDetails.Select(t => new VmiLog var returnVmiLogList = returnSeDetails.Select(t => new VmiLog
@ -157,7 +157,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
OrderNum = t.DeliveryIndex, OrderNum = t.DeliveryIndex,
Qty = t.Qty, Qty = t.Qty,
ReMark = t.Remark, ReMark = t.Remark,
RealPartCode = t.PartCode RealPartCode = t.PartCode,
VinCode = t.PN
}).ToList(); }).ToList();
var returnVmiLogList = returnSeDetails.Select(t => new VmiLog var returnVmiLogList = returnSeDetails.Select(t => new VmiLog
{ {

30
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs

@ -145,21 +145,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<BBAC_SE_DETAIL>() var seGroup = (from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>()
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime
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),
ToLoc = groupItem.Max(t => t.ToLoc), ToLoc = groupItem.Max(t => t.ToLoc),
ErpToLoc = groupItem.Max(t => t.ErpToLoc) ErpToLoc = groupItem.Max(t => t.ErpToLoc)
}; }).Where(t => t.Qty > 0M);
//Edi //Edi
var ediGroup = from edi in _settleAccountDbContext.Set<BBAC_SE_EDI>() var ediGroup = from edi in _settleAccountDbContext.Set<BBAC_SE_EDI>()
where edi.IsDeleted == false && edi.IsHaveSeData == true where edi.IsDeleted == false && edi.IsHaveSeData == true

31
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs

@ -16,6 +16,7 @@ using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount; using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ; using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Enums;
using Win.Sfs.SettleAccount.Reports; using Win.Sfs.SettleAccount.Reports;
namespace SettleAccount.Job.Services.Report namespace SettleAccount.Job.Services.Report
@ -139,21 +140,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<HBPO_SE_DETAIL>() var seGroup = (from se in _settleAccountDbContext.Set<HBPO_SE_DETAIL>()
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime
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),
ToLoc = groupItem.Max(t => t.ToLoc), ToLoc = groupItem.Max(t => t.ToLoc),
ErpToLoc = groupItem.Max(t => t.ErpToLoc) ErpToLoc = groupItem.Max(t => t.ErpToLoc)
}; }).Where(t => t.Qty > 0M);
//Edi //Edi
var ediGroup = from edi in _settleAccountDbContext.Set<HBPO_SE_EDI>() var ediGroup = from edi in _settleAccountDbContext.Set<HBPO_SE_EDI>()
where edi.IsDeleted == false && edi.IsHaveSeData == true where edi.IsDeleted == false && edi.IsHaveSeData == true

32
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs

@ -186,22 +186,22 @@ namespace SettleAccount.Job.Services.Report
CodeType = groupItem.Max(t => t.ProductionCodeType) CodeType = groupItem.Max(t => t.ProductionCodeType)
}; };
//发运 //发运
var seGroup = from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>() var seGroup = (from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>()
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime
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.ToLoc), ToLocCode = groupItem.Max(t => t.ToLoc),
ToErpLocCode = groupItem.Max(t => t.ErpToLoc), ToErpLocCode = groupItem.Max(t => t.ErpToLoc),
CodeType = groupItem.Max(t => t.CodeType) CodeType = groupItem.Max(t => t.CodeType)
}; }).Where(t => t.Qty > 0M);
//有结算无发运 //有结算无发运
var haveSaNotHaveSeList = (from sa in saGroupByMappingType var haveSaNotHaveSeList = (from sa in saGroupByMappingType

86
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -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

30
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs

@ -88,21 +88,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<TSeDetail>() var seGroup = (from se in _settleAccountDbContext.Set<TSeDetail>()
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime
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.ToLoc), ToLocCode = groupItem.Max(t => t.ToLoc),
ToErpLocCode = groupItem.Max(t => t.ErpToLoc) ToErpLocCode = groupItem.Max(t => t.ErpToLoc)
}; }).Where(t => t.Qty > 0M);
//有结算无发运 //有结算无发运
var haveSaNotHaveSeList = (from sa in saGroupByMappingType var haveSaNotHaveSeList = (from sa in saGroupByMappingType

Loading…
Cancel
Save