From 4e1d73d3cb415080dbf5b2e27a5dd0f49ea94de7 Mon Sep 17 00:00:00 2001 From: 18980591175 <470162950@qq.com> Date: Wed, 27 May 2026 12:13:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8F=9B=E8=BB=8A=E8=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../driver/service/impl/HotDriverServiceImpl.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/com/hotwj/platform/driverManagement/driver/service/impl/HotDriverServiceImpl.java b/src/main/java/com/hotwj/platform/driverManagement/driver/service/impl/HotDriverServiceImpl.java index f1a7501..284f578 100644 --- a/src/main/java/com/hotwj/platform/driverManagement/driver/service/impl/HotDriverServiceImpl.java +++ b/src/main/java/com/hotwj/platform/driverManagement/driver/service/impl/HotDriverServiceImpl.java @@ -990,13 +990,6 @@ public class HotDriverServiceImpl implements IHotDriverService { throw new ServiceException("目标车辆ID不能为空"); } - List boundVehicleIds = getBoundVehicleIds(driver); - if (CollUtil.isEmpty(boundVehicleIds)) { - throw new ServiceException("当前驾驶员未绑定车辆,不能切换"); - } - if (!boundVehicleIds.contains(targetVehicleId)) { - throw new ServiceException("驾驶员只能切换属于自己的车辆"); - } if (StringUtils.equals(driver.getVehicleId(), targetVehicleId)) { return true; } @@ -1014,9 +1007,6 @@ public class HotDriverServiceImpl implements IHotDriverService { if (targetVehicle == null) { throw new ServiceException("目标车辆不存在"); } - if (!splitCsv(targetVehicle.getCurrentDriver()).contains(driver.getId())) { - throw new ServiceException("驾驶员只能切换属于自己的车辆"); - } return baseMapper.update(null, new LambdaUpdateWrapper() .set(HotDriver::getVehicleId, targetVehicle.getId())