|
|
@ -96,6 +96,10 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
+ $"在实际库存中查询到【ERP料号】{balanceDto.ItemCode}【库位】{balanceDto.LocationCode}【箱码】{balanceDto.PackingCode}【状态】{balanceDto.Status}【数量】{balanceDto.Qty}" |
|
|
|
+ $"【库存不足】"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -111,6 +115,8 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); |
|
|
|
var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
await CheckPackingCode(balanceDto.PackingCode).ConfigureAwait(false); |
|
|
|
|
|
|
|
CheckLocation(toLocationDto, detail); |
|
|
|
CheckFromLocation(fromLocationDto, detail); |
|
|
|
if (toLocationDto.Type != fromLocationDto.Type) |
|
|
@ -150,6 +156,9 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
detail.ToLocationArea = balanceDto.LocationArea; |
|
|
|
detail.ToStatus = balanceDto.Status; |
|
|
|
detail.ToLot = balanceDto.Lot; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -157,6 +166,17 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
return dictionary; |
|
|
|
} |
|
|
|
|
|
|
|
private async Task CheckPackingCode(string packingCode) |
|
|
|
{ |
|
|
|
var packingcode = await _expectOutAppService.GetListByPackingCodeAsync(packingCode).ConfigureAwait(false); |
|
|
|
if (packingcode != null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"箱码{packingCode}在预计出中已存在!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 拆箱
|
|
|
|
/// </summary>
|
|
|
@ -394,6 +414,13 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase |
|
|
|
+ $"【库存不足】"); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach (var detail in entity.Details) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(detail.FromPackingCode)) |
|
|
|
{ |
|
|
|
await CheckPackingCode(detail.FromPackingCode).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
entity =await _transferNoteManager.CreateAsync(entity).ConfigureAwait(false); |
|
|
|
|
|
|
|