Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
8a6dd293e2
  1. 19
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

19
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -20,6 +20,7 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Prices namespace Win.Sfs.SettleAccount.Entities.Prices
@ -221,6 +222,24 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
[HttpPost] [HttpPost]
public async Task<PagedResultDto<PriceListDto>> GetListAsync(RequestDto input) public async Task<PagedResultDto<PriceListDto>> GetListAsync(RequestDto input)
{ {
var ls = input.Filters.Where(p => p.Column == "codeType").ToList();
if (ls.Count > 0)
{
var entiy = input.Filters.Where(p => p.Column == "codeType").FirstOrDefault();
var value = entiy.Value;
if (value == "03")
{
input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "true" });
}
else
{
input.Filters.Add(new Shared.Filter.FilterCondition() { Column = "iscancel", Action = EnumFilterAction.Equal, Logic = EnumFilterLogic.And, Value = "false" });
}
input.Filters.Remove(entiy);
}
var entities = await _priceListRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); var entities = await _priceListRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
var totalCount = await _priceListRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var totalCount = await _priceListRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<PriceList>, List<PriceListDto>>(entities); var dtos = ObjectMapper.Map<List<PriceList>, List<PriceListDto>>(entities);

Loading…
Cancel
Save