|
|
|
@ -149,7 +149,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
await _paraGoodsInfoRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.Id,
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
@ -314,18 +313,19 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">品名分类参数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost("/Para/SaveParaGoodsCategoryInfo")]
|
|
|
|
|
public async Task<long> SaveParaGoodsCategoryInfo(ParaGoodsCategoryDto model)
|
|
|
|
|
{
|
|
|
|
|
ParaGoodsCategoryInfo info = null;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//判断代码不能重复
|
|
|
|
|
var sameList = _paraGoodsCategoryInfoRepository.AsQueryable()
|
|
|
|
|
.Where(t => t.GOODS_CATEGORY.Equals(model.GoodsCategory, StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
|
////判断代码不能重复
|
|
|
|
|
//var sameList = _paraGoodsCategoryInfoRepository.AsQueryable()
|
|
|
|
|
// .Where(t => t.GOODS_CATEGORY.Equals(model.GoodsCategory, StringComparison.OrdinalIgnoreCase)).ToList();
|
|
|
|
|
|
|
|
|
|
if (sameList.Count > 0 && !string.IsNullOrWhiteSpace(model.Id) && sameList.Any(t => t.Id != long.Parse(model.Id)))
|
|
|
|
|
throw Oops.Oh($"商品分类代码【{model.GoodsCategory}】已存在不能重复保存");
|
|
|
|
|
//if (sameList.Count > 0 && !string.IsNullOrWhiteSpace(model.Id) && sameList.Any(t => t.Id != long.Parse(model.Id)))
|
|
|
|
|
// throw Oops.Oh($"商品分类代码【{model.GoodsCategory}】已存在不能重复保存");
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.Id))
|
|
|
|
|
{
|
|
|
|
@ -376,6 +376,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Id">品名分类主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/GetParaGoodsCategoryInfo")]
|
|
|
|
|
public async Task<ParaGoodsCategoryDto> GetParaGoodsCategoryInfo(long Id)
|
|
|
|
|
{
|
|
|
|
|
ParaGoodsCategoryDto model = null;
|
|
|
|
@ -486,7 +487,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
await _paraGoodsCategoryInfoRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.Id,
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
@ -509,6 +509,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="QuerySearch">品名分类参数台账查询请求</param>
|
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
|
[HttpPost("/Para/GetParaGoodsCategoryPage")]
|
|
|
|
|
public async Task<dynamic> GetParaGoodsCategoryPageAsync(QueryParaGoodsCategoryDto QuerySearch)
|
|
|
|
|
{
|
|
|
|
|
DateTime createBegin = DateTime.MinValue;
|
|
|
|
@ -579,6 +580,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">约号参数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost("/Para/SaveParaContractNoInfo")]
|
|
|
|
|
public async Task<long> SaveParaContractNoInfo(ParaContractNoDto model)
|
|
|
|
|
{
|
|
|
|
|
ParaContractNoInfo info = null;
|
|
|
|
@ -631,6 +633,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Id">约号主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/GetParaContractNoInfo")]
|
|
|
|
|
public async Task<ParaContractNoDto> GetParaContractNoInfo(long Id)
|
|
|
|
|
{
|
|
|
|
|
ParaContractNoDto model = null;
|
|
|
|
@ -662,6 +665,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="queryItem">检索值</param>
|
|
|
|
|
/// <param name="top">默认最大行数</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/Para/QuerytParaContractNoInfo")]
|
|
|
|
|
public async Task<List<ParaContractNoDto>> QuerytParaContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10)
|
|
|
|
|
{
|
|
|
|
|
List<ParaContractNoDto> list = new List<ParaContractNoDto>();
|
|
|
|
@ -702,6 +706,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Ids">约号参数主键数组</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost("/Para/DeleteParaContractNoInfo")]
|
|
|
|
|
public async Task<string> DeleteParaContractNoInfo(long[] Ids)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
@ -735,7 +740,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
await _paraContractNoInfoRepository.AsUpdateable(entity).IgnoreColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.Id,
|
|
|
|
|
it.TenantId,
|
|
|
|
|
it.CreatedTime,
|
|
|
|
|
it.CreatedUserId,
|
|
|
|
@ -759,6 +763,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="QuerySearch">约号参数台账查询请求</param>
|
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
|
[HttpPost("/Para/GetParaContractNoPage")]
|
|
|
|
|
public async Task<dynamic> GetParaContractNoPageAsync(QueryParaContractNoDto QuerySearch)
|
|
|
|
|
{
|
|
|
|
|
DateTime createBegin = DateTime.MinValue;
|
|
|
|
|