Browse Source

启用查询

master
学 赵 1 year ago
parent
commit
4fb449fa20
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 19
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  3. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs

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

@ -238,8 +238,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
input.Filters.Remove(entiy);
}
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 dtos = ObjectMapper.Map<List<PriceList>, List<PriceListDto>>(entities);

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

@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Prices
@ -206,6 +207,24 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
[HttpPost]
public async Task<PagedResultDto<PriceListBJDto>> 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 _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<PriceListBJ>, List<PriceListBJDto>>(entities);

18
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceYinDu.cs

@ -17,6 +17,7 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Prices
@ -201,6 +202,23 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
[HttpPost]
public async Task<PagedResultDto<PriceListYinDuDto>> 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 _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<PriceListYinDu>, List<PriceListYinDuDto>>(entities);

Loading…
Cancel
Save