ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImpl.java
@@ -203,10 +203,11 @@ { throw new ServiceException("电池号不能重复或为空"); } // 电池号只要求在所属电池组内唯一;不同电池组可以复用同一业务编号。 TBatteryGroupBattery existingBattery = batteryGroupMapper.selectBatteryByNo(normalized, group.getGroupId()); if (existingBattery != null && (group.getGroupId() == null || !group.getGroupId().equals(existingBattery.getGroupId()))) if (!update && existingBattery != null) { throw new ServiceException("电池号已被其他电池组使用"); throw new ServiceException("所属电池组内电池号已存在"); } } if (group.getTemplateId() == null)