|
@ -37,6 +37,13 @@ public class PositionCodeAppService |
|
|
{ |
|
|
{ |
|
|
throw new UserFriendlyException($"{input.Code} 已存在"); |
|
|
throw new UserFriendlyException($"{input.Code} 已存在"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); |
|
|
|
|
|
Check.NotNull(itemBasic, "物品代码", $"物品 {input.PartCode} 不存在"); |
|
|
|
|
|
|
|
|
|
|
|
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false); |
|
|
|
|
|
Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在"); |
|
|
|
|
|
|
|
|
return await base.CreateAsync(input).ConfigureAwait(false); |
|
|
return await base.CreateAsync(input).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|