dev
liuguijing 2 years ago
commit 6a6add6b60

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

@ -0,0 +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.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<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());
// }
// }
//
//// @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());
//// }
//// }
//
//
//
//}

@ -0,0 +1,25 @@
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.math.BigInteger;
import java.util.Date;
import java.util.List;
/**
*
*/
@Data
@ApiModel(value = "查询运维命令返回对象", description = "查询运维命令返回对象信息")
public class MaintainCmdModel implements Serializable {
@ApiModelProperty(value = "装置编号", example = "120")
private Integer termId;
@ApiModelProperty(value = "name", example = "120")
private String name;
@ApiModelProperty(value = "cmd", example = "1")
private String cmd;
}

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

@ -1,6 +1,7 @@
package com.shxy.xymanager_common.util.xinyin;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import com.shxy.xymanager_common.dto.LineAndDyNameDto;
@ -19,6 +20,7 @@ import org.springframework.stereotype.Component;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -72,6 +74,17 @@ public class TerminalUtils {
}
}
/**
*
*
*/
public static BigInteger generateOnlineTime() {
DateTime offset = MyDateUtils.offset(new Date(), DateField.MINUTE, -hearttime);
long l = MyDateUtils.TimeMillSecond2Second(offset);
BigInteger bigInteger = BigInteger.valueOf(l);
return bigInteger;
}
/**
*
*/

@ -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")
private Date endtime;
@ApiModelProperty(value = "搜索内容", example = "搜索内容字段")
private String search;
@Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex;

@ -24,6 +24,9 @@ public class TerminalSelectVo {
@ApiModelProperty(value = "搜索内容", example = "搜索内容")
private String search;
@ApiModelProperty(value = "在线离线", example = "0--掉线 1--在线")
private Integer isonline;
@Min(value = 1, message = "分页位置最小从1开始")
@ApiModelProperty(value = "分页位置从1开始", required = true, example = "1")
private int pageindex;

@ -0,0 +1,20 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel(value = "运维编号对象", description = "运维编号对象描述")
public class YWCmdVo {
@ApiModelProperty(value = "装置编号", example = "123456")
@NotNull(message = "装置编号")
private Integer termId;
}

@ -18,7 +18,7 @@ public interface TerminalsDao {
Terminals selectById(@Param("id") Integer id, @Param("status") Integer status);
List<TerminalsAndStatusDto> selectTermAndStatusList(@Param("status") Integer status, @Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("search") String search);
List<TerminalsAndStatusDto> selectTermAndStatusList(@Param("status") Integer status, @Param("dyid") Integer dyid, @Param("lineid") Integer lineid, @Param("towerid") Integer towerid, @Param("search") String search,@Param("isonline") Integer isonline,@Param("time") BigInteger time);
List<TerminalsAndStatusDto> selectTermAndStatusStatisticsList(@Param("status") Integer status);

@ -5,7 +5,7 @@
<generatorConfiguration>
<classPathEntry
location="D:\WorkTool\IntellijIdea\maven_repository\mysql\mysql-connector-java\8.0.27\mysql-connector-java-8.0.27.jar"/>
location="D:\idea\mavenrepository\mysql\mysql-connector-java\8.0.27\mysql-connector-java-8.0.27.jar"/>
<context id="sqlserverTables" targetRuntime="MyBatis3">
<!-- 生成的pojo将implements Serializable-->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>
@ -35,7 +35,7 @@
也可以使用“MAVEN”来自动生成这样生成的代码会在target/generatord-source目录下
-->
<javaModelGenerator targetPackage="com.shxy.xymanager_common.entity"
targetProject="D:/Project/JAVAProject/xympbackend/xymanager_common/src/main/java">
targetProject="D:/project/java/backend/xymanager_common/src/main/java">
<property name="enableSubPackages" value="true"/>
<!-- 从数据库返回的值被清理前后的空格 -->
<property name="trimStrings" value="true"/>
@ -237,29 +237,53 @@
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="terminal_img_alarm_params"-->
<!-- domainObjectName="TerminalImgAlarmParams"-->
<!-- mapperName="TerminalImgAlarmParamsDao"-->
<!-- <table tableName="terminal_img_alarm_params"-->
<!-- domainObjectName="TerminalImgAlarmParams"-->
<!-- mapperName="TerminalImgAlarmParamsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="global_params"-->
<!-- domainObjectName="GlobalParams"-->
<!-- mapperName="GlobalParamsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="protocols"-->
<!-- domainObjectName="Protocols"-->
<!-- mapperName="ProtocolsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="maintain_cmds"-->
<!-- domainObjectName="MaintainCmds"-->
<!-- mapperName="MaintainCmdsDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<!-- <table tableName="global_params"-->
<!-- domainObjectName="GlobalParams"-->
<!-- mapperName="GlobalParamsDao"-->
<!-- <table tableName="maintain_cmds_history"-->
<!-- domainObjectName="MaintainCmdsHistory"-->
<!-- mapperName="MaintainCmdsHistoryDao"-->
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>-->
<table tableName="protocols"
domainObjectName="Protocols"
mapperName="ProtocolsDao"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false">
<!-- <property name="useActualColumnNames" value="false"/>-->
</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>
</generatorConfiguration>

@ -52,6 +52,7 @@
<result column="sim" jdbcType="VARCHAR" property="sim"/>
<result column="working_date" jdbcType="DATE" property="workingDate"/>
<result column="net_type" jdbcType="INTEGER" property="netType"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
</resultMap>
<resultMap id="ChannelAndTerm" type="com.shxy.xymanager_common.dto.ChannelAndTermDto">
@ -90,10 +91,11 @@
<sql id="Base_Column_List">
id, line_id,tower_id,cmdid, org_id, equip_name, display_name, model, essential_info_version, has_pan,
id
, line_id,tower_id,cmdid, org_id, equip_name, display_name, model, essential_info_version, has_pan,
bs_manufacturer, bs_production_date, bs_identifier, latitude, longitude, create_time,
update_time,sim,working_date,net_type
</sql>
</sql>
<select id="selectAll" resultMap="BaseResultMap">
select
@ -184,6 +186,14 @@
<if test="search != null">
and (b.name like "%"#{search}"%" or c.name like "%"#{search}"%" or d.cmdid like "%"#{search}"%")
</if>
<if test="isonline != null">
<if test="isonline == 0">
and e.last_heartbeat <![CDATA[<=]]> #{time}
</if>
<if test="isonline == 1">
and e.last_heartbeat <![CDATA[>=]]> #{time}
</if>
</if>
</where>
order by d.create_time desc
@ -598,33 +608,31 @@
where id = #{data.id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Terminals">
update terminals
set cmdid = #{cmdid,jdbcType=VARCHAR},
org_id = #{orgId,jdbcType=SMALLINT},
equip_name = #{equipName,jdbcType=VARCHAR},
display_name = #{displayName,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
has_pan = #{hasPan,jdbcType=TINYINT},
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
bs_production_date = #{bsProductionDate,jdbcType=DATE},
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=DOUBLE},
longitude = #{longitude,jdbcType=DOUBLE},
update_time = #{updateat}
where id = #{id,jdbcType=INTEGER}
</update>
update terminals
set cmdid = #{cmdid,jdbcType=VARCHAR},
org_id = #{orgId,jdbcType=SMALLINT},
equip_name = #{equipName,jdbcType=VARCHAR},
display_name = #{displayName,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
has_pan = #{hasPan,jdbcType=TINYINT},
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
bs_production_date = #{bsProductionDate,jdbcType=DATE},
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=DOUBLE},
longitude = #{longitude,jdbcType=DOUBLE},
update_time = #{updateat}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getCmdIdByTermId" resultType="java.lang.String">
select
cmdid
select cmdid
from terminals
where id = #{termId,jdbcType=INTEGER}
</select>
<select id="getUpdateTime" resultType="java.math.BigInteger">
select
ws_update_time wsUpdateTime
select ws_update_time wsUpdateTime
from terminal_status
where term_id = #{termId,jdbcType=INTEGER}
</select>

@ -34,7 +34,7 @@
<if test="search != null">
and (t.name like "%"#{search}"%" or l.name like "%"#{search}"%" or t.address like "%"#{search}"%")
</if>
order by t.`order` asc,l.id desc
order by t.`order` asc, t.id desc
</select>

@ -72,7 +72,7 @@ public class LineServiceImpl implements LineService {
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize);
List<LineAndDyNameDto> list = linesDao.selectAll(CommonStatus.EFFECTIVE.value(),search);
List<LineAndDyNameDto> list = linesDao.selectAll(CommonStatus.EFFECTIVE.value(), search);
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
@ -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("修改失败");
@ -188,7 +189,13 @@ public class LineServiceImpl implements LineService {
for (Terminals item : list) {
LineAndGtAndChannelListModel.Bean bean = new LineAndGtAndChannelListModel.Bean();
bean.setId(item.getId());
bean.setName(item.getDisplayName());
String displayName = item.getDisplayName();
if (StrUtil.isEmpty(displayName)) {
bean.setName(item.getCmdid());
} else {
bean.setName(item.getDisplayName());
}
beans.add(bean);
}
}

@ -123,7 +123,11 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
if (StringUtils.isNotBlank(thumbPhotoPath)) {
photoBean.setThumb(thumbPhotoPath);
}
photoBean.setChannelName(termchannelMap.get(channelId).getChannelName());
if (termchannelMap != null) {
if (termchannelMap.get(channelId) != null) {
photoBean.setChannelName(termchannelMap.get(channelId).getChannelName());
}
}
if (termchannelMapMap != null) {
TerminalChannelMapper terminalChannelMapper = termchannelMapMap.get(termId + "#" + channelId);
if (terminalChannelMapper != null) {
@ -165,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));
@ -178,41 +185,66 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
List<DyAndLineAndTowerAndTermDto> 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));
}
}
}

@ -249,8 +249,8 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
Map<Integer, Terminals> terminalMap = cacheService.getTerminalMap();
ArrayList<GetScheduleRequestIdListModel.RequestBean> requestIdList = new ArrayList<>();
ArrayList<TerminalSchedulesTemp> templist = new ArrayList<>();
for (int i = 0; i < termlist.size(); i++) {
ArrayList<TerminalSchedulesTemp> templist = new ArrayList<>();
String cmdid = null;
RelateTerminalListRuleIdVo.Items items = termlist.get(i);
Integer termid = items.getTermid();
@ -270,10 +270,6 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
String timestr = ScheduleListUtils.relateTime(timelist);
int requestId = Constants.REQUEST_ID.addAndGet(1);
String cmd = CmaUtil.relateSchelduleRule(timelist, cmdid, requestId, channelid, timestr);
ProcessExecUtils.exec(cmd);
log.info("cma下发时间表命令", cmd);
GetScheduleRequestIdListModel.RequestBean requestBean = new GetScheduleRequestIdListModel.RequestBean();
requestBean.setTermid(termid);
requestBean.setChannelid(channelid);
@ -295,11 +291,14 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
temp.setOffset(offset);
templist.add(temp);
}
}
if (CollectionUtil.isNotEmpty(templist)) {
terminalSchedulesTempDao.deleteByTermidAndChannelid(templist);
Date date = new Date();
terminalSchedulesTempDao.insertList(templist, CommonStatus.DELETE.value(), date, date);
if (CollectionUtil.isNotEmpty(templist)) {
terminalSchedulesTempDao.deleteByTermidAndChannelid(templist);
Date date = new Date();
terminalSchedulesTempDao.insertList(templist, CommonStatus.DELETE.value(), date, date);
String cmd = CmaUtil.relateSchelduleRule(timelist, cmdid, requestId, channelid, timestr);
ProcessExecUtils.exec(cmd);
log.info("cma下发时间表命令", cmd);
}
}
model.setList(requestIdList);
return Asserts.success(model);

@ -74,6 +74,9 @@ public class TerminalServiceImpl implements TerminalService {
@Autowired
CacheService cacheService;
// @Autowired
// TerminalBasicInfoHistoryDao terminalBasicInfoHistoryDao;
/**
*
@ -90,6 +93,8 @@ public class TerminalServiceImpl implements TerminalService {
Integer lineid = vo.getLineId();
Integer tower = vo.getTowerId();
String search = vo.getSearch();
Integer isonline = vo.getIsonline();
BigInteger time = TerminalUtils.generateOnlineTime();
if (StrUtil.isEmpty(search)) {
search = null;
}
@ -97,7 +102,7 @@ public class TerminalServiceImpl implements TerminalService {
int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize);
List<TerminalsAndStatusDto> list2 = terminalsDao.selectTermAndStatusList(null, dyid, lineid, tower, search);
List<TerminalsAndStatusDto> list2 = terminalsDao.selectTermAndStatusList(null, dyid, lineid, tower, search, isonline, time);
boolean empty = CollectionUtil.isEmpty(list2);
if (empty) {
model.setList(new ArrayList<>());
@ -113,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());
}
@ -711,6 +721,23 @@ public class TerminalServiceImpl implements TerminalService {
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;
}
}

@ -0,0 +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);
// }
//}
//

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

@ -0,0 +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);
//
//
//}
Loading…
Cancel
Save