From 6d9f4697b3f026cdaa6ae8f616c195815e5c8c65 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 18 Dec 2023 12:00:51 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=8D=95=E4=BD=8D=E5=B1=9E=E6=80=A7=E5=8E=BB?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operation/station/impl/StationAttributeServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java index 629e2c6..a9789e4 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java @@ -9,8 +9,7 @@ import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.utils.CollectionUtil; import org.springframework.stereotype.Service; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -31,6 +30,8 @@ public class StationAttributeServiceImpl extends BaseServiceImpl new TreeSet<>(Comparator.comparing(StationAttributeEntity::getAttributes))), ArrayList::new)) + .stream().collect(Collectors.toMap(StationAttributeEntity::getAttributes, StationAttributeEntity::getUnit)); } }