调整接口

This commit is contained in:
18942506660
2023-12-29 09:22:52 +08:00
parent 2b8b5d605b
commit e9d17dcae7
3 changed files with 8 additions and 12 deletions

View File

@@ -68,21 +68,14 @@ namespace WMS.Web.Domain.Services
if (IsPDA)
{
var d = dto.First();
var dBox = await _boxRepositories.GetByNo(d.DestBoxBillNo);
if (dBox == null)
if (d.DestBoxId == 0)
{
var dBox = await _boxRepositories.GetByNo(d.DestBoxBillNo);
var res = await CreateBox(d);
if (!res.IsSuccess) return res;
dBox = await _boxRepositories.GetByNo(d.DestBoxBillNo);
dto.First().DestBoxId = dBox.Id;
}
else
{
var destInventoryBoxs = await _boxInventoryRepositories.Get(dBox.Id);
dto.First().DestBoxId = dBox.Id;
if (destInventoryBoxs != null)
dto.First().SubStockId = destInventoryBoxs.SubStockId;
}
}
//1.有原箱时 需要判断 物料对应的序列号是否存在
var srcIds = dto.Select(s => s.SrcBoxId).Distinct().ToList();