|
...
|
...
|
@@ -99,8 +99,21 @@ public class TblProductionGongxuController extends JeecgController<TblProduction |
|
|
|
@PutMapping("/updateYan")
|
|
|
|
public Result<?> updateYan(@RequestBody List<TblProductionGongxu> tblProductionGongxuList){
|
|
|
|
boolean b = tblProductionGongxuService.updateBatchById(tblProductionGongxuList);
|
|
|
|
LambdaQueryWrapper<TblProductionGongxu> queryWrapper=new LambdaQueryWrapper<TblProductionGongxu>()
|
|
|
|
.eq(TblProductionGongxu::getOrderNumber,tblProductionGongxuList.get(0).getOrderNumber());
|
|
|
|
if(b){
|
|
|
|
|
|
|
|
List<TblProductionGongxu> list = tblProductionGongxuService.list(queryWrapper);
|
|
|
|
boolean allHhhQualified = true;
|
|
|
|
for (TblProductionGongxu productionGongxu : list) {
|
|
|
|
if (!"合格入库".equals(productionGongxu.getYanResult())) {
|
|
|
|
// 如果有任何一个元素的hhh值不是“合格入库”,则置标志位为false,并跳出循环
|
|
|
|
allHhhQualified = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(allHhhQualified){
|
|
|
|
tblProductionGongxuService.updateByStatus(tblProductionGongxuList.get(0).getOrderNumber());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return Result.ok("修改成功");
|
|
|
|
}
|
...
|
...
|
|