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