完成品名参数的增、删、改,单票查询和模糊检索

optimize
jianghaiqing 2 years ago
parent e2c2ae7bc6
commit 67e282da05

@ -9756,6 +9756,235 @@
租户ID 租户ID
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Application.ParaContractNoDto.Id">
<summary>
主键
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.ContractNo">
<summary>
合约号编号
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.ContractName">
<summary>
合约号名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.ContractNote">
<summary>
合约号备注
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.UpdateTime">
<summary>
更新时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.CreateUserId">
<summary>
创建者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.CreateUserName">
<summary>
创建者名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.UpdateUserId">
<summary>
修改者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaContractNoDto.UpdateUserName">
<summary>
修改者名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.Id">
<summary>
主键
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.GoodsCategory">
<summary>
品名分类代码
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.GoodsCategoryName">
<summary>
品名分类名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.UpdateTime">
<summary>
更新时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.CreateUserId">
<summary>
创建者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.CreateUserName">
<summary>
创建者名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.UpdateUserId">
<summary>
修改者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsCategoryDto.UpdateUserName">
<summary>
修改者名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.Id">
<summary>
主键
</summary>
<example>358942162968645</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsCode">
<summary>
品名编码
</summary>
<example>HJ1</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsNameCN">
<summary>
品名中文
</summary>
<example>红酒</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsNameEN">
<summary>
品名英文
</summary>
<example>wine</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsDesp">
<summary>
品名描述
</summary>
<example>红酒500ml</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsCategory">
<summary>
品名分类
</summary>
<example>02</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.GoodsCategoryName">
<summary>
品名分类名称
</summary>
<example>红酒</example>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.UpdateTime">
<summary>
更新时间
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.CreateUserId">
<summary>
创建者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.CreateUserName">
<summary>
创建者名称
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.UpdateUserId">
<summary>
修改者Id
</summary>
</member>
<member name="P:Myshipping.Application.ParaGoodsDto.UpdateUserName">
<summary>
修改者名称
</summary>
</member>
<member name="M:Myshipping.Application.IParaService.SaveParaGoodsInfo(Myshipping.Application.ParaGoodsDto)">
<summary>
保存品名参数
</summary>
<param name="model">品名参数</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.IParaService.DeleteParaGoodsInfo(System.Int64[])">
<summary>
作废品名参数
</summary>
<param name="Ids">品名参数主键数组</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.IParaService.GetParaGoodsInfo(System.Int64)">
<summary>
主键获取品名参数
</summary>
<param name="Id">品名主键</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.IParaService.QueryParaGoodsInfo(System.String,System.Int32)">
<summary>
检索品名参数
</summary>
<param name="queryItem">检索值</param>
<returns>返回回执</returns>
</member>
<member name="T:Myshipping.Application.ParaService">
<summary>
</summary>
</member>
<member name="M:Myshipping.Application.ParaService.SaveParaGoodsInfo(Myshipping.Application.ParaGoodsDto)">
<summary>
保存品名参数
</summary>
<param name="model">品名参数</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.ParaService.DeleteParaGoodsInfo(System.Int64[])">
<summary>
作废品名参数
</summary>
<param name="Ids">品名参数主键数组</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.ParaService.GetParaGoodsInfo(System.Int64)">
<summary>
主键获取品名参数
</summary>
<param name="Id">品名主键</param>
<returns>返回回执</returns>
</member>
<member name="M:Myshipping.Application.ParaService.QueryParaGoodsInfo(System.String,System.Int32)">
<summary>
检索品名参数
</summary>
<param name="queryItem">检索值</param>
<param name="top">默认最大行数</param>
<returns>返回回执</returns>
</member>
<member name="P:Myshipping.Application.RulesEngineOrderBookingContaCargoInfo.PKGs"> <member name="P:Myshipping.Application.RulesEngineOrderBookingContaCargoInfo.PKGs">
<summary> <summary>
件数 件数

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class ParaContractNoDto
{
/// <summary>
/// 主键
/// </summary>
public string Id{ get; set; }
/// <summary>
/// 合约号编号
/// </summary>
public string ContractNo { get; set; }
/// <summary>
/// 合约号名称
/// </summary>
public string ContractName { get; set; }
/// <summary>
/// 合约号备注
/// </summary>
public string ContractNote { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 创建者Id
/// </summary>
public long CreateUserId { get; set; }
/// <summary>
/// 创建者名称
/// </summary>
public string CreateUserName { get; set; }
/// <summary>
/// 修改者Id
/// </summary>
public long UpdateUserId { get; set; }
/// <summary>
/// 修改者名称
/// </summary>
public string UpdateUserName { get; set; }
}
}

@ -0,0 +1,79 @@
using Mapster;
using Myshipping.Application.Entity;
using StackExchange.Profiling.Internal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class ParaDtoMapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType<ParaGoodsInfo, ParaGoodsDto>()
.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)
.Map(dest => dest.CreateUserId, src => src.CreatedUserId)
.Map(dest => dest.CreateUserName, src => src.CreatedUserName)
.Map(dest => dest.CreateTime, src => src.CreatedTime)
.Map(dest => dest.UpdateUserId, src => src.UpdatedUserId)
.Map(dest => dest.UpdateUserName, src => src.UpdatedUserName)
.Map(dest => dest.UpdateTime, src => src.UpdatedTime);
config.ForType<ParaGoodsDto, ParaGoodsInfo>()
.Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0)
.Map(dest => dest.GOODS_CODE, src => src.GoodsCode)
.Map(dest => dest.GOODS_NAME_CN, src => src.GoodsNameCN)
.Map(dest => dest.GOODS_NAME_EN, src => src.GoodsNameEN)
.Map(dest => dest.GOODS_DESP, src => src.GoodsDesp)
.Map(dest => dest.GOODS_CATEGORY, src => src.GoodsCategory)
.Map(dest => dest.GOODS_CATEGORY_NAME, src => src.GoodsCategoryName);
config.ForType<ParaGoodsCategoryInfo, ParaGoodsCategoryDto>()
.Map(dest => dest.Id, src => src.Id)
.Map(dest => dest.GoodsCategory, src => src.GOODS_CATEGORY)
.Map(dest => dest.GoodsCategoryName, src => src.GOODS_CATEGORY_NAME)
.Map(dest => dest.CreateUserId, src => src.CreatedUserId)
.Map(dest => dest.CreateUserName, src => src.CreatedUserName)
.Map(dest => dest.CreateTime, src => src.CreatedTime)
.Map(dest => dest.UpdateUserId, src => src.UpdatedUserId)
.Map(dest => dest.UpdateUserName, src => src.UpdatedUserName)
.Map(dest => dest.UpdateTime, src => src.UpdatedTime);
config.ForType<ParaGoodsCategoryDto, ParaGoodsCategoryInfo>()
.Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0)
.Map(dest => dest.GOODS_CATEGORY, src => src.GoodsCategory)
.Map(dest => dest.GOODS_CATEGORY_NAME, src => src.GoodsCategoryName);
config.ForType<ParaContractNoInfo, ParaContractNoDto>()
.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)
.Map(dest => dest.CreateUserId, src => src.CreatedUserId)
.Map(dest => dest.CreateUserName, src => src.CreatedUserName)
.Map(dest => dest.CreateTime, src => src.CreatedTime)
.Map(dest => dest.UpdateUserId, src => src.UpdatedUserId)
.Map(dest => dest.UpdateUserName, src => src.UpdatedUserName)
.Map(dest => dest.UpdateTime, src => src.UpdatedTime);
config.ForType<ParaContractNoDto, ParaContractNoInfo>()
.Map(dest => dest.Id, src => !string.IsNullOrWhiteSpace(src.Id) ? long.Parse(src.Id) : 0)
.Map(dest => dest.CONTRACT_NO, src => src.ContractNo)
.Map(dest => dest.CONTRACT_NAME, src => src.ContractName)
.Map(dest => dest.CONTRACT_NOTE, src => src.ContractNote);
}
}
}

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class ParaGoodsCategoryDto
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
/// <summary>
/// 品名分类代码
/// </summary>
public string GoodsCategory { get; set; }
/// <summary>
/// 品名分类名称
/// </summary>
public string GoodsCategoryName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 创建者Id
/// </summary>
public long CreateUserId { get; set; }
/// <summary>
/// 创建者名称
/// </summary>
public string CreateUserName { get; set; }
/// <summary>
/// 修改者Id
/// </summary>
public long UpdateUserId { get; set; }
/// <summary>
/// 修改者名称
/// </summary>
public string UpdateUserName { get; set; }
}
}

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class ParaGoodsDto
{
/// <summary>
/// 主键
/// </summary>
/// <example>358942162968645</example>
public string Id { get; set; }
/// <summary>
/// 品名编码
/// </summary>
/// <example>HJ1</example>
[Required(ErrorMessage = "品名编码不能为空")]
public string GoodsCode { get; set; }
/// <summary>
/// 品名中文
/// </summary>
/// <example>红酒</example>
public string GoodsNameCN { get; set; }
/// <summary>
/// 品名英文
/// </summary>
/// <example>wine</example>
public string GoodsNameEN { get; set; }
/// <summary>
/// 品名描述
/// </summary>
/// <example>红酒500ml</example>
public string GoodsDesp { get; set; }
/// <summary>
/// 品名分类
/// </summary>
/// <example>02</example>
public string GoodsCategory { get; set; }
/// <summary>
/// 品名分类名称
/// </summary>
/// <example>红酒</example>
public string GoodsCategoryName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 创建者Id
/// </summary>
public long CreateUserId { get; set; }
/// <summary>
/// 创建者名称
/// </summary>
public string CreateUserName { get; set; }
/// <summary>
/// 修改者Id
/// </summary>
public long UpdateUserId { get; set; }
/// <summary>
/// 修改者名称
/// </summary>
public string UpdateUserName { get; set; }
}
}

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public interface IParaService
{
/// <summary>
/// 保存品名参数
/// </summary>
/// <param name="model">品名参数</param>
/// <returns>返回回执</returns>
Task<long> SaveParaGoodsInfo(ParaGoodsDto model);
/// <summary>
/// 作废品名参数
/// </summary>
/// <param name="Ids">品名参数主键数组</param>
/// <returns>返回回执</returns>
Task<string> DeleteParaGoodsInfo(long[] Ids);
/// <summary>
/// 主键获取品名参数
/// </summary>
/// <param name="Id">品名主键</param>
/// <returns>返回回执</returns>
Task<ParaGoodsDto> GetParaGoodsInfo(long Id);
/// <summary>
/// 检索品名参数
/// </summary>
/// <param name="queryItem">检索值</param>
/// <returns>返回回执</returns>
Task<List<ParaGoodsDto>> QueryParaGoodsInfo(string queryItem, int top = 10);
///// <summary>
///// 保存品名分类参数
///// </summary>
///// <param name="model">品名分类参数</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> SaveParaGoodsCategoryInfo(ParaGoodsCategoryDto model);
///// <summary>
///// 主键获取品名分类参数
///// </summary>
///// <param name="Id">品名分类主键</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> GetParaGoodsCategoryInfo(long Id);
///// <summary>
///// 检索品名分类参数
///// </summary>
///// <param name="queryItem">检索值</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> QueryParaGoodsCategoryInfo(string queryItem);
///// <summary>
///// 保存约号参数
///// </summary>
///// <param name="model">约号参数</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> SaveParaContractNoInfo(ParaGoodsCategoryDto model);
///// <summary>
///// 主键获取约号参数
///// </summary>
///// <param name="Id">约号主键</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> GetParaContractNoInfo(long Id);
///// <summary>
///// 检索约号参数
///// </summary>
///// <param name="queryItem">检索值</param>
///// <returns>返回回执</returns>
//Task<CommonWebApiResult> QuerytParaContractNoInfo(string queryItem);
}
}

@ -0,0 +1,298 @@
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Furion.Templates;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Myshipping.Application.Entity;
using Myshipping.Core;
using NPOI.OpenXmlFormats.Wordprocessing;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
///
/// </summary>
[ApiDescriptionSettings("Application", Name = "Para", Order = 10)]
public class ParaService : IParaService, IDynamicApiController
{
private readonly SqlSugarRepository<ParaGoodsInfo> _paraGoodsInfoRepository;
private readonly SqlSugarRepository<ParaGoodsCategoryInfo> _paraGoodsCategoryInfoRepository;
private readonly SqlSugarRepository<ParaContractNoInfo> _paraContractNoInfoRepository;
private readonly ILogger<ParaService> _logger;
public ParaService(SqlSugarRepository<ParaGoodsInfo> paraGoodsInfoRepository,
SqlSugarRepository<ParaGoodsCategoryInfo> paraGoodsCategoryInfoRepository,
SqlSugarRepository<ParaContractNoInfo> paraContractNoInfoRepository,
ILogger<ParaService> logger
)
{
_paraGoodsInfoRepository = paraGoodsInfoRepository;
_paraGoodsCategoryInfoRepository = paraGoodsCategoryInfoRepository;
_paraContractNoInfoRepository = paraContractNoInfoRepository;
_logger = logger;
}
/// <summary>
/// 保存品名参数
/// </summary>
/// <param name="model">品名参数</param>
/// <returns>返回回执</returns>
[HttpPost("/Para/SaveParaGoodsInfo")]
public async Task<long> SaveParaGoodsInfo(ParaGoodsDto model)
{
ParaGoodsInfo info = null;
try
{
//判断代码不能重复
var sameList = _paraGoodsInfoRepository.AsQueryable()
.Where(t => t.GOODS_CODE.Equals(model.GoodsCode, StringComparison.OrdinalIgnoreCase)).ToList();
if(sameList.Count > 0 && !string.IsNullOrWhiteSpace(model.Id) && sameList.Any(t=>t.Id != long.Parse(model.Id)))
throw Oops.Oh($"商品编码【{model.GoodsCode}】已存在不能重复保存");
if (!string.IsNullOrWhiteSpace(model.Id))
{
info = await _paraGoodsInfoRepository.AsQueryable().FirstAsync(t => t.Id == long.Parse(model.Id));
info.GOODS_CODE = model.GoodsCode;
info.GOODS_NAME_CN = model.GoodsNameCN;
info.GOODS_NAME_EN = model.GoodsNameEN;
info.GOODS_DESP = model.GoodsDesp;
info.GOODS_CATEGORY = model.GoodsCategory;
info.GOODS_CATEGORY_NAME = model.GoodsCategoryName;
await _paraGoodsInfoRepository.AsUpdateable(info).IgnoreColumns(it => new
{
it.Id,
it.TenantId,
it.CreatedTime,
it.CreatedUserId,
it.CreatedUserName
}).ExecuteCommandAsync();
}
else
{
info = model.Adapt<ParaGoodsInfo>();
await _paraGoodsInfoRepository.InsertAsync(info);
}
}
catch (Exception ex)
{
throw Oops.Bah($"保存品名参数异常,{ex.Message}");
}
return info.Id;
}
/// <summary>
/// 作废品名参数
/// </summary>
/// <param name="Ids">品名参数主键数组</param>
/// <returns>返回回执</returns>
[HttpPost("/Para/DeleteParaGoodsInfo")]
public async Task<string> DeleteParaGoodsInfo([FromBody] long[] Ids)
{
try
{
//如果没有给主键直接抛异常
if (Ids.Length == 0)
throw Oops.Oh("没有提供需要作废的主键信息");
var list = _paraGoodsInfoRepository.AsQueryable().Where(t => Ids.Contains(t.Id)).ToList();
if (list.Count != Ids.Length)
{
var noRecord = string.Join(",", Ids.GroupJoin(list, l => l, r => r.Id, (l, r) => {
var currList = r.ToList();
if (r.Count() > 0)
return string.Empty;
return l.ToString();
}).Where(t => !string.IsNullOrWhiteSpace(t)).ToArray());
throw Oops.Oh($"以下主键信息 {noRecord} 检索失败或者已作废过");
}
list.ForEach(async entity =>
{
entity.IsDeleted = true;
entity.UpdatedTime = DateTime.Now;
entity.UpdatedUserId = UserManager.UserId;
entity.UpdatedUserName = UserManager.Name;
await _paraGoodsInfoRepository.AsUpdateable(entity).IgnoreColumns(it => new
{
it.Id,
it.TenantId,
it.CreatedTime,
it.CreatedUserId,
it.CreatedUserName
}).ExecuteCommandAsync();
});
}
catch (Exception ex)
{
throw Oops.Bah($"作废品名参数异常,{ex.Message}");
}
return "作废成功";
}
/// <summary>
/// 主键获取品名参数
/// </summary>
/// <param name="Id">品名主键</param>
/// <returns>返回回执</returns>
[HttpGet("/Para/GetParaGoodsInfo")]
public async Task<ParaGoodsDto> GetParaGoodsInfo([FromQuery]long Id)
{
ParaGoodsDto model = null;
try
{
ParaGoodsInfo info = _paraGoodsInfoRepository.AsQueryable().First(t => t.Id == Id);
if(info == null)
throw Oops.Oh($"获取品名参数失败");
model = info.Adapt<ParaGoodsDto>();
}
catch (Exception ex)
{
throw Oops.Bah($"获取品名参数异常,{ex.Message}");
}
return model;
}
/// <summary>
/// 检索品名参数
/// </summary>
/// <param name="queryItem">检索值</param>
/// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns>
[HttpGet("/Para/QueryParaGoodsInfo")]
public async Task<List<ParaGoodsDto>> QueryParaGoodsInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
{
List<ParaGoodsDto> list = new List<ParaGoodsDto>();
try
{
var query = _paraGoodsInfoRepository.AsQueryable();
if (!string.IsNullOrWhiteSpace(queryItem))
{
query = query.Where(t => t.GOODS_CODE.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase) ||
t.GOODS_NAME_CN.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase) ||
t.GOODS_NAME_EN.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase) ||
t.GOODS_DESP.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase) ||
t.GOODS_CATEGORY.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase) ||
t.GOODS_CATEGORY_NAME.Contains(queryItem.Trim(), StringComparison.OrdinalIgnoreCase)
);
}
query = query.OrderBy("GOODS_CODE asc");
var goodsList = await query.Take(top).ToListAsync();
if (goodsList.Count > 0)
list = goodsList.Select(t => t.Adapt<ParaGoodsDto>()).ToList();
}
catch (Exception ex)
{
throw Oops.Bah($"保存品名参数异常,{ex.Message}");
}
return list;
}
///// <summary>
///// 保存品名分类参数
///// </summary>
///// <param name="model">品名分类参数</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> SaveParaGoodsCategoryInfo(ParaGoodsCategoryDto model)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
///// <summary>
///// 主键获取品名分类参数
///// </summary>
///// <param name="Id">品名分类主键</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> GetParaGoodsCategoryInfo(long Id)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
///// <summary>
///// 检索品名分类参数
///// </summary>
///// <param name="queryItem">检索值</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> QueryParaGoodsCategoryInfo(string queryItem)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
///// <summary>
///// 保存约号参数
///// </summary>
///// <param name="model">约号参数</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> SaveParaContractNoInfo(ParaGoodsCategoryDto model)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
///// <summary>
///// 主键获取约号参数
///// </summary>
///// <param name="Id">约号主键</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> GetParaContractNoInfo(long Id)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
///// <summary>
///// 检索约号参数
///// </summary>
///// <param name="queryItem">检索值</param>
///// <returns>返回回执</returns>
//public async Task<CommonWebApiResult> QuerytParaContractNoInfo(string queryItem)
//{
// CommonWebApiResult result = new CommonWebApiResult();
// return result;
//}
}
}
Loading…
Cancel
Save