|
|
@ -6,9 +6,11 @@ using System.Threading.Tasks; |
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Domain.Repositories; |
|
|
|
using Volo.Abp.ObjectMapping; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Volo.Abp.Validation; |
|
|
|
using Win_in.Sfs.Basedata.Application.Contracts; |
|
|
|
using Win_in.Sfs.Basedata.Domain; |
|
|
@ -89,6 +91,25 @@ public class LocationAppService |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 用来重写 新增实体
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="UserFriendlyException"></exception>
|
|
|
|
[HttpPost("")] |
|
|
|
[UnitOfWork] |
|
|
|
public override async Task<LocationDTO> CreateAsync(LocationEditInput input) |
|
|
|
{ |
|
|
|
var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false); |
|
|
|
if (existEntity != null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"库位 {input.Code} 已存在"); |
|
|
|
} |
|
|
|
|
|
|
|
return await base.CreateAsync(input).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 筛选可用领料的库位
|
|
|
|
/// </summary>
|
|
|
|