装置页面点击线路和杆塔修改

装置基本信息历史查询
dev
guijing.liu 2 years ago
parent 4166147619
commit eb625426b9

@ -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<ProtocolListModel> getTermBasicInfoList(BasicTermVo vo) {
ServiceBody<ProtocolListModel> serviceBody = terminalService.getTermBasicInfoList(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
} }

@ -1,50 +1,60 @@
package com.shxy.xymanager_admin.controller; //package com.shxy.xymanager_admin.controller;
//
import com.shxy.xymanager_common.annotation.Log; //import com.shxy.xymanager_common.annotation.Log;
import com.shxy.xymanager_common.base.BaseController; //import com.shxy.xymanager_common.base.BaseController;
import com.shxy.xymanager_common.base.ResponseReult; //import com.shxy.xymanager_common.base.ResponseReult;
import com.shxy.xymanager_common.bean.ServiceBody; //import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus; //import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.dto.TowerDto; //import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_common.model.AllTowerListModel; //import com.shxy.xymanager_service.service.YwService;
import com.shxy.xymanager_common.model.TowerListModel; //import io.swagger.annotations.Api;
import com.shxy.xymanager_common.vo.*; //import io.swagger.annotations.ApiOperation;
import com.shxy.xymanager_service.service.TowerService; //import io.swagger.annotations.ApiResponse;
import com.shxy.xymanager_service.service.YwService; //import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Api; //import lombok.extern.slf4j.Slf4j;
import io.swagger.annotations.ApiOperation; //import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiResponse; //import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.ApiResponses; //import org.springframework.web.bind.annotation.RequestBody;
import lombok.extern.slf4j.Slf4j; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated; //
import org.springframework.web.bind.annotation.RequestBody; //
import org.springframework.web.bind.annotation.RequestMapping; //@Api(value = "运维接口", tags = "运维接口相关")
import org.springframework.web.bind.annotation.RestController; //@RestController
//@Slf4j
//public class YunWeiController extends BaseController {
@Api(value = "运维接口", tags = "运维接口相关") //
@RestController // @Autowired
@Slf4j // YwService ywService;
public class YunWeiController extends BaseController { //
// @ApiOperation(value = "获取运维指令", notes = "获取运维指令接口", httpMethod = "POST")
@Autowired // @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
YwService ywService; // @RequestMapping("/postYwCmd")
// @Log(title = "获取运维指令", type = "查询")
@ApiOperation(value = "获取运维指令", notes = "获取运维指令接口", httpMethod = "POST") // public ResponseReult<String> postYwCmd(@RequestBody @Validated YWCmdVo vo) {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) // ServiceBody<String> serviceBody = ywService.postYwCmd(vo);
@RequestMapping("/postYwCmd") // if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
@Log(title = "获取运维指令", type = "查询") // return ResponseReult.success(serviceBody.getData());
public ResponseReult<String> postYwCmd(@RequestBody @Validated YWCmdVo vo) { //
ServiceBody<String> serviceBody = ywService.postYwCmd(vo); //
if (serviceBody.getCode() == ServiceStatus.SUCCESS) { // } else {
return ResponseReult.success(serviceBody.getData()); // return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
} 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<String> postYwCmd(@RequestBody @Validated YWCmdVo vo) {
} //// ServiceBody<String> serviceBody = ywService.postYwCmd(vo);
//// if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
//// return ResponseReult.success(serviceBody.getData());
//// } else {
//// return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
//// }
//// }
//
//
//
//}

@ -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;
}

@ -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();
}
}

@ -44,6 +44,9 @@ public class TerminalListModel implements Serializable {
@ApiModelProperty(value = "线路名称", example = "123456") @ApiModelProperty(value = "线路名称", example = "123456")
private String lineName; private String lineName;
@ApiModelProperty(value = "线路公司名称", example = "123456")
private String lineBsManufacturer;
@ApiModelProperty(value = "杆塔编号", example = "123456") @ApiModelProperty(value = "杆塔编号", example = "123456")
private Integer towerId; private Integer towerId;
@ -89,6 +92,12 @@ public class TerminalListModel implements Serializable {
@ApiModelProperty(value = "出厂编号", example = "123456") @ApiModelProperty(value = "出厂编号", example = "123456")
private String bsIdentifier; private String bsIdentifier;
@ApiModelProperty(value = "地址", example = "地址")
private String address;
@ApiModelProperty(value = "杆塔排序", example = "1")
private Integer order;
@ApiModelProperty(value = "纬度", example = "21321") @ApiModelProperty(value = "纬度", example = "21321")
private Double latitude; private Double latitude;

@ -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;
}

@ -38,6 +38,9 @@ public class TerminalPhotoSelectVo {
@ApiModelProperty(value = "查询结束时间", example = "123455") @ApiModelProperty(value = "查询结束时间", example = "123455")
private Date endtime; private Date endtime;
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
private String search;
@Min(value = 1, message = "分页位置最小从1开始") @Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1") @ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex; private int pageindex;

@ -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);
}

@ -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);
}

@ -261,21 +261,29 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>--> <!-- </table>-->
<table tableName="maintain_cmds" <!-- <table tableName="maintain_cmds"-->
domainObjectName="MaintainCmds" <!-- domainObjectName="MaintainCmds"-->
mapperName="MaintainCmdsDao" <!-- mapperName="MaintainCmdsDao"-->
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" <!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
enableSelectByExample="false" selectByExampleQueryId="false"> <!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- <property name="useActualColumnNames" value="false"/>--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
</table> <!-- </table>-->
<table tableName="maintain_cmds_history" <!-- <table tableName="maintain_cmds_history"-->
domainObjectName="MaintainCmdsHistory" <!-- domainObjectName="MaintainCmdsHistory"-->
mapperName="MaintainCmdsHistoryDao" <!-- mapperName="MaintainCmdsHistoryDao"-->
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" <!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
enableSelectByExample="false" selectByExampleQueryId="false"> <!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- <property name="useActualColumnNames" value="false"/>--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
</table> <!-- </table>-->
<!-- <table-->
<!-- tableName="terminal_basic_info_history"-->
<!-- domainObjectName="TerminalBasicInfoHistory"-->
<!-- mapperName="TerminalBasicInfoHistoryDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
</context> </context>
</generatorConfiguration> </generatorConfiguration>

@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.shxy.xymanager_dao.dao.MaintainCmdsDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.MaintainCmds">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="term_id" jdbcType="INTEGER" property="termId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.shxy.xymanager_common.entity.MaintainCmds">
<result column="cmd" jdbcType="LONGVARCHAR" property="cmd"/>
</resultMap>
<sql id="Base_Column_List">
id
, term_id, name, create_time
</sql>
<sql id="Blob_Column_List">
cmd
</sql>
<select id="selectByTermId" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List"/>
,
<include refid="Blob_Column_List"/>
from maintain_cmds
where term_id = #{temid} order by create_time asc limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from maintain_cmds
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.MaintainCmds">
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>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.MaintainCmds">
insert into maintain_cmds
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="termId != null">
term_id,
</if>
<if test="name != null">
name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="cmd != null">
cmd,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="termId != null">
#{termId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="cmd != null">
#{cmd,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.MaintainCmds">
update maintain_cmds
<set>
<if test="termId != null">
term_id = #{termId,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="cmd != null">
cmd = #{cmd,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.shxy.xymanager_common.entity.MaintainCmds">
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>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.MaintainCmds">
update maintain_cmds
set term_id = #{termId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.MaintainCmdsHistory">
<result column="id" jdbcType="BIGINT" property="id" />
<result column="term_id" jdbcType="INTEGER" property="termId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.shxy.xymanager_common.entity.MaintainCmdsHistory">
<result column="cmd" jdbcType="LONGVARCHAR" property="cmd" />
</resultMap>
<sql id="Blob_Column_List">
cmd
</sql>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.MaintainCmdsHistory">
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>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.MaintainCmdsHistory">
insert into maintain_cmds_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="termId != null">
term_id,
</if>
<if test="name != null">
name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="cmd != null">
cmd,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="termId != null">
#{termId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="cmd != null">
#{cmd,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
</mapper>

@ -52,6 +52,7 @@
<result column="sim" jdbcType="VARCHAR" property="sim"/> <result column="sim" jdbcType="VARCHAR" property="sim"/>
<result column="working_date" jdbcType="DATE" property="workingDate"/> <result column="working_date" jdbcType="DATE" property="workingDate"/>
<result column="net_type" jdbcType="INTEGER" property="netType"/> <result column="net_type" jdbcType="INTEGER" property="netType"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
</resultMap> </resultMap>
<resultMap id="ChannelAndTerm" type="com.shxy.xymanager_common.dto.ChannelAndTermDto"> <resultMap id="ChannelAndTerm" type="com.shxy.xymanager_common.dto.ChannelAndTermDto">

@ -147,6 +147,7 @@ public class LineServiceImpl implements LineService {
int i = linesDao.updateByPrimaryKeySelective(lines, new Date()); int i = linesDao.updateByPrimaryKeySelective(lines, new Date());
if (i != 0) { if (i != 0) {
cacheService.updateLineMap(); cacheService.updateLineMap();
cacheService.updateTowerMap();
return Asserts.success("修改成功"); return Asserts.success("修改成功");
} else { } else {
return Asserts.error("修改失败"); return Asserts.error("修改失败");

@ -169,7 +169,10 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
Integer channelid = vo.getChannelid(); Integer channelid = vo.getChannelid();
int pageindex = vo.getPageindex(); int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize(); int pagesize = vo.getPagesize();
String search = vo.getSearch();
if (StrUtil.isEmpty(search)) {
search = null;
}
Date starttime = vo.getStarttime(); Date starttime = vo.getStarttime();
Date endtime = vo.getEndtime(); Date endtime = vo.getEndtime();
long start = MyDateUtils.TimeMillSecond2Second(DateTime.of(starttime)); long start = MyDateUtils.TimeMillSecond2Second(DateTime.of(starttime));
@ -182,22 +185,46 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>(); List<DyAndLineAndTowerAndTermDto> dtos = new ArrayList<>();
if (dyid == null || dyid.intValue() == -1) { if (dyid == null || dyid.intValue() == -1) {
if (StrUtil.isEmpty(search)) {
PageUtils.SetPage(pageindex, pagesize); PageUtils.SetPage(pageindex, pagesize);
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); 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 { } else {
if (lineid == null || lineid.intValue() == -1) { 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 { } else {
if (towerid == null || towerid.intValue() == -1) { if (towerid == null || towerid.intValue() == -1) {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, null, CommonStatus.EFFECTIVE.value()); dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, null, null, search, CommonStatus.EFFECTIVE.value());
} else { } else {
if (termid == null || termid.intValue() == -1) { 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 { } else {
dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, null, CommonStatus.EFFECTIVE.value()); dtos = dyLevelDao.selectDyAndLineAndTowerAnTermList(dyid, lineid, towerid, termid, search, CommonStatus.EFFECTIVE.value());
} }
} }
} }
if (CollectionUtil.isEmpty(dtos)) {
list = new ArrayList<>();
} else {
for (DyAndLineAndTowerAndTermDto item1 : dtos) { for (DyAndLineAndTowerAndTermDto item1 : dtos) {
for (LineAndTowerAndTermDto item2 : item1.getList()) { for (LineAndTowerAndTermDto item2 : item1.getList()) {
for (TowerAndTermDto item3 : item2.getList()) { for (TowerAndTermDto item3 : item2.getList()) {
@ -219,6 +246,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end)); list = terminalPhotoDao.selectPhotoListByTermList(termidlist, channelidlist, BigInteger.valueOf(start), BigInteger.valueOf(end));
} }
} }
}
boolean empty = CollectionUtil.isEmpty(list); boolean empty = CollectionUtil.isEmpty(list);
if (empty) { if (empty) {

@ -74,6 +74,9 @@ public class TerminalServiceImpl implements TerminalService {
@Autowired @Autowired
CacheService cacheService; CacheService cacheService;
// @Autowired
// TerminalBasicInfoHistoryDao terminalBasicInfoHistoryDao;
/** /**
* *
@ -115,12 +118,17 @@ public class TerminalServiceImpl implements TerminalService {
TowerDto towerDto = towerMap.get(towerid); TowerDto towerDto = towerMap.get(towerid);
if (BeanUtil.isNotEmpty(towerDto)) { if (BeanUtil.isNotEmpty(towerDto)) {
terminalsBean.setTowerName(towerDto.getName()); terminalsBean.setTowerName(towerDto.getName());
terminalsBean.setOrder(towerDto.getOrder());
terminalsBean.setAddress(towerDto.getAddress());
Integer lineId = towerDto.getLineId(); Integer lineId = towerDto.getLineId();
terminalsBean.setLineId(lineId); terminalsBean.setLineId(lineId);
terminalsBean.setLineName(towerDto.getLineName()); // terminalsBean.setLineName(towerDto.getLineName());
// terminalsBean.setLineBsManufacturer(item.getLineBsManufacturer());
if (BeanUtil.isNotEmpty(lineMap)) { if (BeanUtil.isNotEmpty(lineMap)) {
LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId); LineAndDyNameDto lineAndDyNameDto = lineMap.get(lineId);
if (BeanUtil.isNotEmpty(lineAndDyNameDto)) { if (BeanUtil.isNotEmpty(lineAndDyNameDto)) {
terminalsBean.setLineName(lineAndDyNameDto.getName());
terminalsBean.setLineBsManufacturer(lineAndDyNameDto.getBsManufacturer());
terminalsBean.setDyId(lineAndDyNameDto.getDyLevelId()); terminalsBean.setDyId(lineAndDyNameDto.getDyLevelId());
terminalsBean.setDyName(lineAndDyNameDto.getDyLevelName()); terminalsBean.setDyName(lineAndDyNameDto.getDyLevelName());
} }
@ -713,6 +721,23 @@ public class TerminalServiceImpl implements TerminalService {
return null; return null;
} }
/**
*
*
* @param vo
* @return
*/
@Override
public ServiceBody<ProtocolListModel> getTermBasicInfoList(BasicTermVo vo) {
Integer termId = vo.getTermId();
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
// terminalBasicInfoHistoryDao.selectByTermiId(termid);
return null;
}
} }

@ -1,62 +1,62 @@
package com.shxy.xymanager_service.impl; //package com.shxy.xymanager_service.impl;
//
import com.shxy.xymanager_common.bean.ServiceBody; //import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.entity.MaintainCmds; ////import com.shxy.xymanager_common.entity.MaintainCmds;
import com.shxy.xymanager_common.entity.MaintainCmdsHistory; ////import com.shxy.xymanager_common.entity.MaintainCmdsHistory;
import com.shxy.xymanager_common.exception.Asserts; //import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.MaintainCmdModel; //import com.shxy.xymanager_common.model.MaintainCmdModel;
import com.shxy.xymanager_common.vo.YWCmdVo; //import com.shxy.xymanager_common.vo.YWCmdVo;
import com.shxy.xymanager_dao.dao.MaintainCmdsDao; //import com.shxy.xymanager_dao.dao.MaintainCmdsDao;
import com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao; ////import com.shxy.xymanager_dao.dao.MaintainCmdsHistoryDao;
import com.shxy.xymanager_service.service.YwService; //import com.shxy.xymanager_service.service.YwService;
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; //import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; //import org.springframework.transaction.annotation.Transactional;
//
import java.util.Date; //import java.util.Date;
//
/** ///**
* // * 运维服务实现层
* // *
* @author // * @author 晶晶
*/ // */
@Slf4j //@Slf4j
@Service //@Service
public class YwServiceImpl implements YwService { //public class YwServiceImpl implements YwService {
//
@Autowired // @Autowired
MaintainCmdsDao maintainCmdsDao; // MaintainCmdsDao maintainCmdsDao;
//
@Autowired // @Autowired
MaintainCmdsHistoryDao maintainCmdsHistoryDao; // MaintainCmdsHistoryDao maintainCmdsHistoryDao;
//
@Override // @Override
@Transactional // @Transactional
public ServiceBody postYwCmd(YWCmdVo vo) { // public ServiceBody postYwCmd(YWCmdVo vo) {
MaintainCmdModel model = new MaintainCmdModel(); // MaintainCmdModel model = new MaintainCmdModel();
Integer termId = vo.getTermId(); // Integer termId = vo.getTermId();
MaintainCmds cmds = maintainCmdsDao.selectByTermId(termId); // MaintainCmds cmds = maintainCmdsDao.selectByTermId(termId);
String cmdid = cmds.getCmd(); // String cmdid = cmds.getCmd();
Long id = cmds.getId(); // Long id = cmds.getId();
Integer cmdtermId = cmds.getTermId(); // Integer cmdtermId = cmds.getTermId();
String name = cmds.getName(); // String name = cmds.getName();
Date createTime = cmds.getCreateTime(); // Date createTime = cmds.getCreateTime();
model.setCmd(cmdid); // model.setCmd(cmdid);
model.setName(name); // model.setName(name);
model.setTermId(cmdtermId); // model.setTermId(cmdtermId);
//
MaintainCmdsHistory record = new MaintainCmdsHistory(); // MaintainCmdsHistory record = new MaintainCmdsHistory();
record.setId(id); // record.setId(id);
record.setTermId(cmdtermId); // record.setTermId(cmdtermId);
record.setName(name); // record.setName(name);
record.setCmd(cmdid); // record.setCmd(cmdid);
record.setCreateTime(createTime); // record.setCreateTime(createTime);
record.setUpdateTime(new Date()); // record.setUpdateTime(new Date());
maintainCmdsHistoryDao.insert(record); // maintainCmdsHistoryDao.insert(record);
maintainCmdsDao.deleteByPrimaryKey(id); // maintainCmdsDao.deleteByPrimaryKey(id);
//
return Asserts.success(model); // return Asserts.success(model);
} // }
} //}
//

@ -141,4 +141,11 @@ public interface TerminalService {
* @return * @return
*/ */
ServiceBody<ProtocolListModel> getAllTermDetailsList(); ServiceBody<ProtocolListModel> getAllTermDetailsList();
/**
*
* @param vo
* @return
*/
ServiceBody<ProtocolListModel> getTermBasicInfoList(BasicTermVo vo);
} }

@ -1,22 +1,22 @@
package com.shxy.xymanager_service.service; //package com.shxy.xymanager_service.service;
//
import com.shxy.xymanager_common.bean.ServiceBody; //import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.vo.*; //import com.shxy.xymanager_common.vo.*;
//
/** ///**
* // * 运维服务
* // *
* @author jingjing // * @author jingjing
*/ // */
public interface YwService { //public interface YwService {
//
//
/** // /**
* // * 获取运维指令
* // *
* @return // * @return
*/ // */
ServiceBody postYwCmd(YWCmdVo vo); // ServiceBody postYwCmd(YWCmdVo vo);
//
//
} //}

Loading…
Cancel
Save