From eb625426b98b3909b8ca576e315995ba04577a3e Mon Sep 17 00:00:00 2001 From: "guijing.liu" Date: Wed, 30 Aug 2023 18:50:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E7=BD=AE=E9=A1=B5=E9=9D=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=BA=BF=E8=B7=AF=E5=92=8C=E6=9D=86=E5=A1=94=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E8=A3=85=E7=BD=AE=E5=9F=BA=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8E=86=E5=8F=B2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TerminalController.java | 13 ++ .../controller/YunWeiController.java | 110 +++++++++------- .../xymanager_common/entity/MaintainCmds.java | 22 ---- .../entity/MaintainCmdsHistory.java | 68 ---------- .../model/TerminalListModel.java | 9 ++ .../shxy/xymanager_common/vo/BasicTermVo.java | 23 ++++ .../vo/TerminalPhotoSelectVo.java | 3 + .../xymanager_dao/dao/MaintainCmdsDao.java | 20 --- .../dao/MaintainCmdsHistoryDao.java | 9 -- .../src/main/resources/generatorConfig.xml | 64 +++++---- .../resources/mappers/MaintainCmdsDao.xml | 109 --------------- .../mappers/MaintainCmdsHistoryDao.xml | 68 ---------- .../main/resources/mappers/TerminalsDao.xml | 1 + .../impl/LineServiceImpl.java | 1 + .../impl/TerminalPhotoServiceImpl.java | 72 ++++++---- .../impl/TerminalServiceImpl.java | 29 +++- .../xymanager_service/impl/YwServiceImpl.java | 124 +++++++++--------- .../service/TerminalService.java | 7 + .../xymanager_service/service/YwService.java | 44 +++---- 19 files changed, 314 insertions(+), 482 deletions(-) delete mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmds.java delete mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmdsHistory.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/vo/BasicTermVo.java delete mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsDao.java delete mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsHistoryDao.java delete mode 100644 xymanager_dao/src/main/resources/mappers/MaintainCmdsDao.xml delete mode 100644 xymanager_dao/src/main/resources/mappers/MaintainCmdsHistoryDao.xml diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java index baec019..1383168 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java @@ -301,4 +301,17 @@ public class TerminalController extends BaseController { } } + @ApiOperation(value = "装置基本信息历史列表", notes = "装置基本信息历史列表", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/getTermBasicInfoList") + @Log(title = "装置基本信息历史列表", type = "查询") + public ResponseReult getTermBasicInfoList(BasicTermVo vo) { + ServiceBody serviceBody = terminalService.getTermBasicInfoList(vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + } diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/YunWeiController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/YunWeiController.java index 25fb0f6..2009ef5 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/YunWeiController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/YunWeiController.java @@ -1,50 +1,60 @@ -package com.shxy.xymanager_admin.controller; - -import com.shxy.xymanager_common.annotation.Log; -import com.shxy.xymanager_common.base.BaseController; -import com.shxy.xymanager_common.base.ResponseReult; -import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.bean.ServiceStatus; -import com.shxy.xymanager_common.dto.TowerDto; -import com.shxy.xymanager_common.model.AllTowerListModel; -import com.shxy.xymanager_common.model.TowerListModel; -import com.shxy.xymanager_common.vo.*; -import com.shxy.xymanager_service.service.TowerService; -import com.shxy.xymanager_service.service.YwService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -@Api(value = "运维接口", tags = "运维接口相关") -@RestController -@Slf4j -public class YunWeiController extends BaseController { - - @Autowired - YwService ywService; - - @ApiOperation(value = "获取运维指令", notes = "获取运维指令接口", httpMethod = "POST") - @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/postYwCmd") - @Log(title = "获取运维指令", type = "查询") - public ResponseReult postYwCmd(@RequestBody @Validated YWCmdVo vo) { - ServiceBody serviceBody = ywService.postYwCmd(vo); - if (serviceBody.getCode() == ServiceStatus.SUCCESS) { - return ResponseReult.success(serviceBody.getData()); - } else { - return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); - } - } - - - - -} +//package com.shxy.xymanager_admin.controller; +// +//import com.shxy.xymanager_common.annotation.Log; +//import com.shxy.xymanager_common.base.BaseController; +//import com.shxy.xymanager_common.base.ResponseReult; +//import com.shxy.xymanager_common.bean.ServiceBody; +//import com.shxy.xymanager_common.bean.ServiceStatus; +//import com.shxy.xymanager_common.vo.*; +//import com.shxy.xymanager_service.service.YwService; +//import io.swagger.annotations.Api; +//import io.swagger.annotations.ApiOperation; +//import io.swagger.annotations.ApiResponse; +//import io.swagger.annotations.ApiResponses; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.validation.annotation.Validated; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +// +//@Api(value = "运维接口", tags = "运维接口相关") +//@RestController +//@Slf4j +//public class YunWeiController extends BaseController { +// +// @Autowired +// YwService ywService; +// +// @ApiOperation(value = "获取运维指令", notes = "获取运维指令接口", httpMethod = "POST") +// @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) +// @RequestMapping("/postYwCmd") +// @Log(title = "获取运维指令", type = "查询") +// public ResponseReult postYwCmd(@RequestBody @Validated YWCmdVo vo) { +// ServiceBody serviceBody = ywService.postYwCmd(vo); +// 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("/getYwCmdList") +//// @Log(title = "获取运维指令", type = "查询") +//// public ResponseReult postYwCmd(@RequestBody @Validated YWCmdVo vo) { +//// ServiceBody serviceBody = ywService.postYwCmd(vo); +//// if (serviceBody.getCode() == ServiceStatus.SUCCESS) { +//// return ResponseReult.success(serviceBody.getData()); +//// } else { +//// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); +//// } +//// } +// +// +// +//} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmds.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmds.java deleted file mode 100644 index 469af0e..0000000 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmds.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.shxy.xymanager_common.entity; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -@Data -public class MaintainCmds implements Serializable { - private Long id; - - private Integer termId; - - private String name; - - private Date createTime; - - private String cmd; - - private static final long serialVersionUID = 1L; - -} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmdsHistory.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmdsHistory.java deleted file mode 100644 index 0f92fcd..0000000 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/MaintainCmdsHistory.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.shxy.xymanager_common.entity; - -import java.io.Serializable; -import java.util.Date; - -public class MaintainCmdsHistory implements Serializable { - private Long id; - - private Integer termId; - - private String name; - - private Date createTime; - - private Date updateTime; - - private String cmd; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getTermId() { - return termId; - } - - public void setTermId(Integer termId) { - this.termId = termId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd == null ? null : cmd.trim(); - } -} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalListModel.java index 7a22ee8..420a43a 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalListModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalListModel.java @@ -44,6 +44,9 @@ public class TerminalListModel implements Serializable { @ApiModelProperty(value = "线路名称", example = "123456") private String lineName; + @ApiModelProperty(value = "线路公司名称", example = "123456") + private String lineBsManufacturer; + @ApiModelProperty(value = "杆塔编号", example = "123456") private Integer towerId; @@ -89,6 +92,12 @@ public class TerminalListModel implements Serializable { @ApiModelProperty(value = "出厂编号", example = "123456") private String bsIdentifier; + @ApiModelProperty(value = "地址", example = "地址") + private String address; + + @ApiModelProperty(value = "杆塔排序", example = "1") + private Integer order; + @ApiModelProperty(value = "纬度", example = "21321") private Double latitude; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/BasicTermVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/BasicTermVo.java new file mode 100644 index 0000000..85495ce --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/BasicTermVo.java @@ -0,0 +1,23 @@ +package com.shxy.xymanager_common.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +@Data +@ApiModel(value = "装置基本信息列表请求", description = "装置基本信息列表请求") +public class BasicTermVo { + @ApiModelProperty(value = "编号", example = "设备编号") + private Integer termId; + + @Min(value = 1, message = "分页位置最小从1开始") + @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") + private int pageindex; + + @Min(value = 1, message = "分页大小最小为1") + @ApiModelProperty(value = "分页大小", required = true, example = "1") + private int pagesize; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalPhotoSelectVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalPhotoSelectVo.java index fd57f1d..7a83a61 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalPhotoSelectVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalPhotoSelectVo.java @@ -38,6 +38,9 @@ public class TerminalPhotoSelectVo { @ApiModelProperty(value = "查询结束时间", example = "123455") private Date endtime; + @ApiModelProperty(value = "搜索内容", example = "搜索内容字段") + private String search; + @Min(value = 1, message = "分页位置最小从1开始") @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") private int pageindex; diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsDao.java deleted file mode 100644 index 6dd782d..0000000 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsDao.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.shxy.xymanager_dao.dao; - -import com.shxy.xymanager_common.entity.MaintainCmds; -import org.apache.ibatis.annotations.Param; - -public interface MaintainCmdsDao { - int deleteByPrimaryKey(Long id); - - int insert(MaintainCmds record); - - int insertSelective(MaintainCmds record); - - MaintainCmds selectByTermId(@Param("temid") Integer temid); - - int updateByPrimaryKeySelective(MaintainCmds record); - - int updateByPrimaryKeyWithBLOBs(MaintainCmds record); - - int updateByPrimaryKey(MaintainCmds record); -} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsHistoryDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsHistoryDao.java deleted file mode 100644 index bd52cb8..0000000 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/MaintainCmdsHistoryDao.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.shxy.xymanager_dao.dao; - -import com.shxy.xymanager_common.entity.MaintainCmdsHistory; - -public interface MaintainCmdsHistoryDao { - int insert(MaintainCmdsHistory record); - - int insertSelective(MaintainCmdsHistory record); -} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index dc78b15..213e6e6 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -237,45 +237,53 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - + + + + + + - - - -
- - - -
- \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/MaintainCmdsDao.xml b/xymanager_dao/src/main/resources/mappers/MaintainCmdsDao.xml deleted file mode 100644 index 1ccd3b7..0000000 --- a/xymanager_dao/src/main/resources/mappers/MaintainCmdsDao.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - id - , term_id, name, create_time - - - cmd - - - - delete - from maintain_cmds - where id = #{id,jdbcType=BIGINT} - - - insert into maintain_cmds (id, term_id, name, - create_time, cmd) - values (#{id,jdbcType=BIGINT}, #{termId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{cmd,jdbcType=LONGVARCHAR}) - - - insert into maintain_cmds - - - id, - - - term_id, - - - name, - - - create_time, - - - cmd, - - - - - #{id,jdbcType=BIGINT}, - - - #{termId,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{cmd,jdbcType=LONGVARCHAR}, - - - - - update maintain_cmds - - - term_id = #{termId,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - cmd = #{cmd,jdbcType=LONGVARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update maintain_cmds - set term_id = #{termId,jdbcType=INTEGER}, - name = #{name,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - cmd = #{cmd,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=BIGINT} - - - update maintain_cmds - set term_id = #{termId,jdbcType=INTEGER}, - name = #{name,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/MaintainCmdsHistoryDao.xml b/xymanager_dao/src/main/resources/mappers/MaintainCmdsHistoryDao.xml deleted file mode 100644 index bd2f335..0000000 --- a/xymanager_dao/src/main/resources/mappers/MaintainCmdsHistoryDao.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - cmd - - - insert into maintain_cmds_history (id, term_id, name, - create_time, update_time, cmd - ) - values (#{id,jdbcType=BIGINT}, #{termId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{cmd,jdbcType=LONGVARCHAR} - ) - - - insert into maintain_cmds_history - - - id, - - - term_id, - - - name, - - - create_time, - - - update_time, - - - cmd, - - - - - #{id,jdbcType=BIGINT}, - - - #{termId,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - #{cmd,jdbcType=LONGVARCHAR}, - - - - \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalsDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalsDao.xml index 72b4851..aadcf1c 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalsDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalsDao.xml @@ -52,6 +52,7 @@ + diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java index 1424821..83a5afe 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LineServiceImpl.java @@ -147,6 +147,7 @@ public class LineServiceImpl implements LineService { int i = linesDao.updateByPrimaryKeySelective(lines, new Date()); if (i != 0) { cacheService.updateLineMap(); + cacheService.updateTowerMap(); return Asserts.success("修改成功"); } else { return Asserts.error("修改失败"); diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java index 3977a9e..d55d2fd 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalPhotoServiceImpl.java @@ -169,7 +169,10 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService { Integer channelid = vo.getChannelid(); int pageindex = vo.getPageindex(); int pagesize = vo.getPagesize(); - + String search = vo.getSearch(); + if (StrUtil.isEmpty(search)) { + search = null; + } Date starttime = vo.getStarttime(); Date endtime = vo.getEndtime(); long start = MyDateUtils.TimeMillSecond2Second(DateTime.of(starttime)); @@ -182,41 +185,66 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService { List dtos = new ArrayList<>(); if (dyid == null || dyid.intValue() == -1) { - PageUtils.SetPage(pageindex, pagesize); - list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); + if (StrUtil.isEmpty(search)) { + PageUtils.SetPage(pageindex, pagesize); + list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); + + } else { + dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(null, null, null, null, search, CommonStatus.EFFECTIVE.value()); + if (CollectionUtil.isEmpty(dtos)) { + list = new ArrayList<>(); + } else { + for (DyAndLineAndTowerAndTermDto item1 : dtos) { + for (LineAndTowerAndTermDto item2 : item1.getList()) { + for (TowerAndTermDto item3 : item2.getList()) { + for (Terminals item4 : item3.getList()) { + termidlist.add(item4.getId()); + } + } + } + } + PageUtils.SetPage(pageindex, pagesize); + list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); + } + } + } else { if (lineid == null || lineid.intValue() == -1) { - dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, null, CommonStatus.EFFECTIVE.value()); + dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, null, null, null, search, CommonStatus.EFFECTIVE.value()); } else { - if (towerid == null || towerid.intValue() == -1) { - dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, null, CommonStatus.EFFECTIVE.value()); + if (towerid == null || towerid.intValue() == -1) { + dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, search, CommonStatus.EFFECTIVE.value()); } else { if (termid == null || termid.intValue() == -1) { - dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, null, CommonStatus.EFFECTIVE.value()); + dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, null, search, CommonStatus.EFFECTIVE.value()); } else { - dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, null, CommonStatus.EFFECTIVE.value()); + dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, search, CommonStatus.EFFECTIVE.value()); } } } - for (DyAndLineAndTowerAndTermDto item1 : dtos) { - for (LineAndTowerAndTermDto item2 : item1.getList()) { - for (TowerAndTermDto item3 : item2.getList()) { - for (Terminals item4 : item3.getList()) { - termidlist.add(item4.getId()); + if (CollectionUtil.isEmpty(dtos)) { + list = new ArrayList<>(); + } else { + for (DyAndLineAndTowerAndTermDto item1 : dtos) { + for (LineAndTowerAndTermDto item2 : item1.getList()) { + for (TowerAndTermDto item3 : item2.getList()) { + for (Terminals item4 : item3.getList()) { + termidlist.add(item4.getId()); + } } } } - } - if (channelid == null || channelid.intValue() == -1) { + if (channelid == null || channelid.intValue() == -1) { - } else { - channelidlist.add(channelid); - } - if (termidlist.size() == 0) { + } else { + channelidlist.add(channelid); + } + if (termidlist.size() == 0) { - } else { - PageUtils.SetPage(pageindex, pagesize); - list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); + } else { + PageUtils.SetPage(pageindex, pagesize); + list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); + } } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java index 1b860fb..ef35cbd 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java @@ -74,6 +74,9 @@ public class TerminalServiceImpl implements TerminalService { @Autowired CacheService cacheService; +// @Autowired +// TerminalBasicInfoHistoryDao terminalBasicInfoHistoryDao; + /** * 获取所有设备列表 @@ -99,7 +102,7 @@ public class TerminalServiceImpl implements TerminalService { int pageindex = vo.getPageindex(); int pagesize = vo.getPagesize(); PageUtils.SetPage(pageindex, pagesize); - List list2 = terminalsDao.selectTermAndStatusList(null, dyid, lineid, tower, search,isonline,time); + List list2 = terminalsDao.selectTermAndStatusList(null, dyid, lineid, tower, search, isonline, time); boolean empty = CollectionUtil.isEmpty(list2); if (empty) { model.setList(new ArrayList<>()); @@ -115,12 +118,17 @@ public class TerminalServiceImpl implements TerminalService { TowerDto towerDto = towerMap.get(towerid); if (BeanUtil.isNotEmpty(towerDto)) { terminalsBean.setTowerName(towerDto.getName()); + terminalsBean.setOrder(towerDto.getOrder()); + terminalsBean.setAddress(towerDto.getAddress()); Integer lineId = towerDto.getLineId(); terminalsBean.setLineId(lineId); - terminalsBean.setLineName(towerDto.getLineName()); +// terminalsBean.setLineName(towerDto.getLineName()); +// terminalsBean.setLineBsManufacturer(item.getLineBsManufacturer()); if (BeanUtil.isNotEmpty(lineMap)) { LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId); if (BeanUtil.isNotEmpty(lineAndDyNameDto)) { + terminalsBean.setLineName(lineAndDyNameDto.getName()); + terminalsBean.setLineBsManufacturer(lineAndDyNameDto.getBsManufacturer()); terminalsBean.setDyId(lineAndDyNameDto.getDyLevelId()); terminalsBean.setDyName(lineAndDyNameDto.getDyLevelName()); } @@ -713,6 +721,23 @@ public class TerminalServiceImpl implements TerminalService { return null; } + /** + * 获取装置历史信息列表 + * + * @param vo + * @return + */ + @Override + public ServiceBody getTermBasicInfoList(BasicTermVo vo) { + Integer termId = vo.getTermId(); + int pageindex = vo.getPageindex(); + int pagesize = vo.getPagesize(); +// terminalBasicInfoHistoryDao.selectByTermiId(termid); + + + return null; + } + } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/YwServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/YwServiceImpl.java index 5968d5c..11dc898 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/YwServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/YwServiceImpl.java @@ -1,62 +1,62 @@ -package com.shxy.xymanager_service.impl; - -import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.entity.MaintainCmds; -import com.shxy.xymanager_common.entity.MaintainCmdsHistory; -import com.shxy.xymanager_common.exception.Asserts; -import com.shxy.xymanager_common.model.MaintainCmdModel; -import com.shxy.xymanager_common.vo.YWCmdVo; -import com.shxy.xymanager_dao.dao.MaintainCmdsDao; -import com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao; -import com.shxy.xymanager_service.service.YwService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Date; - -/** - * 运维服务实现层 - * - * @author 晶晶 - */ -@Slf4j -@Service -public class YwServiceImpl implements YwService { - - @Autowired - MaintainCmdsDao maintainCmdsDao; - - @Autowired - MaintainCmdsHistoryDao maintainCmdsHistoryDao; - - @Override - @Transactional - public ServiceBody postYwCmd(YWCmdVo vo) { - MaintainCmdModel model = new MaintainCmdModel(); - Integer termId = vo.getTermId(); - MaintainCmds cmds = maintainCmdsDao.selectByTermId(termId); - String cmdid = cmds.getCmd(); - Long id = cmds.getId(); - Integer cmdtermId = cmds.getTermId(); - String name = cmds.getName(); - Date createTime = cmds.getCreateTime(); - model.setCmd(cmdid); - model.setName(name); - model.setTermId(cmdtermId); - - MaintainCmdsHistory record = new MaintainCmdsHistory(); - record.setId(id); - record.setTermId(cmdtermId); - record.setName(name); - record.setCmd(cmdid); - record.setCreateTime(createTime); - record.setUpdateTime(new Date()); - maintainCmdsHistoryDao.insert(record); - maintainCmdsDao.deleteByPrimaryKey(id); - - return Asserts.success(model); - } -} - +//package com.shxy.xymanager_service.impl; +// +//import com.shxy.xymanager_common.bean.ServiceBody; +////import com.shxy.xymanager_common.entity.MaintainCmds; +////import com.shxy.xymanager_common.entity.MaintainCmdsHistory; +//import com.shxy.xymanager_common.exception.Asserts; +//import com.shxy.xymanager_common.model.MaintainCmdModel; +//import com.shxy.xymanager_common.vo.YWCmdVo; +//import com.shxy.xymanager_dao.dao.MaintainCmdsDao; +////import com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao; +//import com.shxy.xymanager_service.service.YwService; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Service; +//import org.springframework.transaction.annotation.Transactional; +// +//import java.util.Date; +// +///** +// * 运维服务实现层 +// * +// * @author 晶晶 +// */ +//@Slf4j +//@Service +//public class YwServiceImpl implements YwService { +// +// @Autowired +// MaintainCmdsDao maintainCmdsDao; +// +// @Autowired +// MaintainCmdsHistoryDao maintainCmdsHistoryDao; +// +// @Override +// @Transactional +// public ServiceBody postYwCmd(YWCmdVo vo) { +// MaintainCmdModel model = new MaintainCmdModel(); +// Integer termId = vo.getTermId(); +// MaintainCmds cmds = maintainCmdsDao.selectByTermId(termId); +// String cmdid = cmds.getCmd(); +// Long id = cmds.getId(); +// Integer cmdtermId = cmds.getTermId(); +// String name = cmds.getName(); +// Date createTime = cmds.getCreateTime(); +// model.setCmd(cmdid); +// model.setName(name); +// model.setTermId(cmdtermId); +// +// MaintainCmdsHistory record = new MaintainCmdsHistory(); +// record.setId(id); +// record.setTermId(cmdtermId); +// record.setName(name); +// record.setCmd(cmdid); +// record.setCreateTime(createTime); +// record.setUpdateTime(new Date()); +// maintainCmdsHistoryDao.insert(record); +// maintainCmdsDao.deleteByPrimaryKey(id); +// +// return Asserts.success(model); +// } +//} +// diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java index 59c9287..8323940 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java @@ -141,4 +141,11 @@ public interface TerminalService { * @return */ ServiceBody getAllTermDetailsList(); + + /** + * 获取装置历史信息列表 + * @param vo + * @return + */ + ServiceBody getTermBasicInfoList(BasicTermVo vo); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/YwService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/YwService.java index 56fadee..515c3c9 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/YwService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/YwService.java @@ -1,22 +1,22 @@ -package com.shxy.xymanager_service.service; - -import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.vo.*; - -/** - * 运维服务 - * - * @author jingjing - */ -public interface YwService { - - - /** - * 获取运维指令 - * - * @return - */ - ServiceBody postYwCmd(YWCmdVo vo); - - -} +//package com.shxy.xymanager_service.service; +// +//import com.shxy.xymanager_common.bean.ServiceBody; +//import com.shxy.xymanager_common.vo.*; +// +///** +// * 运维服务 +// * +// * @author jingjing +// */ +//public interface YwService { +// +// +// /** +// * 获取运维指令 +// * +// * @return +// */ +// ServiceBody postYwCmd(YWCmdVo vo); +// +// +//}