|
|
|
@ -170,9 +170,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="Id">品名主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/GetParaGoodsInfo")]
|
|
|
|
|
public async Task<ParaGoodsDto> GetParaGoodsInfo([FromQuery]long Id)
|
|
|
|
|
public async Task<ParaGoodsShowDto> GetParaGoodsInfo([FromQuery]long Id)
|
|
|
|
|
{
|
|
|
|
|
ParaGoodsDto model = null;
|
|
|
|
|
ParaGoodsShowDto model = null;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -182,7 +182,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Oh($"获取品名参数失败");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model = info.Adapt<ParaGoodsDto>();
|
|
|
|
|
model = info.Adapt<ParaGoodsShowDto>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -200,9 +200,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="top">默认最大行数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/QueryParaGoodsInfo")]
|
|
|
|
|
public async Task<List<ParaGoodsDto>> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
public async Task<List<ParaGoodsShowDto>> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
{
|
|
|
|
|
List<ParaGoodsDto> list = new List<ParaGoodsDto>();
|
|
|
|
|
List<ParaGoodsShowDto> list = new List<ParaGoodsShowDto>();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -224,7 +224,7 @@ namespace Myshipping.Application
|
|
|
|
|
var goodsList = await query.Take(top).ToListAsync();
|
|
|
|
|
|
|
|
|
|
if (goodsList.Count > 0)
|
|
|
|
|
list = goodsList.Select(t => t.Adapt<ParaGoodsDto>()).ToList();
|
|
|
|
|
list = goodsList.Select(t => t.Adapt<ParaGoodsShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -281,7 +281,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsDto, ParaGoodsInfo>(QuerySearch.SortField);
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsShowDto, ParaGoodsInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraGoodsInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCode), t => t.GOODS_CODE.Contains(QuerySearch.GoodsCode.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
@ -303,7 +303,7 @@ namespace Myshipping.Application
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsDto>()).ToList()
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -376,9 +376,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="Id">品名分类主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/GetParaGoodsCategoryInfo")]
|
|
|
|
|
public async Task<ParaGoodsCategoryDto> GetParaGoodsCategoryInfo(long Id)
|
|
|
|
|
public async Task<ParaGoodsCategoryShowDto> GetParaGoodsCategoryInfo(long Id)
|
|
|
|
|
{
|
|
|
|
|
ParaGoodsCategoryDto model = null;
|
|
|
|
|
ParaGoodsCategoryShowDto model = null;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -388,7 +388,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Oh($"获取品名分类参数失败");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model = info.Adapt<ParaGoodsCategoryDto>();
|
|
|
|
|
model = info.Adapt<ParaGoodsCategoryShowDto>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -406,9 +406,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="top">默认最大行数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/QueryParaGoodsCategoryInfo")]
|
|
|
|
|
public async Task<List<ParaGoodsCategoryDto>> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
public async Task<List<ParaGoodsCategoryShowDto>> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
{
|
|
|
|
|
List<ParaGoodsCategoryDto> list = new List<ParaGoodsCategoryDto>();
|
|
|
|
|
List<ParaGoodsCategoryShowDto> list = new List<ParaGoodsCategoryShowDto>();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -427,7 +427,7 @@ namespace Myshipping.Application
|
|
|
|
|
var currList = await query.Take(top).ToListAsync();
|
|
|
|
|
|
|
|
|
|
if (currList.Count > 0)
|
|
|
|
|
list = currList.Select(t => t.Adapt<ParaGoodsCategoryDto>()).ToList();
|
|
|
|
|
list = currList.Select(t => t.Adapt<ParaGoodsCategoryShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -549,7 +549,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsCategoryDto, ParaGoodsCategoryInfo>(QuerySearch.SortField);
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaGoodsCategoryShowDto, ParaGoodsCategoryInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraGoodsCategoryInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.GoodsCategory), t => t.GOODS_CATEGORY.Contains(QuerySearch.GoodsCategory.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
@ -568,7 +568,7 @@ namespace Myshipping.Application
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsCategoryDto>()).ToList()
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaGoodsCategoryShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
@ -633,9 +633,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="Id">约号主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/GetParaContractNoInfo")]
|
|
|
|
|
public async Task<ParaContractNoDto> GetParaContractNoInfo(long Id)
|
|
|
|
|
public async Task<ParaContractNoShowDto> GetParaContractNoInfo(long Id)
|
|
|
|
|
{
|
|
|
|
|
ParaContractNoDto model = null;
|
|
|
|
|
ParaContractNoShowDto model = null;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -645,7 +645,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Oh($"获取约号参数失败");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model = info.Adapt<ParaContractNoDto>();
|
|
|
|
|
model = info.Adapt<ParaContractNoShowDto>();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -665,9 +665,9 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="top">默认最大行数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/QuerytParaContractNoInfo")]
|
|
|
|
|
public async Task<List<ParaContractNoDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
public async Task<List<ParaContractNoShowDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
{
|
|
|
|
|
List<ParaContractNoDto> list = new List<ParaContractNoDto>();
|
|
|
|
|
List<ParaContractNoShowDto> list = new List<ParaContractNoShowDto>();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -687,7 +687,7 @@ namespace Myshipping.Application
|
|
|
|
|
var currList = await query.Take(top).ToListAsync();
|
|
|
|
|
|
|
|
|
|
if (currList.Count > 0)
|
|
|
|
|
list = currList.Select(t => t.Adapt<ParaContractNoDto>()).ToList();
|
|
|
|
|
list = currList.Select(t => t.Adapt<ParaContractNoShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
@ -803,7 +803,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(QuerySearch.SortField))
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaContractNoDto, ParaContractNoInfo>(QuerySearch.SortField);
|
|
|
|
|
entityOrderCol = MapsterExtHelper.GetAdaptProperty<ParaContractNoShowDto, ParaContractNoInfo>(QuerySearch.SortField);
|
|
|
|
|
|
|
|
|
|
var entities = await _paraContractNoInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.ContractNo), t => t.CONTRACT_NO.Contains(QuerySearch.ContractNo.Trim(), StringComparison.OrdinalIgnoreCase))
|
|
|
|
@ -823,7 +823,7 @@ namespace Myshipping.Application
|
|
|
|
|
PageSize = entities.PageSize,
|
|
|
|
|
TotalPage = entities.TotalPages,
|
|
|
|
|
TotalRows = entities.TotalCount,
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaContractNoDto>()).ToList()
|
|
|
|
|
Rows = entities.Items.Select(t => t.Adapt<ParaContractNoShowDto>()).ToList()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|