From e02decbbdf06e21e852cf6e5fa00f1b32b5b4b14 Mon Sep 17 00:00:00 2001
From: “mitao” <“2763622819@qq.com”>
Date: 星期二, 07 四月 2026 17:05:43 +0800
Subject: [PATCH] fix(management):修改新增编辑导入车辆车辆颜色字符限制为3个字符

---
 xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java    |    2 +-
 xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties                               |    4 ++--
 xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java           |    5 +++--
 xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties                                     |    4 ++--
 xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties                               |    4 ++--
 xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleServiceImpl.java |    4 ++--
 6 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
index 94934ff..72a8529 100644
--- a/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
+++ b/xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/ClockInScheduleTask.java
@@ -92,7 +92,7 @@
                                 .map(XpFleetOperations::getOperationsUserId).distinct().collect(Collectors.toList());
                         // 批量查询人员打卡信息
                         List<XpClockIn> clockInList = xpClockInService.list(Wrappers.lambdaQuery(XpClockIn.class)
-                                .in(XpClockIn::getAppUserId, operationsUserIds));
+                                .in(XpClockIn::getAppUserId, operationsUserIds).in(XpClockIn::getShiftId, ids));
                         // 判断有哪些人员没有打卡信息
                         List<Long> noClockInUserIds = operationsUserIds.stream().filter(id -> clockInList.stream().noneMatch(clockIn -> clockIn.getAppUserId().equals(id))).collect(Collectors.toList());
                         if(!CollectionUtils.isEmpty(noClockInUserIds)){
@@ -147,7 +147,7 @@
                                     .map(XpFleetOperations::getOperationsUserId).distinct().collect(Collectors.toList());
                             // 批量查询人员打卡信息
                             List<XpClockIn> clockInListFive = xpClockInService.list(Wrappers.lambdaQuery(XpClockIn.class)
-                                    .in(XpClockIn::getAppUserId, operationsUserIdsFive)
+                                    .in(XpClockIn::getAppUserId, operationsUserIdsFive).in(XpClockIn::getShiftId, fiveIds)
                                     .isNull(XpClockIn::getClockOutTime));
                             log.info("========== 获取到{}个人员没有下班打卡信息 ==========", clockInListFive.size());
                             if(!CollectionUtils.isEmpty(clockInListFive)){
@@ -192,6 +192,7 @@
                         // 批量查询人员打卡信息
                         List<XpClockIn> clockInListFive = xpClockInService.list(Wrappers.lambdaQuery(XpClockIn.class)
                                 .in(XpClockIn::getAppUserId, operationsUserIdsFive)
+                                        .in(XpClockIn::getShiftId, fiveIds)
                                 .likeRight(XpClockIn::getClockInTime,LocalDate.now().minusDays(1))
                                 .isNull(XpClockIn::getClockOutTime));
                         log.info("========== 获取到{}个人员没有下班打卡信息 ==========", clockInListFive.size());
diff --git a/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java b/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java
index 1244379..44fc656 100644
--- a/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java
+++ b/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java
@@ -384,7 +384,7 @@
                         I18nKeyConstant.VEHICLE_IMPORT_PLATE_INVALID,
                         locale));
             }
-            if (org.apache.commons.lang3.StringUtils.isNotBlank(vehicleColor) && vehicleColor.length() > 2) {
+            if (org.apache.commons.lang3.StringUtils.isNotBlank(vehicleColor) && vehicleColor.length() > 3) {
                 errors.add(messageSource.getMessage(I18nKeyConstant.VEHICLE_IMPORT_COLOR_INVALID,
                         new Object[]{excelRowNumber, vehicleColor},
                         I18nKeyConstant.VEHICLE_IMPORT_COLOR_INVALID,
diff --git a/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleServiceImpl.java b/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleServiceImpl.java
index f016164..ddcf943 100644
--- a/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleServiceImpl.java
+++ b/xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/impl/XpVehicleServiceImpl.java
@@ -480,8 +480,8 @@
         if (StringUtils.isBlank(plateNumber) || !Validator.isPlateNumber(plateNumber)) {
             throw new ServiceException("车牌号格式不正确", I18nKeyConstant.VEHICLE_PLATE_INVALID, new Object[]{plateNumber});
         }
-        if (StringUtils.isNotBlank(vehicleColor) && vehicleColor.length() > 2) {
-            throw new ServiceException("车辆颜色长度不能超过2", I18nKeyConstant.VEHICLE_COLOR_INVALID, new Object[]{vehicleColor});
+        if (StringUtils.isNotBlank(vehicleColor) && vehicleColor.length() > 3) {
+            throw new ServiceException("车辆颜色长度不能超过3", I18nKeyConstant.VEHICLE_COLOR_INVALID, new Object[]{vehicleColor});
         }
         List<XpVehicle> duplicates = lambdaQuery()
                 .ne(excludeId != null, XpVehicle::getId, excludeId)
diff --git a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties
index 994dbfc..6bceb2e 100644
--- a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties
+++ b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages.properties
@@ -28,13 +28,13 @@
 vehicle.vin.exists=车辆VIN码已存在:{0}
 vehicle.plate.invalid=车牌号格式不正确:{0}
 vehicle.plate.exists=车牌号已存在:{0}
-vehicle.color.invalid=车辆颜色长度不能超过2:{0}
+vehicle.color.invalid=车辆颜色长度不能超过3:{0}
 vehicle.electronic.not.exists=选择的运营区域不存在:{0}
 vehicle.import.validate.fail=导入校验失败:\n{0}
 vehicle.import.code.invalid=第{0}行车辆编码格式不正确(1-5位字母/数字/下划线):{1}
 vehicle.import.vin.invalid=第{0}行车辆VIN码格式不正确(17位大写字母与数字):{1}
 vehicle.import.plate.invalid=第{0}行车牌号格式不正确:{1}
-vehicle.import.color.invalid=第{0}行车辆颜色长度不能超过2:{1}
+vehicle.import.color.invalid=第{0}行车辆颜色长度不能超过3:{1}
 vehicle.import.code.duplicate=第{0}行车辆编码在导入文件中重复:{1}
 vehicle.import.vin.duplicate=第{0}行车辆VIN码在导入文件中重复:{1}
 vehicle.import.plate.duplicate=第{0}行车牌号在导入文件中重复:{1}
diff --git a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties
index 7d5c3c5..f8669ac 100644
--- a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties
+++ b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties
@@ -32,13 +32,13 @@
 vehicle.vin.exists=VIN already exists: {0}
 vehicle.plate.invalid=Invalid plate number: {0}
 vehicle.plate.exists=Plate number already exists: {0}
-vehicle.color.invalid=Vehicle color length must be <= 2: {0}
+vehicle.color.invalid=Vehicle color length must be <= 3: {0}
 vehicle.electronic.not.exists=Selected operating area does not exist: {0}
 vehicle.import.validate.fail=Import validation failed:\n{0}
 vehicle.import.code.invalid=Row {0}: invalid vehicle code (1-5 chars, letters/numbers/underscore only): {1}
 vehicle.import.vin.invalid=Row {0}: invalid VIN (17 chars, uppercase letters and digits only): {1}
 vehicle.import.plate.invalid=Row {0}: invalid plate number: {1}
-vehicle.import.color.invalid=Row {0}: vehicle color length must be <= 2: {1}
+vehicle.import.color.invalid=Row {0}: vehicle color length must be <= 3: {1}
 vehicle.import.code.duplicate=Row {0}: duplicate vehicle code in file: {1}
 vehicle.import.vin.duplicate=Row {0}: duplicate VIN in file: {1}
 vehicle.import.plate.duplicate=Row {0}: duplicate plate number in file: {1}
diff --git a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties
index 5b36b43..f8a15aa 100644
--- a/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties
+++ b/xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -33,13 +33,13 @@
 vehicle.vin.exists=车辆VIN码已存在:{0}
 vehicle.plate.invalid=车牌号格式不正确:{0}
 vehicle.plate.exists=车牌号已存在:{0}
-vehicle.color.invalid=车辆颜色长度不能超过2:{0}
+vehicle.color.invalid=车辆颜色长度不能超过3:{0}
 vehicle.electronic.not.exists=选择的运营区域不存在:{0}
 vehicle.import.validate.fail=导入校验失败:\n{0}
 vehicle.import.code.invalid=第{0}行车辆编码格式不正确(1-5位字母/数字/下划线):{1}
 vehicle.import.vin.invalid=第{0}行车辆VIN码格式不正确(17位大写字母与数字):{1}
 vehicle.import.plate.invalid=第{0}行车牌号格式不正确:{1}
-vehicle.import.color.invalid=第{0}行车辆颜色长度不能超过2:{1}
+vehicle.import.color.invalid=第{0}行车辆颜色长度不能超过3:{1}
 vehicle.import.code.duplicate=第{0}行车辆编码在导入文件中重复:{1}
 vehicle.import.vin.duplicate=第{0}行车辆VIN码在导入文件中重复:{1}
 vehicle.import.plate.duplicate=第{0}行车牌号在导入文件中重复:{1}

--
Gitblit v1.7.1