修复bug

This commit is contained in:
18942506660
2024-01-03 10:42:49 +08:00
parent 717e12cd12
commit 60889fcca3

View File

@@ -73,6 +73,8 @@ namespace WMS.Web.Domain.Services
if (d.DestBoxId == 0)
{
var dBox = await _boxRepositories.GetByNo(d.DestBoxBillNo);
if (dBox == null)
{
var res = await CreateBox(d);
if (!res.IsSuccess) return res;
dBox = await _boxRepositories.GetByNo(d.DestBoxBillNo);
@@ -80,6 +82,7 @@ namespace WMS.Web.Domain.Services
isAddBox = true;
}
}
}
//1.有原箱时 需要判断 物料对应的序列号是否存在
var srcIds = dto.Select(s => s.SrcBoxId).Distinct().ToList();
var destIds = dto.Select(s => s.DestBoxId).Distinct().ToList();
@@ -232,6 +235,7 @@ namespace WMS.Web.Domain.Services
Qty = d.Qty,
SerialNumbers = s
};
response.Details.Add(dr);
}
list.Add(response);
return await _boxService.Sync(list);