From 83742e476be26188965380c0c7cebf03f867e204 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 09 十二月 2024 09:02:03 +0800 Subject: [PATCH] 远程监控功能中,显示设备报警信息同时也显示报警接收时间,修改相应的代码与SQL --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java index 6cd780d..8e49596 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/util/DistrictLevel.java @@ -1,7 +1,13 @@ package com.dy.pipIrrGlobal.util; +import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.annotation.EnumValue; import com.dy.common.mybatis.envm.IEnum; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * 琛屾斂鍖哄垝绾у埆 @@ -24,6 +30,18 @@ this.name = name ; } + //鐢ㄦ潵杞琷son + public static List<Map> LevelList = new ArrayList<>(); + static { + DistrictLevel[] all = DistrictLevel.values(); + for (DistrictLevel one : all) { + Map<String, Object> objMap = new HashMap<>(); + objMap.put("code", one.code); + objMap.put("name", one.name); + LevelList.add(objMap) ; + } + } + @Override public Byte getCode() { return this.code ; @@ -35,9 +53,9 @@ } public static DistrictLevel get(Byte code){ - if(code.byteValue() == Province.code.byteValue()){ - return Province ; - }if(code.byteValue() == City.code.byteValue()){ + if(code.byteValue() == Province.code.byteValue()) { + return Province; + }else if(code.byteValue() == City.code.byteValue()){ return City ; }else if(code.byteValue() == County.code.byteValue()){ return County ; -- Gitblit v1.8.0