diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 8cecc27c..c6045b1f 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -9987,32 +9987,32 @@ 测试1 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 @@ -10032,32 +10032,32 @@ 品名分类名称 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 @@ -10104,32 +10104,32 @@ 红酒 - + 创建时间 - + 更新时间 - + 创建者Id - + 创建者名称 - + 修改者Id - + 修改者名称 diff --git a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs index 6ba7a685..6532cb27 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaContractNoDto.cs @@ -31,7 +31,11 @@ namespace Myshipping.Application /// /// 测试1 public string ContractNote { get; set; } + } + + public class ParaContractNoShowDto: ParaContractNoDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs index e0dd2320..5b00dffd 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaDtoMapper.cs @@ -14,6 +14,16 @@ namespace Myshipping.Application public void Register(TypeAdapterConfig config) { config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.GoodsCode, src => src.GOODS_CODE) + .Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN) + .Map(dest => dest.GoodsNameEN, src => src.GOODS_NAME_EN) + .Map(dest => dest.GoodsDesp, src => src.GOODS_DESP) + .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) + .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME); + + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.GoodsCode, src => src.GOODS_CODE) .Map(dest => dest.GoodsNameCN, src => src.GOODS_NAME_CN) @@ -39,6 +49,11 @@ namespace Myshipping.Application config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) + .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME); + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY) .Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME) @@ -57,6 +72,12 @@ namespace Myshipping.Application config.ForType() + .Map(dest => dest.Id, src => src.Id) + .Map(dest => dest.ContractNo, src => src.CONTRACT_NO) + .Map(dest => dest.ContractName, src => src.CONTRACT_NAME) + .Map(dest => dest.ContractNote, src => src.CONTRACT_NOTE); + + config.ForType() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ContractNo, src => src.CONTRACT_NO) .Map(dest => dest.ContractName, src => src.CONTRACT_NAME) diff --git a/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs b/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs index 911318d7..205fbab4 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaGoodsCategoryDto.cs @@ -23,7 +23,10 @@ namespace Myshipping.Application /// 品名分类名称 /// public string GoodsCategoryName { get; set; } + } + public class ParaGoodsCategoryShowDto: ParaGoodsCategoryDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs b/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs index d4488546..0468523d 100644 --- a/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs +++ b/Myshipping.Application/Service/Para/Dto/ParaGoodsDto.cs @@ -51,7 +51,11 @@ namespace Myshipping.Application /// /// 红酒 public string GoodsCategoryName { get; set; } + } + + public class ParaGoodsShowDto: ParaGoodsDto + { /// /// 创建时间 /// diff --git a/Myshipping.Application/Service/Para/Interface/IParaService.cs b/Myshipping.Application/Service/Para/Interface/IParaService.cs index 98357c8f..aced3e8e 100644 --- a/Myshipping.Application/Service/Para/Interface/IParaService.cs +++ b/Myshipping.Application/Service/Para/Interface/IParaService.cs @@ -27,7 +27,7 @@ namespace Myshipping.Application /// /// 品名主键 /// 返回回执 - Task GetParaGoodsInfo(long Id); + Task GetParaGoodsInfo(long Id); /// /// 检索品名参数 @@ -35,7 +35,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QueryParaGoodsInfo(string queryItem, int top = 10); + Task> QueryParaGoodsInfo(string queryItem, int top = 10); /// /// 品名参数台账查询 @@ -56,7 +56,7 @@ namespace Myshipping.Application /// /// 品名分类主键 /// 返回回执 - Task GetParaGoodsCategoryInfo(long Id); + Task GetParaGoodsCategoryInfo(long Id); /// /// 检索品名分类参数 @@ -64,7 +64,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QueryParaGoodsCategoryInfo(string queryItem, int top = 10); + Task> QueryParaGoodsCategoryInfo(string queryItem, int top = 10); /// /// 作废品名分类参数 @@ -93,7 +93,7 @@ namespace Myshipping.Application /// /// 约号主键 /// 返回回执 - Task GetParaContractNoInfo(long Id); + Task GetParaContractNoInfo(long Id); /// /// 检索约号参数 @@ -101,7 +101,7 @@ namespace Myshipping.Application /// 检索值 /// 默认最大行数 /// 返回回执 - Task> QuerytParaContractNoInfo(string queryItem, int top = 10); + Task> QuerytParaContractNoInfo(string queryItem, int top = 10); /// /// 作废约号参数 diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs index 2a4af5bf..c52ac215 100644 --- a/Myshipping.Application/Service/Para/ParaService.cs +++ b/Myshipping.Application/Service/Para/ParaService.cs @@ -170,9 +170,9 @@ namespace Myshipping.Application /// 品名主键 /// 返回回执 [HttpGet("/Para/GetParaGoodsInfo")] - public async Task GetParaGoodsInfo([FromQuery]long Id) + public async Task GetParaGoodsInfo([FromQuery]long Id) { - ParaGoodsDto model = null; + ParaGoodsShowDto model = null; try { @@ -182,7 +182,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取品名参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -200,9 +200,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QueryParaGoodsInfo")] - public async Task> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); 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()).ToList(); + list = goodsList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -281,7 +281,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(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()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } @@ -376,9 +376,9 @@ namespace Myshipping.Application /// 品名分类主键 /// 返回回执 [HttpGet("/Para/GetParaGoodsCategoryInfo")] - public async Task GetParaGoodsCategoryInfo(long Id) + public async Task GetParaGoodsCategoryInfo(long Id) { - ParaGoodsCategoryDto model = null; + ParaGoodsCategoryShowDto model = null; try { @@ -388,7 +388,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取品名分类参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -406,9 +406,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QueryParaGoodsCategoryInfo")] - public async Task> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QueryParaGoodsCategoryInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); 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()).ToList(); + list = currList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -549,7 +549,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(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()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } #endregion @@ -633,9 +633,9 @@ namespace Myshipping.Application /// 约号主键 /// 返回回执 [HttpGet("/Para/GetParaContractNoInfo")] - public async Task GetParaContractNoInfo(long Id) + public async Task GetParaContractNoInfo(long Id) { - ParaContractNoDto model = null; + ParaContractNoShowDto model = null; try { @@ -645,7 +645,7 @@ namespace Myshipping.Application throw Oops.Oh($"获取约号参数失败"); - model = info.Adapt(); + model = info.Adapt(); } catch (Exception ex) @@ -665,9 +665,9 @@ namespace Myshipping.Application /// 默认最大行数 /// 返回回执 [HttpGet("/Para/QuerytParaContractNoInfo")] - public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) + public async Task> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10) { - List list = new List(); + List list = new List(); 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()).ToList(); + list = currList.Select(t => t.Adapt()).ToList(); } catch (Exception ex) @@ -803,7 +803,7 @@ namespace Myshipping.Application //这里因为返回给前端的台账数据是DTO,所以这里排序时候需要转换成Entity对应的字段 if (!string.IsNullOrWhiteSpace(QuerySearch.SortField)) - entityOrderCol = MapsterExtHelper.GetAdaptProperty(QuerySearch.SortField); + entityOrderCol = MapsterExtHelper.GetAdaptProperty(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()).ToList() + Rows = entities.Items.Select(t => t.Adapt()).ToList() }; } #endregion