mahao 1 year ago
parent
commit
0872a6098e
  1. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core; using System.Linq.Dynamic.Core;
using System.Security.Policy;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
@ -153,7 +154,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
[HttpPost] [HttpPost]
public async Task<PagedResultDto<PUB_SA_DTO>> GetListAsync(PUB_SARequestDto input) public async Task<PagedResultDto<PUB_SA_DTO>> GetListAsync(PUB_SARequestDto input)
{ {
input.Filters.RemoveAll(t => t.Column.ToLower() == "site");
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<PUB_SA>, List<PUB_SA_DTO>>(entities); var dtos = ObjectMapper.Map<List<PUB_SA>, List<PUB_SA_DTO>>(entities);
@ -451,6 +451,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
EnumBusinessType.YinDuJian => "1040", EnumBusinessType.YinDuJian => "1040",
_ => throw new UserFriendlyException($"业务编码错误", "400") _ => throw new UserFriendlyException($"业务编码错误", "400")
}; };
site = clientCode;
if (businessType == EnumBusinessType.BeiJian) if (businessType == EnumBusinessType.BeiJian)
{ {
@ -526,7 +527,8 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
BillNum = pubSaBillNum, BillNum = pubSaBillNum,
State = "0", State = "0",
BusinessType = pubSaFirstDetail.BusinessType, BusinessType = pubSaFirstDetail.BusinessType,
Version = pubSaFirstDetail.Version Version = pubSaFirstDetail.Version,
Site = site
}; };
//可结算单号 //可结算单号
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C"); var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C");
@ -538,13 +540,15 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
SettleBillNum = pubSaBillNum, SettleBillNum = pubSaBillNum,
State = SettleBillState., State = SettleBillState.,
BusinessType = pubSa.BusinessType, BusinessType = pubSa.BusinessType,
Version = pubSa.Version Version = pubSa.Version,
Site = site
}; };
#region 入库数据赋值 #region 入库数据赋值
pubSaDetails.ForEach(pubSaDetail => pubSaDetails.ForEach(pubSaDetail =>
{ {
pubSaDetail.BillNum = pubSaBillNum; pubSaDetail.BillNum = pubSaBillNum;
pubSaDetail.Site = site;
}); });
//不可结算 结算分组号码(根据价格区分结算、不可结算) //不可结算 结算分组号码(根据价格区分结算、不可结算)
var pubNotSaGroupNums = pubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct(); var pubNotSaGroupNums = pubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct();

Loading…
Cancel
Save