From ab275cdafd2165ded52dd1a600e65f89a4d71845 Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 5 Jun 2025 10:03:02 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20=20=E4=BF=AE=E5=A4=8D=E6=9E=AA?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/PileConnectorInfoServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java index 34a5ee062..ccc90d453 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java @@ -444,9 +444,10 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService { // 定义 status 的优先级(值越小,优先级越高) Map priority = Collections.unmodifiableMap(new HashMap() {{ put(Integer.parseInt(PileConnectorDataBaseStatusEnum.FREE.getValue()), 1); // 空闲 → 1 - put(Integer.parseInt(PileConnectorDataBaseStatusEnum.OCCUPIED_NOT_CHARGED.getValue()), 2); // 占用 → 2 - put(Integer.parseInt(PileConnectorDataBaseStatusEnum.FAULT.getValue()), 3); // 故障 → 3 - put(Integer.parseInt(PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue()), 4); // 离线 → 4 + put(Integer.parseInt(PileConnectorDataBaseStatusEnum.OCCUPIED_NOT_CHARGED.getValue()), 2); // 占用(未充电) → 2 + put(Integer.parseInt(PileConnectorDataBaseStatusEnum.OCCUPIED_CHARGING.getValue()), 3); // 占用(充电中) → 3 + put(Integer.parseInt(PileConnectorDataBaseStatusEnum.FAULT.getValue()), 4); // 故障 → 4 + put(Integer.parseInt(PileConnectorDataBaseStatusEnum.OFF_NETWORK.getValue()), 5); // 离线 → 5 }}); pileConnectorInfoList.sort( Comparator.comparingInt((PileConnectorInfoVO vo) -> priority.get(vo.getStatus()))