|
|
@ -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<List<string>> GenerateSettlementOrder(List<PUB_NOT_SA_DETAIL> p_list) |
|
|
|
{ |
|
|
|
if (p_list.Count > 0) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("查询无数据不能生成可结算单","400"); |
|
|
|
} |
|
|
|
var first = p_list.FirstOrDefault(); |
|
|
|
List<string> errors = new List<string>(); |
|
|
|
var entityList = new List<PUB_CAN_SA_DETAIL>(); |
|
|
@ -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 |
|
|
|