修改了清空箱号和获取序列号

This commit is contained in:
2025-05-13 15:14:32 +08:00
parent 4c02d03bad
commit 0e44b7d2ec
2 changed files with 114 additions and 73 deletions

View File

@@ -352,31 +352,31 @@ namespace BarCode.Web.Domain.Services
bool res_Rollback = false;
bool isSuccess = true;
var sList = await _serialNumbersRepositories.GetEntityListByBoxIds(new List<int>() { boxId });
foreach (var f in sList)
{
if( f.IsTwo>1)
{
//说明是两件装的产品,那么要分别清除
var sList2 = await _serialNumbersRepositories.GetEntityListBySuitNumber(f.SerialNumber);
for(int i=0;i<sList2.Count;i++)
{
sList2[i].UnBox();
//foreach (var f in sList)
//{
// if( f.IsTwo>1)
// {
// //说明是两件装的产品,那么要分别清除
// var sList2 = await _serialNumbersRepositories.GetEntityListBySuitNumber(f.SerialNumber);
// for(int i=0;i<sList2.Count;i++)
// {
// sList2[i].UnBox();
if (!res_Rollback)
{
isSuccess = await _serialNumbersRepositories.EditEntityList(sList2, false);
if (!isSuccess) res_Rollback = true;
}
}
// if (!res_Rollback)
// {
// isSuccess = await _serialNumbersRepositories.EditEntityList(sList2, false);
// if (!isSuccess) res_Rollback = true;
// }
// }
}
// }
f.UnBox();
// f.UnBox();
}
//}
// sList.ForEach(f => f.UnBox());
sList.ForEach(f => f.UnBox());
var res = await _boxRepositories.Edit(box, false);