diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs index 43f6a895..8f0c42e4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs @@ -101,8 +101,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs entity.SettleBillNum = string.Empty; entity.Site = "1040"; entity.BusinessType = EnumBusinessType.JisBBAC; - billList.Add(entity); - + billList.Add(entity); foreach (var itm in bbac_can_list) { var _detailEntity = new BBAC_CAN_SA_DETAIL( diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs index fe61a306..74cf80f9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs @@ -6,6 +6,7 @@ using EFCore.BulkExtensions; using Microsoft.EntityFrameworkCore; using NPOI.SS.Formula.Functions; using SettleAccount.Domain.BQ; +using Volo.Abp; using Volo.Abp.Domain.Services; using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases.DomainServices; @@ -77,7 +78,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers public virtual async Task> GenerateSettlementOrder(List p_list) { - + if (p_list.Count > 0) + { + throw new UserFriendlyException("查询无数据不能生成可结算单", "400"); + } var first = p_list.FirstOrDefault(); List errors = new List(); //var priceErrors = await _service.CheckPriceList(p_list, first.Site).ConfigureAwait(false); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs index 18d7eb43..323ed657 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs @@ -5,6 +5,7 @@ using System.Security.Policy; using System.Threading.Tasks; using EFCore.BulkExtensions; using SettleAccount.Domain.BQ; +using Volo.Abp; using Volo.Abp.Domain.Services; using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases.DomainServices; @@ -50,6 +51,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers } public virtual async Task> GenerateSettlementOrder(List p_list) { + if (p_list.Count > 0) + { + throw new UserFriendlyException("查询无数据不能生成可结算单", "400"); + } var first = p_list.FirstOrDefault(); List errors = new List(); var priceErrors = await _service.CheckPriceList(p_list, first.Site).ConfigureAwait(false); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs index f682e415..e8be0fc0 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using EFCore.BulkExtensions; using Microsoft.EntityFrameworkCore; using SettleAccount.Domain.BQ; +using Volo.Abp; using Volo.Abp.Data; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Services; @@ -60,6 +61,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers } public virtual async Task> GenerateSettlementOrder(List p_list) { + if (p_list.Count > 0) + { + throw new UserFriendlyException("查询无数据不能生成可结算单","400"); + } var first = p_list.FirstOrDefault(); List errors = new List(); var entityList = new List(); @@ -104,7 +109,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers var notlist = _notRepository.Where(p => ls.Contains(p.GroupNum) && p.BusinessType==first.BusinessType).ToList();//JIT_ASN整发 if (first.BusinessType == EnumBusinessType.ZhiGongJianBBAC) { - var subqueryA = (from a in notlist where a.BusinessType == first.BusinessType group a by new { a.GroupNum, a.SettleBillNum, a.Version, a.Site } into groupedData diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs index ff5c9828..a86c2d07 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs @@ -27,6 +27,9 @@ namespace Win.Sfs.SettleAccount /// [Display(Name = "直供件BBAC")] ZhiGongJianBBAC = 3, + + + /// /// 直供件HBPO ///