diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs index c3b31845..9e381997 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs +++ b/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, Seq = t.Seq, UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode, - VinCode = t.VinCode, + VinCode = t.PN, factory = t.Factory }).ToList(); var returnVmiLogList = returnSeDetails.Select(t => new VmiLog @@ -157,7 +157,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs OrderNum = t.DeliveryIndex, Qty = t.Qty, ReMark = t.Remark, - RealPartCode = t.PartCode + RealPartCode = t.PartCode, + VinCode = t.PN }).ToList(); var returnVmiLogList = returnSeDetails.Select(t => new VmiLog { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs index 10114629..b80351cd 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs +++ b/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), }; //发运 - var seGroup = from se in _settleAccountDbContext.Set() - where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime - 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), - ToLoc = groupItem.Max(t => t.ToLoc), - ErpToLoc = groupItem.Max(t => t.ErpToLoc) - }; + var seGroup = (from se in _settleAccountDbContext.Set() + where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime + 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), + ToLoc = groupItem.Max(t => t.ToLoc), + ErpToLoc = groupItem.Max(t => t.ErpToLoc) + }).Where(t => t.Qty > 0M); //Edi var ediGroup = from edi in _settleAccountDbContext.Set() where edi.IsDeleted == false && edi.IsHaveSeData == true diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs index 0d616cc8..79b24b83 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs +++ b/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.SettleAccount; using Win.Sfs.SettleAccount.Entities.BQ; +using Win.Sfs.SettleAccount.Enums; using Win.Sfs.SettleAccount.Reports; namespace SettleAccount.Job.Services.Report @@ -139,21 +140,21 @@ namespace SettleAccount.Job.Services.Report PartCode = groupItem.Max(t => t.PartCode), }; //发运 - var seGroup = from se in _settleAccountDbContext.Set() - where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime - 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), - ToLoc = groupItem.Max(t => t.ToLoc), - ErpToLoc = groupItem.Max(t => t.ErpToLoc) - }; + var seGroup = (from se in _settleAccountDbContext.Set() + where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime + 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), + ToLoc = groupItem.Max(t => t.ToLoc), + ErpToLoc = groupItem.Max(t => t.ErpToLoc) + }).Where(t => t.Qty > 0M); //Edi var ediGroup = from edi in _settleAccountDbContext.Set() where edi.IsDeleted == false && edi.IsHaveSeData == true diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs index 45347853..305e2861 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/MaiDanBBACSaSeCompareExportService.cs +++ b/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) }; //发运 - var seGroup = from se in _settleAccountDbContext.Set() - where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime - 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.ToLoc), - ToErpLocCode = groupItem.Max(t => t.ErpToLoc), - CodeType = groupItem.Max(t => t.CodeType) - }; + var seGroup = (from se in _settleAccountDbContext.Set() + where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime + 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.ToLoc), + ToErpLocCode = groupItem.Max(t => t.ErpToLoc), + CodeType = groupItem.Max(t => t.CodeType) + }).Where(t => t.Qty > 0M); //有结算无发运 var haveSaNotHaveSeList = (from sa in saGroupByMappingType diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs index dab85f7e..b4708358 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs +++ b/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) }; //发运 - var seGroup = from se in _settleAccountDbContext.Set() - 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() + 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() - 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() + 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() - 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() + 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 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs index 7dd578aa..0e516dde 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeCompareExportBaseService.cs +++ b/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) }; //发运 - var seGroup = from se in _settleAccountDbContext.Set() - where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime - 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.ToLoc), - ToErpLocCode = groupItem.Max(t => t.ErpToLoc) - }; + var seGroup = (from se in _settleAccountDbContext.Set() + where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime + 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.ToLoc), + ToErpLocCode = groupItem.Max(t => t.ErpToLoc) + }).Where(t => t.Qty > 0M); //有结算无发运 var haveSaNotHaveSeList = (from sa in saGroupByMappingType