From c72fe2374fde2f0facf58c578871f194be610ce2 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 19 Jun 2024 09:59:40 +0800 Subject: [PATCH] =?UTF-8?q?#=E4=BA=91=E6=9C=8D=E5=8A=A1=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/alarm/config/entity/AlarmEntity.java | 8 ++-- .../alarm/show/service/impl/AlarmServiceImpl.java | 2 +- .../service/impl/DroolsAlarmServiceImpl.java | 9 ++-- .../source/service/impl/FdpAlarmServiceImpl.java | 6 ++- .../source/service/impl/LevelAlarmServiceImpl.java | 7 +++- .../source/service/impl/SoeAlarmServiceImpl.java | 7 +++- .../service/impl/SystemAlarmServiceImpl.java | 10 +++-- .../source/service/impl/VideoAlarmServiceImpl.java | 6 ++- .../mapper/equipment/ThreeGenerateMapper.java | 1 - .../service/equipment/ThreeGenerateService.java | 2 - .../equipment/impl/ThirtyGenerateServiceImpl.java | 2 +- .../equipment/impl/ThreeGenerateServiceImpl.java | 12 ------ .../home/impl/ObtainGenerationServiceImpl.java | 48 +++++++++++----------- .../mapper/equipment/ThreeGenerateMapper.xml | 8 +--- .../service/impl/RealMonitorServiceImpl.java | 2 +- 15 files changed, 67 insertions(+), 63 deletions(-) diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java index ebb82d2..5537f8d 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java @@ -11,6 +11,8 @@ import org.springblade.core.tool.utils.DateUtil; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Date; @@ -71,9 +73,9 @@ public class AlarmEntity extends TenantEntity { private Integer alarmCount; @ApiModelProperty(value = "告警时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.sss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.sss") - private Date alarmTime; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS") + private LocalDateTime alarmTime; @ApiModelProperty(value = "监测点") private String realId; diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java index 2b769ec..2a31617 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java @@ -109,7 +109,7 @@ public class AlarmServiceImpl extends BaseServiceImpl */ private List stations() { StationEntity station = new StationEntity(); - station.setServeType("2"); + //station.setServeType("2"); station.setType(0); R> result = stationClient.list(station); if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java index 9b63cc3..a3c747c 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java @@ -16,6 +16,8 @@ import org.springblade.core.tool.api.R; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -55,18 +57,19 @@ public class DroolsAlarmServiceImpl implements DroolsAlarmService { private AlarmEntity getAlarmEntity(DroolsAlarmVo item) { AlarmEntity entity = new AlarmEntity(); - String format = DateUtil.format(item.getTs(), org.springblade.core.tool.utils.DateUtil.PATTERN_DATETIME_MINI); + String format = DateUtil.format(item.getTs(), DateUtil.PATTERN_DATETIME_MINI); entity.setAlarmId(format+"-"+item.getDeviceCode()); entity.setAlarmSource(CONDITION_ALARM); entity.setAlarmType(CONDITION); entity.setAlarmContext(item.getName()); - entity.setAlarmTime(item.getTs()); + ZoneId zoneId = ZoneId.systemDefault(); + LocalDateTime localDateTime = LocalDateTime.ofInstant(item.getTs().toInstant(), zoneId); + entity.setAlarmTime(localDateTime); entity.setAlarmValue(item.getCurrentValue()); entity.setAlarmSignage(item.getSignage()); entity.setAlarmLevel(Integer.valueOf(item.getLevel())); entity.setAlarmStatus(1); entity.setDeviceCode(item.getDeviceCode()); - entity.setTenantId("200000"); entity.setStationId(item.getProjectId()); R stationByCode = stationClient.getStationByCode(item.getProjectId()); if (stationByCode.isSuccess()&& ObjectUtils.isNotEmpty(stationByCode.getData())){ diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java index 5a6844d..ddc0c87 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java @@ -19,6 +19,8 @@ import org.springblade.system.feign.ISysClient; import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -82,7 +84,9 @@ public class FdpAlarmServiceImpl implements FdpAlarmService { AlarmEntity entity = new AlarmEntity(); entity.setAlarmId(item.getUUID()); entity.setRealId(item.getFaultId()); - entity.setAlarmTime(item.getCreateTime()); + ZoneId zoneId = ZoneId.systemDefault(); + LocalDateTime localDateTime = LocalDateTime.ofInstant(item.getCreateTime().toInstant(), zoneId); + entity.setAlarmTime(localDateTime); entity.setAlarmContext(item.getFinfo()); entity.setAlarmSource(EARLY_WARNING); entity.setAlarmType(EARLY); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/LevelAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/LevelAlarmServiceImpl.java index fe035f1..fcbfbd7 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/LevelAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/LevelAlarmServiceImpl.java @@ -21,6 +21,9 @@ import org.springblade.core.tool.utils.DateUtil; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -91,7 +94,9 @@ public class LevelAlarmServiceImpl implements LevelAlarmService { AlarmEntity entity = new AlarmEntity(); entity.setAlarmSource(AlarmConstants.LEVEL_ALARM); entity.setAlarmId(level.getId()); - entity.setAlarmTime(new Date(level.getTs())); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.sss"); + LocalDateTime localDateTime = LocalDateTime.parse(level.getTs(), formatter); + entity.setAlarmTime(localDateTime); entity.setAlarmType(level.getType()); entity.setRealId(level.getSignage()); entity.setAlarmContext(level.getName()); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SoeAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SoeAlarmServiceImpl.java index 1b18030..191a069 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SoeAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SoeAlarmServiceImpl.java @@ -19,6 +19,8 @@ import org.springblade.core.tool.utils.CollectionUtil; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -66,13 +68,14 @@ public class SoeAlarmServiceImpl implements SoeAlarmService { private AlarmEntity getAlarmEntity(SoeAlarmVo item) { AlarmEntity entity = new AlarmEntity(); - String format = DateUtil.format(item.getTs(), org.springblade.core.tool.utils.DateUtil.PATTERN_DATETIME_MINI); entity.setAlarmId(format+"-"+item.getDeviceCode()); entity.setAlarmSource(LEVEL_ALARM); entity.setAlarmType(ONE_LEVEL); entity.setAlarmContext(item.getName()); - entity.setAlarmTime(item.getTs()); + ZoneId zoneId = ZoneId.systemDefault(); + LocalDateTime localDateTime = LocalDateTime.ofInstant(item.getTs().toInstant(), zoneId); + entity.setAlarmTime(localDateTime); entity.setAlarmValue(item.getCurrentValue()); entity.setAlarmSignage(item.getSignage()); entity.setAlarmLevel(Integer.valueOf(item.getLevel())); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SystemAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SystemAlarmServiceImpl.java index b829956..20d2ce8 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SystemAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/SystemAlarmServiceImpl.java @@ -24,6 +24,8 @@ import org.springblade.system.feign.ISysClient; import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; @@ -83,9 +85,11 @@ public class SystemAlarmServiceImpl implements SystemAlarmService { private AlarmEntity getAlarmEntity(SystemAlarmVo item) { AlarmEntity entity = new AlarmEntity(); entity.setAlarmId(item.getId()); -// Date date = new Date(item.getTs()); -// entity.setAlarmTime(DateUtil.parse(item.getTs().toString(),PATTERN_DATETIME_MILLIS)); - entity.setAlarmTime( new Date(item.getTs())); + ZoneId zoneId = ZoneId.systemDefault(); + Date alarmTime = new Date(); + alarmTime.setTime(item.getTs()); + LocalDateTime localDateTime = LocalDateTime.ofInstant(alarmTime.toInstant(), zoneId); + entity.setAlarmTime(localDateTime); entity.setAlarmContext(item.getContext()); entity.setAlarmType(item.getType()); entity.setAlarmStatus(item.getState()); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java index 5eecd34..b3c73e8 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/VideoAlarmServiceImpl.java @@ -23,6 +23,8 @@ import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.DateUtil; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -101,7 +103,9 @@ public class VideoAlarmServiceImpl implements VideoAlarmService { private AlarmEntity getAlarmEntity(DeviceSoeVO item) { AlarmEntity entity = new AlarmEntity(); entity.setAlarmId(item.getId()); - entity.setAlarmTime(DateUtil.parse(item.getTs(), PATTERN_DATETIME_MILLIS)); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.sss"); + LocalDateTime localDateTime = LocalDateTime.parse(item.getTs(), formatter); + entity.setAlarmTime(localDateTime); entity.setAlarmContext(item.getSoeExplain()); entity.setAlarmType(AlarmHandleConstant.VIDEO_ALARM); entity.setAlarmStatus(Integer.valueOf(item.getSoeStatus())); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/equipment/ThreeGenerateMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/equipment/ThreeGenerateMapper.java index e251ea5..722dfbc 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/equipment/ThreeGenerateMapper.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/equipment/ThreeGenerateMapper.java @@ -12,5 +12,4 @@ public interface ThreeGenerateMapper extends BaseMapper { void deletemMonthGenerate(@Param("month") String month,@Param("before") String before); - void deleteFillGenerate(@Param("before") String before); } \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/ThreeGenerateService.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/ThreeGenerateService.java index 123baa7..515efae 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/ThreeGenerateService.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/ThreeGenerateService.java @@ -10,6 +10,4 @@ import org.springblade.core.mp.base.BaseService; public interface ThreeGenerateService extends BaseService { void deletemMonthGenerate(@Param("month") String month); - - void deleteFillGenerate(); } \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/ThirtyGenerateServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/ThirtyGenerateServiceImpl.java index e3943cf..3d3702c 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/ThirtyGenerateServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/ThirtyGenerateServiceImpl.java @@ -30,7 +30,7 @@ public class ThirtyGenerateServiceImpl extends BaseServiceImpl stations = stationService.list(Wrappers.lambdaQuery().in(StationEntity::getType, Arrays.asList(HomePageConstant.HYDROPOWER,HomePageConstant.PHOTOVOLTAIC))); @@ -107,7 +107,7 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { List devices = JSONObject.parseObject(redisTemplate.opsForValue().get(device_cache_cofig_final).toString(), new TypeReference>() {}); // 步骤3.站点-设备当日发电量 - this.refreshDayGeneration(stations,devices,month + "-01"); + this.refreshDayGeneration(stations,devices,month); // 步骤4.近3年的当月发电量 this.thirtyMonthGenerate(stations,month); @@ -194,22 +194,20 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { * 更新近3年的当月发电量 */ private void thirtyMonthGenerate(List stations,String month) { + String queryMonth = DateUtil.format(DateUtil.parse(month,DateUtil.PATTERN_DATE),"yyyy-MM"); // 步骤1.查询设备当月累计发电量 - List generations = thirtyGenerateService.list(Wrappers.lambdaQuery().like(ThirtyGenerationEntity::getStrDay,month)); + List generations = thirtyGenerateService.list(Wrappers.lambdaQuery().like(ThirtyGenerationEntity::getStrDay,queryMonth)); - // 步骤2.删除近3年当月发电量 - threeGenerateService.deletemMonthGenerate(month + "-01"); + // 步骤2.删除近3年当月发电量,清除填报发电量 + threeGenerateService.deletemMonthGenerate(queryMonth + "-01"); // 步骤3.将当月累计发电量新增表 this.saveThreeMonthGenerate(generations,month); - // 步骤4.清除填报发电量 - threeGenerateService.deleteFillGenerate(); - - // 步骤5.清除超出30日发电量 + // 步骤4.清除超出30日发电量 thirtyGenerateService.deleteDayGenerate(month); - // 步骤6.重新补充填报发电量 + // 步骤5.重新补充填报发电量 Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MONTH, -calendar.get(Calendar.MONTH) + 12); calendar.add(Calendar.DATE, -calendar.get(Calendar.DATE) + 1); @@ -231,20 +229,21 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { if(CollectionUtil.isEmpty(generations)){ return; } - threeGenerateService.saveBatch(generations.stream().collect(Collectors.groupingBy(ThirtyGenerationEntity::getDeviceCode)).entrySet().stream().map(entry->{ + threeGenerateService.saveBatch(generations.stream().collect(Collectors.groupingBy(ThirtyGenerationEntity::getDeviceCode)).values().stream().map(thirtyGenerationEntities -> { ThreeGenerationEntity generate = new ThreeGenerationEntity(); - generate.setStationId(entry.getValue().get(0).getStationId()); - generate.setStationName(entry.getValue().get(0).getStationName()); - generate.setDeviceCode(entry.getValue().get(0).getDeviceCode()); - generate.setDeviceName(entry.getValue().get(0).getDeviceName()); - generate.setTenantId(entry.getValue().get(0).getTenantId()); - generate.setCreateDept(entry.getValue().get(0).getCreateDept()); - generate.setCreateUser(entry.getValue().get(0).getCreateUser()); - generate.setUpdateUser(entry.getValue().get(0).getUpdateUser()); - String strMonth = month + "-01"; + generate.setStationId(thirtyGenerationEntities.get(0).getStationId()); + generate.setStationName(thirtyGenerationEntities.get(0).getStationName()); + generate.setDeviceCode(thirtyGenerationEntities.get(0).getDeviceCode()); + generate.setDeviceName(thirtyGenerationEntities.get(0).getDeviceName()); + generate.setTenantId(thirtyGenerationEntities.get(0).getTenantId()); + generate.setCreateDept(thirtyGenerationEntities.get(0).getCreateDept()); + generate.setCreateUser(thirtyGenerationEntities.get(0).getCreateUser()); + generate.setUpdateUser(thirtyGenerationEntities.get(0).getUpdateUser()); + Date date = DateUtil.parse(month, DateUtil.PATTERN_DATE); + String strMonth = DateUtil.format(date, "yyyy-MM") + "-01"; generate.setStrMonth(strMonth); - generate.setMonth(DateUtil.parse(strMonth,DateUtil.PATTERN_DATE).getMonth() + 1); - generate.setGenerate(BigDecimal.valueOf(entry.getValue().stream().mapToDouble(o->o.getGenerate().doubleValue()).sum()).setScale(2, RoundingMode.HALF_UP)); + generate.setMonth(date.getMonth() + 1); + generate.setGenerate(BigDecimal.valueOf(thirtyGenerationEntities.stream().mapToDouble(o -> o.getGenerate().doubleValue()).sum()).setScale(2, RoundingMode.HALF_UP)); return generate; }).collect(Collectors.toList())); } @@ -293,7 +292,7 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { generate.setUpdateUser(station.getUpdateUser()); Date time = DateUtil.parse(record.getTs(), "yyyy-MM-dd HH:mm:ss.s"); generate.setStrDay(DateUtil.format(time,DateUtil.PATTERN_DATETIME)); - generate.setDay(time.getDay()); + generate.setDay(time.getDate()); if(StringUtil.isEmpty(record.getVal())){ generate.setGenerate(BigDecimal.ZERO); }else{ @@ -421,7 +420,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService { generation.setCreateUser(station.getCreateUser()); generation.setUpdateUser(station.getUpdateUser()); generation.setStrMonth(power.getStrMonth()); - generation.setMonth(power.getMonth()); + Date date = DateUtil.parse(power.getStrMonth(),DateUtil.PATTERN_DATE); + generation.setMonth(date.getMonth() + 1); if(power.getPower() <= 0){ generation.setGenerate(BigDecimal.ZERO); }else{ diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/ThreeGenerateMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/ThreeGenerateMapper.xml index f0465c4..5d49cfb 100644 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/ThreeGenerateMapper.xml +++ b/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/ThreeGenerateMapper.xml @@ -5,13 +5,7 @@ DELETE FROM HZIMS_EM_THREE_GENERATE WHERE STR_MONTH = #{month} - - OR STR_MONTH < #{before} - - - - DELETE FROM HZIMS_EM_THREE_GENERATE - WHERE DEVICE_CODE IS NULL + OR DEVICE_CODE IS NULL OR STR_MONTH < #{before} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java index b83ad0c..061b7e7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java @@ -258,7 +258,7 @@ public class RealMonitorServiceImpl implements IRealMonitorService { if(ObjectUtil.isEmpty(o.getSort())){ o.setSort(999); } - }).sorted(Comparator.comparing((RealStationVo::getSort))).collect(Collectors.toList()))); + }).sorted(Comparator.comparing((RealStationVo::getSort)).thenComparing(RealStationVo::getStationName)).collect(Collectors.toList()))); } /**