修复bug

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

View File

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