fix:批量更新优化

This commit is contained in:
zhangzq
2026-08-03 17:28:20 +08:00
parent 978fa4875c
commit 9b9654327f

View File

@@ -239,7 +239,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
throw new BadRequestException("下推失败,单据状态不为已分配不能下推"); throw new BadRequestException("下推失败,单据状态不为已分配不能下推");
} }
final int disCount = this.count(new LambdaQueryWrapper<PmDemand>() final int disCount = this.count(new LambdaQueryWrapper<PmDemand>()
.eq(PmDemand::getId, pmDemandDtos.stream().map(PmDemandDto::getId).collect(Collectors.toList())) .in(PmDemand::getId, pmDemandDtos.stream().map(PmDemandDto::getId).collect(Collectors.toList()))
.eq(PmDemand::getStatus,DemandStatus.DIS.getValue())); .eq(PmDemand::getStatus,DemandStatus.DIS.getValue()));
if (disCount<pmDemandDtos.size()){ if (disCount<pmDemandDtos.size()){
throw new BadRequestException("下推失败,单据状态不为已分配不能下推"); throw new BadRequestException("下推失败,单据状态不为已分配不能下推");