|
|
|
@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Myshipping.Application.Entity;
|
|
|
|
|
using Myshipping.Application.Helper;
|
|
|
|
|
using Myshipping.Application.Service.BookingOrder.Dto;
|
|
|
|
|
using Myshipping.Core;
|
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
|
|
@ -286,7 +287,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsShowDto, ParaGoodsInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraGoodsInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
var entities = await _paraGoodsInfoRepository.AsQueryable()
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCode), t => t.GOODS_CODE.Contains(QuerySearch.GoodsCode.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsNameCN), t => t.GOODS_NAME_CN.Contains(QuerySearch.GoodsNameCN.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
|
|
|
|
@ -300,14 +301,9 @@ namespace Myshipping.Application
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.UpdateUserName), t => t.UpdatedUserName.Contains(QuerySearch.UpdateUserName.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " asc " : " desc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return new
|
|
|
|
|
{
|
|
|
|
|
PageNo = entities.PageIndex,
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<ParaGoodsShowDto>>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -556,7 +552,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsCategoryShowDto, ParaGoodsCategoryInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraGoodsCategoryInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
var entities = await _paraGoodsCategoryInfoRepository.AsQueryable()
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategory), t => t.GOODS_CATEGORY.Contains(QuerySearch.GoodsCategory.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategoryName), t => t.GOODS_CATEGORY_NAME.Contains(QuerySearch.GoodsCategoryName.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(createBegin != DateTime.MinValue, t => t.CreatedTime.HasValue && t.CreatedTime.Value >= createBegin)
|
|
|
|
@ -567,14 +563,8 @@ namespace Myshipping.Application
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.UpdateUserName), t => t.UpdatedUserName.Contains(QuerySearch.UpdateUserName.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " asc " : " desc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return new
|
|
|
|
|
{
|
|
|
|
|
PageNo = entities.PageIndex,
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsCategoryShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<ParaGoodsCategoryShowDto>>();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -813,7 +803,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaContractNoShowDto, ParaContractNoInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraContractNoInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
var entities = await _paraContractNoInfoRepository.AsQueryable()
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNo), t => t.CONTRACT_NO.Contains(QuerySearch.ContractNo.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractName), t => t.CONTRACT_NAME.Contains(QuerySearch.ContractName.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNote), t => t.CONTRACT_NOTE.Contains(QuerySearch.ContractNote.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
@ -825,14 +815,8 @@ namespace Myshipping.Application
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.UpdateUserName), t => t.UpdatedUserName.Contains(QuerySearch.UpdateUserName.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " asc " : " desc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return new
|
|
|
|
|
{
|
|
|
|
|
PageNo = entities.PageIndex,
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaContractNoShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<ParaContractNoShowDto>>();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|