|
|
@ -69,13 +69,13 @@ public class ProductionReturnRequestAppService : |
|
|
|
public override async Task<ProductionReturnRequestDTO> CreateAsync(ProductionReturnRequestEditInput input) |
|
|
|
{ |
|
|
|
//校验目标库位
|
|
|
|
var locCodeLst = input.Details.Select(itm => itm.ToLocationCode).ToList(); |
|
|
|
var locLst = await _locationAppService.GetByCodesAsync(locCodeLst).ConfigureAwait(false); |
|
|
|
bool allIsBCP = locLst.All(itm => itm.Type == EnumLocationType.SEMI); |
|
|
|
if (allIsBCP == false) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException("目标库位必须是半成品库位,不允许存在其它类型库位!"); |
|
|
|
} |
|
|
|
//var locCodeLst = input.Details.Select(itm => itm.ToLocationCode).ToList();
|
|
|
|
//var locLst = await _locationAppService.GetByCodesAsync(locCodeLst).ConfigureAwait(false);
|
|
|
|
//bool allIsBCP = locLst.All(itm => itm.Type == EnumLocationType.SEMI);
|
|
|
|
//if (allIsBCP == false)
|
|
|
|
//{
|
|
|
|
// throw new UserFriendlyException("目标库位必须是半成品库位,不允许存在其它类型库位!");
|
|
|
|
//}
|
|
|
|
//校验物料和库存关系
|
|
|
|
foreach (var item in input.Details) |
|
|
|
{ |
|
|
@ -109,6 +109,7 @@ public class ProductionReturnRequestAppService : |
|
|
|
//[Authorize(ProductionReturnRequestPermissions.Create)]
|
|
|
|
public async Task<ProductionReturnRequestDTO> CreateLiKuAsync(ProductionReturnRequestEditInput input) |
|
|
|
{ |
|
|
|
throw new NotImplementedException("该方法已经作废,请使用Create方法"); |
|
|
|
//校验目标库位 //??没有立库类型
|
|
|
|
//var locCodeLst = input.Details.Select(itm => itm.ToLocationCode).ToList();
|
|
|
|
//var locLst = await _locationAppService.GetByCodesAsync(locCodeLst).ConfigureAwait(false);
|
|
|
|