From 8de4e310354b5dca149ce3574fcb60071702b361 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 24 Jul 2024 18:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E9=A2=84=E7=BA=A6=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=8A=B6=E6=80=81bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xmgl/modules/car/service/impl/CarInfoServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/car/service/impl/CarInfoServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/car/service/impl/CarInfoServiceImpl.java index c2b910400..242ffeef7 100644 --- a/src/main/java/com/zhgd/xmgl/modules/car/service/impl/CarInfoServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/car/service/impl/CarInfoServiceImpl.java @@ -183,6 +183,7 @@ public class CarInfoServiceImpl extends ServiceImpl impl List flows = carInfoApprovalFlowMapper.selectList(new LambdaQueryWrapper() .eq(CarInfoApprovalFlow::getProjectSn, c.getProjectSn()) .eq(CarInfoApprovalFlow::getCarNumber, c.getCarNumber()) + .last(Cts.IGNORE_DATA_SCOPE_CONDITION) ); List otherFlows = flows.stream().filter(f -> !Objects.equals(c.getEnterpriseId(), f.getEnterpriseId())).collect(Collectors.toList()); boolean overlap = otherFlows.stream().anyMatch(f -> DateUtil.compare(f.getReserveStartTime(), c.getReserveEndTime()) < 0 && DateUtil.compare(f.getReserveEndTime(), c.getReserveStartTime()) > 0); @@ -503,7 +504,8 @@ public class CarInfoServiceImpl extends ServiceImpl impl carInfo.setEnterpriseId(workerInfo.getEnterpriseId()); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(CarInfo::getProjectSn, carInfo.getProjectSn()) - .eq(CarInfo::getCarNumber, carInfo.getCarNumber()); + .eq(CarInfo::getCarNumber, carInfo.getCarNumber()) + .last(Cts.IGNORE_DATA_SCOPE_CONDITION); CarInfo old = this.getOne(queryWrapper); if (old != null && Objects.equals(old.getIsBlack(), 1)) { map.put("success", false);