Merge branch 'v1.0.1' of https://codeup.aliyun.com/62ce7bca487c500c27f70a79/OPS/WMS-Api into v1.0.1
This commit is contained in:
Binary file not shown.
@@ -87,6 +87,7 @@ namespace WMS.Web.Domain.Services
|
||||
var srcIds = dto.Select(s => s.SrcBoxId).Distinct().ToList();
|
||||
var destIds = dto.Select(s => s.DestBoxId).Distinct().ToList();
|
||||
var boxs = await _boxInventoryRepositories.GetList(srcIds);
|
||||
var destIds_boxs = await _boxInventoryRepositories.GetList(destIds);
|
||||
|
||||
var serialNumbers = dto.SelectMany(s => s.Details).SelectMany(s => s.SerialNumbers).ToList();
|
||||
var serialNumberList = await _serialNumbersRepositories.GetEntityList(serialNumbers);
|
||||
@@ -99,6 +100,11 @@ namespace WMS.Web.Domain.Services
|
||||
var sCount = serialNumberList.Where(w => s.Contains(w.SerialNumber) && w.BoxId != 0).Count();
|
||||
if (sCount > 0)
|
||||
return Result.ReFailure(ResultCodes.SerialNumbersBoxError);
|
||||
|
||||
var dest_box = destIds_boxs.FirstOrDefault(f => f.BoxId == d.DestBoxId);
|
||||
if (dest_box != null)
|
||||
return Result.ReFailure(ResultCodes.BoxInventoryChangeBoxError);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -324,6 +330,6 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ namespace WMS.Web.Domain.Values
|
||||
public static ValueTuple<int, string> InventoryInOutDetailsWriteError = (800014, "写入物料收发明细失败!");
|
||||
public static ValueTuple<int, string> InventoryDetailsWriteError = (800014, "写入即时库存明细失败!");
|
||||
public static ValueTuple<int, string> MoveInventoryError = (800015, "箱已经上架,不能重复上架");
|
||||
public static ValueTuple<int, string> BoxInventoryChangeBoxError = (800016, "箱已上架不支持再次装箱");
|
||||
|
||||
|
||||
public static ValueTuple<int, string> SerialNumbersNoData = (610000, "序列号不存在");
|
||||
public static ValueTuple<int, string> SerialNumbersBoxError = (610002, "序列号已经绑定箱");
|
||||
|
||||
Reference in New Issue
Block a user