From 14be9b9aa2d6cafa4b74429bbd7acfb2f0903bec Mon Sep 17 00:00:00 2001 From: liuguijing <123456> Date: Wed, 6 Mar 2024 20:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=91=E7=8A=B6=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DyLevelController.java | 14 - .../dto/DyLineAndTerminalWithHeartDto.java | 18 - .../entity/TerminalStatus.java | 2 + .../xymanager_common/entity/Terminals.java | 5 +- .../model/TerminalChannelTreeListModel.java | 104 ----- .../util/xinyin/TerminalUtils.java | 2 +- .../shxy/xymanager_dao/dao/DyLevelDao.java | 5 - .../src/main/resources/mappers/DyLevelDao.xml | 122 +----- .../impl/DyLevelServiceImpl.java | 377 ++++++------------ 9 files changed, 135 insertions(+), 514 deletions(-) delete mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/dto/DyLineAndTerminalWithHeartDto.java delete mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelTreeListModel.java diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java index c98e5a3..50b8e90 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/DyLevelController.java @@ -48,7 +48,6 @@ public class DyLevelController extends BaseController { } } - @ApiOperation(value = "郑州测试获取电压等级树状列表接口", notes = "郑州测试获取电压等级树状列表接口", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getzzdyTreeList") @@ -62,19 +61,6 @@ public class DyLevelController extends BaseController { } } -// @ApiOperation(value = "郑州测试获取电压等级树状列表接口", notes = "郑州测试获取电压等级树状列表接口", httpMethod = "POST") -// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) -// @RequestMapping("/getzzdyTreeList") -// @Log(title = "获取电压等级树状列表接口", type = "查询") -// public ResponseReult getzzdyTreeList(@Param("type") Integer type,@Param("lineid") Integer lineid) { -// ServiceBody serviceBody = dyLevelService.getdyTreeList(type,lineid); -// if (serviceBody.getCode() == ServiceStatus.SUCCESS) { -// return ResponseReult.success(serviceBody.getData()); -// } else { -// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); -// } -// } - @ApiOperation(value = "获取电压等级列表", notes = "获取电压等级列表", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getdyList") diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/DyLineAndTerminalWithHeartDto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/DyLineAndTerminalWithHeartDto.java deleted file mode 100644 index 1d43542..0000000 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/DyLineAndTerminalWithHeartDto.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.shxy.xymanager_common.dto; - -import lombok.Data; - -import java.util.List; - -@Data -public class DyLineAndTerminalWithHeartDto { - - private Integer id; - - private String name; - - private Integer dyValue; - - private List list; - -} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalStatus.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalStatus.java index 06e8364..fc140ce 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalStatus.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalStatus.java @@ -48,6 +48,8 @@ public class TerminalStatus implements Serializable { private BigInteger wsUpdateTime; + private BigInteger rsUpdateTime; + private BigInteger bootTime; private BigInteger updateTime; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Terminals.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Terminals.java index 430485c..6200047 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Terminals.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Terminals.java @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUnit; import com.fasterxml.jackson.annotation.JsonInclude; import com.shxy.xymanager_common.enums.CommonStatus; import com.shxy.xymanager_common.util.MyDateUtils; +import com.shxy.xymanager_common.util.xinyin.TerminalUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -19,8 +20,6 @@ import java.util.Date; @ApiModel(value = "装置", description = "装置") public class Terminals implements Serializable { - @Value("${heart.time}") - private static Integer hearttime; @ApiModelProperty(value = "装置编号", example = "123456") private Integer id; @@ -74,7 +73,7 @@ public class Terminals implements Serializable { long time = MyDateUtils.TimeSecond2MillSecond(lastheartbeat.longValue()); DateTime date = MyDateUtils.date(time); long between = MyDateUtils.between(MyDateUtils.getNowDate(), date, DateUnit.MINUTE); - if (between > hearttime) { + if (between > TerminalUtils.hearttime) { return CommonStatus.DELETE.value(); } else { return CommonStatus.EFFECTIVE.value(); diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelTreeListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelTreeListModel.java deleted file mode 100644 index 686ed0d..0000000 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalChannelTreeListModel.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.shxy.xymanager_common.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 通道列表 - */ -@Data -@ApiModel(value = "通道树状列表", description = "通道树状列表信息") -public class TerminalChannelTreeListModel implements Serializable { - - @ApiModelProperty(value = "电压列表", example = "[]") - private List list; - - @Data - public static class DyListBean { - @ApiModelProperty(value = "电压编号", example = "123456") - private Integer id; - - @ApiModelProperty(value = "电压名称", example = "AAAA") - private String name; - - @ApiModelProperty(value = "电压大小", example = "AAAA") - private Integer dyValue; - - @ApiModelProperty(value = "线路列表", example = "[]") - private List list; - } - - @Data - public static class LineBean { - - @ApiModelProperty(value = "线路编号", example = "123456") - private Integer id; - - @ApiModelProperty(value = "线路名称", example = "AAAA") - private String name; - - @ApiModelProperty(value = "单位", example = "123456") - private String bsManufacturer; - - @ApiModelProperty(value = "装置信息", example = "123456") - private List list; - - } - - @Data - public static class TerminalBean { - - @ApiModelProperty(value = "装置编号", example = "123456") - private Integer id; - - @ApiModelProperty(value = "杆塔编号", example = "123456") - private Integer towerid; - - @ApiModelProperty(value = "杆塔名称", example = "123456") - private Integer name; - - @ApiModelProperty(value = "图像监测装置 ID(17 位编码)", example = "12345678") - private String cmdid; - - @ApiModelProperty(value = "装置名称", example = "名称名称") - private String equipName; - - @ApiModelProperty(value = "显示名", example = "名称名称") - private String displayname; - - @ApiModelProperty(value = "装置型号", example = "型号型号") - private String model; - - @ApiModelProperty(value = "通道列表对象", example = "[]") - private List list; - } - - - @Data - public static class ChannelBean { - - @ApiModelProperty(value = "通道id", example = "12321") - private Integer id; - - @ApiModelProperty(value = "装置编号", example = "123456") - private Integer termId; - - @ApiModelProperty(value = "通道编号", example = "123456") - private Byte channelNo; - - @ApiModelProperty(value = "通道名称", example = "123456") - private String channelName; - - @ApiModelProperty(value = "分辨率W", example = "123456") - private Integer maxResolutionWidth; - - @ApiModelProperty(value = "分辨率H", example = "123456") - private Integer maxResolutionHeight; - - } - -} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/util/xinyin/TerminalUtils.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/util/xinyin/TerminalUtils.java index 6c348b2..ca519ba 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/util/xinyin/TerminalUtils.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/util/xinyin/TerminalUtils.java @@ -36,7 +36,7 @@ import java.util.Map; @Component public class TerminalUtils { - private static Integer hearttime; + public static Integer hearttime; private static String photoaddress; diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java index aea29df..fafb87f 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/DyLevelDao.java @@ -2,7 +2,6 @@ package com.shxy.xymanager_dao.dao; import com.shxy.xymanager_common.dto.DyAndLineAndTowerAndTermDto; import com.shxy.xymanager_common.dto.DyLineAndTerminalNoHeartDto; -import com.shxy.xymanager_common.dto.DyLineAndTerminalWithHeartDto; import com.shxy.xymanager_common.dto.DyLineAndTowertDto; import com.shxy.xymanager_common.entity.DyLevel; import com.shxy.xymanager_common.entity.DyLevelExample; @@ -26,10 +25,6 @@ public interface DyLevelDao { List selectAll(@Param("status") Integer status); - List selectTreeList(@Param("status") Integer status, @Param("dyid") List dyplist, @Param("lineid") List lineplist, @Param("towerid") List towplist, @Param("isSuper") Integer isSuper); - - List selectListTreeList( @Param("status") Integer status,@Param("list") List list); - List selectTreeListByChannelId(@Param("channelid") Integer channelid, @Param("status") Integer status); int updateByPrimaryKeySelective(DyLevel record); diff --git a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml index 3c998c0..1795359 100644 --- a/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml +++ b/xymanager_dao/src/main/resources/mappers/DyLevelDao.xml @@ -40,35 +40,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -84,7 +55,7 @@ - + @@ -223,97 +194,6 @@ - - - - -