Merge remote-tracking branch 'origin/master'

jni
18616268358 2 years ago
commit b830b60d34

@ -0,0 +1,47 @@
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.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalAllChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_service.service.TermSetService;
import com.shxy.xymanager_service.service.TerminalChannelService;
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 = "装置cma控制", tags = "装置cma控制")
@RestController
@Slf4j
public class TermSetController extends BaseController {
@Autowired
TermSetService termSetService;
@ApiOperation(value = "装置cma控制", notes = "装置cma控制", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/alarmMark")
@Log(title = "装置cma控制", type = "查询")
public ResponseReult<Integer> alarmMark(@RequestBody @Validated TerminalIdVo vo) {
ServiceBody<Integer> serviceBody = termSetService.alarmMark(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -5,10 +5,7 @@ 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.model.TerminalListModel;
import com.shxy.xymanager_common.model.TerminalModel;
import com.shxy.xymanager_common.model.TerminalStatusGetModel;
import com.shxy.xymanager_common.model.TerminalUpdateModel;
import com.shxy.xymanager_common.model.*;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_service.service.TerminalService;
import io.swagger.annotations.Api;
@ -146,6 +143,19 @@ public class TerminalController extends BaseController {
}
}
@ApiOperation(value = "根据通道编号获取设备列表", notes = "根据通道编号获取设备列表", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTermListByChannel")
@Log(title = "获取设备列表", type = "查询")
public ResponseReult<DyLineAndTermModel> getTermListByChannel(@RequestBody @Validated TerminalChannelIdVo vo) {
ServiceBody<DyLineAndTermModel> serviceBody = terminalService.getTermListByChannel(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
}

@ -5,7 +5,7 @@ import lombok.Data;
import java.util.List;
@Data
public class DyLineAndTerminalDto {
public class DyLineAndTerminalNoHeartDto {
private Integer id;
@ -13,6 +13,6 @@ public class DyLineAndTerminalDto {
private Integer dyValue;
private List<LineAndTerminalDto> list;
private List<LineAndTerminalNoHeartDto> list;
}

@ -0,0 +1,18 @@
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<LineAndTerminalWithHeartDto> list;
}

@ -6,7 +6,7 @@ import lombok.Data;
import java.util.List;
@Data
public class LineAndTerminalDto {
public class LineAndTerminalNoHeartDto {
private Integer id;

@ -0,0 +1,22 @@
package com.shxy.xymanager_common.dto;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.entity.TerminalsWithHeart;
import lombok.Data;
import java.util.List;
@Data
public class LineAndTerminalWithHeartDto {
private Integer id;
private String name;
private String bsManufacturer;
private Integer dyLevel;
private List<TerminalsWithHeart> list;
}

@ -41,8 +41,6 @@ public class Terminals implements Serializable {
private Date updateTime;
private Long lastheartbeat;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,48 @@
package com.shxy.xymanager_common.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class TerminalsWithHeart implements Serializable {
private Integer id;
private Integer lineid;
private Integer towerid;
private String cmdid;
private Short orgId;
private String equipName;
private String displayName;
private String model;
private String essentialInfoVersion;
private Byte hasPan;
private String bsManufacturer;
private Date bsProductionDate;
private String bsIdentifier;
private Double latitude;
private Double longitude;
private Date createTime;
private Date updateTime;
private Long lastheartbeat;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,68 @@
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 DyLineAndTermModel implements Serializable {
@ApiModelProperty(value = "电压列表", example = "[]")
private List<DyListBean> 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<LineBean> 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<TerminalBean> list;
}
@Data
public static class TerminalBean {
@ApiModelProperty(value = "装置编号", example = "123456")
private Integer id;
@ApiModelProperty(value = "杆塔编号", example = "123456")
private Integer towerid;
@ApiModelProperty(value = "图像监测装置 ID17 位编码)", example = "12345678")
private String cmdid;
@ApiModelProperty(value = "显示名", example = "名称名称")
private String displayName;
}
}

@ -21,10 +21,10 @@ public class RelateTerminalListRuleIdVo {
@NotNull(message = "装置列表不能缺少")
@ApiModelProperty(value = "装置通道编号列表", example = "123455")
private List<Item> list;
private List<Items> list;
@Data
public static class Item {
public static class Items {
@NotNull(message = "装置编号")
@ApiModelProperty(value = "装置编号", example = "123455")
private Integer termid;

@ -0,0 +1,17 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel(value = "通道编号对象", description = "通道编号对象")
public class TerminalChannelIdVo {
@NotNull(message = "通道编号不能缺少")
@ApiModelProperty(value = "通道编号", example = "123")
private Integer id;
}

@ -1,6 +1,7 @@
package com.shxy.xymanager_dao.dao;
import com.shxy.xymanager_common.dto.DyLineAndTerminalDto;
import com.shxy.xymanager_common.dto.DyLineAndTerminalNoHeartDto;
import com.shxy.xymanager_common.dto.DyLineAndTerminalWithHeartDto;
import com.shxy.xymanager_common.entity.DyLevel;
import org.apache.ibatis.annotations.Param;
@ -17,7 +18,9 @@ public interface DyLevelDao {
List<DyLevel> selectAll(@Param("status") Integer status);
List<DyLineAndTerminalDto> selectTreeList(@Param("status") Integer status);
List<DyLineAndTerminalWithHeartDto> selectTreeList(@Param("status") Integer status);
List<DyLineAndTerminalNoHeartDto> selectTreeListByChannelId(@Param("channelid") Integer channelid, @Param("status") Integer status);
int updateByPrimaryKeySelective(DyLevel record);

@ -20,7 +20,7 @@ public interface TerminalScheduleMapperDao {
TerminalScheduleMapper selectByChannelId(@Param("channelid") Integer list, @Param("termid") Integer termid);
List<TerminalScheduleMapper> selectByTerminalBean(@Param("list") List<RelateTerminalListRuleIdVo.Item> list);
List<TerminalScheduleMapper> selectByTerminalBean(@Param("list") List<RelateTerminalListRuleIdVo.Items> list);
int updateByPrimaryKeySelective(TerminalScheduleMapper record);

@ -10,16 +10,16 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<resultMap id="LineAndTerminalMap" type="com.shxy.xymanager_common.dto.DyLineAndTerminalDto">
<resultMap id="LineAndTerminalMap" type="com.shxy.xymanager_common.dto.DyLineAndTerminalWithHeartDto">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="dyvalue" jdbcType="INTEGER" property="dyValue"/>
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.LineAndTerminalDto">
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.LineAndTerminalWithHeartDto">
<id column="line_id" jdbcType="INTEGER" property="id"/>
<result column="line_name" jdbcType="VARCHAR" property="name"/>
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer"/>
<result column="dy_level_id" jdbcType="INTEGER" property="dyLevel"/>
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.entity.Terminals">
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.entity.TerminalsWithHeart">
<result column="term_id" jdbcType="INTEGER" property="id"/>
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
@ -31,6 +31,24 @@
</collection>
</resultMap>
<resultMap id="LineAndTerminalNoHeartMap" type="com.shxy.xymanager_common.dto.DyLineAndTerminalNoHeartDto">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="dyvalue" jdbcType="INTEGER" property="dyValue"/>
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.LineAndTerminalNoHeartDto">
<id column="line_id" jdbcType="INTEGER" property="id"/>
<result column="line_name" jdbcType="VARCHAR" property="name"/>
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer"/>
<result column="dy_level_id" jdbcType="INTEGER" property="dyLevel"/>
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.entity.Terminals">
<result column="term_id" jdbcType="INTEGER" property="id"/>
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
<result column="display_name" jdbcType="VARCHAR" property="displayName"/>
</collection>
</collection>
</resultMap>
<sql id="Base_Column_List">
id, name, dy_value, status, create_time, update_time
</sql>
@ -69,6 +87,29 @@
left join terminal_status f on f.term_id = y.id)
</select>
<select id="selectTreeListByChannelId" resultMap="LineAndTerminalNoHeartMap">
SELECT
a.id AS id,
a.name AS name,
a.dy_value AS dyvalue,
b.id AS line_id,
b.name AS line_name,
b.bs_manufacturer AS bs_manufacturer,
c.id AS term_id,
c.tower_id AS tower_id,
c.cmdid AS cmdid,
c.display_name AS display_name
FROM
((((dy_level a
left JOIN `lines` b ON a.id = b.dy_level_id and a.status = #{status} and b.status = #{status})
left JOIN terminals c ON b.id = c.line_id and c.status = #{status})
left JOIN terminal_channel_mapper d ON d.term_id = c.id)
left JOIN terminal_channels e ON d.channel_id = e.id and e.status = #{status})
<if test="channelid != null">
where e.id = #{channelid}
</if>
</select>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.DyLevel">
insert into dy_level (id, name, dy_value,
status, create_time, update_time

@ -5,16 +5,15 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.dto.DyLineAndTerminalDto;
import com.shxy.xymanager_common.dto.DyLineAndTerminalWithHeartDto;
import com.shxy.xymanager_common.entity.DyLevel;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.entity.TerminalsWithHeart;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.DyLineTreeListModel;
import com.shxy.xymanager_common.model.DyListModel;
import com.shxy.xymanager_common.util.MyDateUtils;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.TestVo;
import com.shxy.xymanager_dao.dao.DyLevelDao;
import com.shxy.xymanager_service.service.DyLevelService;
@ -44,7 +43,7 @@ public class DyLevelServiceImpl implements DyLevelService {
@Override
public ServiceBody<DyLineTreeListModel> getdyTreeList() {
DyLineTreeListModel model = new DyLineTreeListModel();
List<DyLineAndTerminalDto> list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value());
List<DyLineAndTerminalWithHeartDto> list = dyLevelDao.selectTreeList(CommonStatus.EFFECTIVE.value());
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
@ -54,9 +53,9 @@ public class DyLevelServiceImpl implements DyLevelService {
for (int j = 0; j < beans.get(i).getList().size(); j++) {
for (int k = 0; k < beans.get(i).getList().get(j).getList().size(); k++) {
beans.get(i).getList().get(j).getList().get(k).setName(list.get(i).getList().get(j).getList().get(k).getDisplayName());
Terminals terminals = list.get(i).getList().get(j).getList().get(k);
if (!BeanUtil.isEmpty(terminals)) {
Long lastheartbeat = terminals.getLastheartbeat();
TerminalsWithHeart terminalsWithHeart = list.get(i).getList().get(j).getList().get(k);
if (!BeanUtil.isEmpty(terminalsWithHeart)) {
Long lastheartbeat = terminalsWithHeart.getLastheartbeat();
if (!BeanUtil.isEmpty(lastheartbeat)) {
BigInteger time = MyDateUtils.TimeSecond2MillSecond(lastheartbeat);
DateTime date = MyDateUtils.date(time.longValue());

@ -0,0 +1,41 @@
package com.shxy.xymanager_service.impl;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.util.ProcessExecUtils;
import com.shxy.xymanager_common.vo.TerminalIdVo;
import com.shxy.xymanager_common.vo.TerminalReqPhotoTimeVo;
import com.shxy.xymanager_service.service.TermSetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* Cma
*
* @author
*/
@Slf4j
@Service
public class TermSetServiceImpl implements TermSetService {
@Override
public ServiceBody<Integer> alarmMark(TerminalIdVo vo) {
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid="+vo.getCmdId()+ "\t" + "--reqid="+ Constants.REQUEST_ID+ "\t"+ "--clientid=10--flag=1 --rf=7";
ProcessExecUtils.exec(cmd);
return Asserts.success(Integer.parseInt(Constants.REQUEST_ID.toString()));
}
@Override
public ServiceBody<Integer> selectPhotoTimeGet(TerminalIdVo vo) {
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=alarmMark --cmdid="+vo.getCmdId()+ "\t" + "--reqid="+Constants.REQUEST_ID+ "\t"+ "--clientid=10--flag=1 --rf=7";
ProcessExecUtils.exec(cmd);
return Asserts.success(Integer.parseInt(Constants.REQUEST_ID.toString()));
}
}

@ -464,7 +464,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Override
public ServiceBody<Integer> selectPhotoTimeGet(TerminalReqPhotoTimeVo vo) {
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid="+vo.getCmdId()+ "\t" + "--reqid="+Constants.REQUEST_ID+ "\t"+ "--clientid=10--flag=1 --rf=7";
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=alarmMark --cmdid="+vo.getCmdId()+ "\t" + "--reqid="+Constants.REQUEST_ID+ "\t"+ "--clientid=10--flag=1 --rf=7";
ProcessExecUtils.exec(cmd);
return Asserts.success(Integer.parseInt(Constants.REQUEST_ID.toString()));
}

@ -210,7 +210,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
public ServiceBody<String> relateSchelduleRule(RelateTerminalListRuleIdVo vo) {
ArrayList<TerminalScheduleMapper> list = new ArrayList<>();
List<RelateTerminalListRuleIdVo.Item> termBeanList = vo.getList();
List<RelateTerminalListRuleIdVo.Items> termBeanList = vo.getList();
Integer scheduleid = vo.getScheduleid();
List<TerminalScheduleMapper> mappers = terminalScheduleMapperDao.selectByTerminalBean(termBeanList);
@ -218,7 +218,7 @@ public class TerminalScheduleRuleServiceImpl implements TerminalScheduleRuleServ
if (!empty) {
terminalScheduleMapperDao.deleteByChannelId(mappers);
}
for (RelateTerminalListRuleIdVo.Item item : termBeanList) {
for (RelateTerminalListRuleIdVo.Items item : termBeanList) {
for (Integer id : item.getChannelidlist()) {
TerminalScheduleMapper record = new TerminalScheduleMapper();
record.setChannelId(id);

@ -4,13 +4,12 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.dto.PhotoParamsDto;
import com.shxy.xymanager_common.dto.TerminalInfoDto;
import com.shxy.xymanager_common.dto.TerminalsAndLineAndChannelDto;
import com.shxy.xymanager_common.dto.*;
import com.shxy.xymanager_common.entity.TerminalChannelMapper;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.enums.CommonStatus;
@ -58,6 +57,9 @@ public class TerminalServiceImpl implements TerminalService {
@Autowired
TerminalPhotoDao terminalPhotoDao;
@Autowired
DyLevelDao dyLevelDao;
/**
*
*
@ -203,10 +205,10 @@ public class TerminalServiceImpl implements TerminalService {
public ServiceBody<TerminalStatusGetModel> getTerminalStatus(Integer termId) {
TerminalStatusGetModel model = new TerminalStatusGetModel();
String cmdId = terminalsDao.getCmdIdByTermId(termId);
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=runningstatus --clientid=10 --cmdid=" + cmdId+ "\t" + "--reqid=="+Constants.REQUEST_ID;
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=runningstatus --clientid=10 --cmdid=" + cmdId + "\t" + "--reqid==" + Constants.REQUEST_ID;
ProcessExecUtils.exec(cmd);
/* TerminalModel model = new TerminalModel();*/
/* TerminalModel model = new TerminalModel();*/
model.setRequestId(Constants.REQUEST_ID.addAndGet(1));
/* TerminalInfoDto dto = terminalsDao.getTerminalInfo(termId);
if (null != dto) {
@ -224,13 +226,13 @@ public class TerminalServiceImpl implements TerminalService {
public ServiceBody<TerminalModel> getLastedTerminalStatus(TerminalStatusVo vo) {
String result = terminalPhotoDao.getRequestResult(vo.getRequestId());
TerminalModel model = new TerminalModel();
if(StringUtils.isNotBlank(result)) {
if (StringUtils.isNotBlank(result)) {
JSONObject resultObj = JSONObject.parseObject(result);
model = JSONObject.parseObject(resultObj.get("groupData").toString(), TerminalModel.class);
model.setIsNew(true);
}else{
} else {
TerminalInfoDto dto = terminalsDao.getTerminalInfo(vo.getTermId());
if(dto!=null) {
if (dto != null) {
BeanUtils.copyProperties(dto, model);
}
model.setWsUpdateTime(MyDateUtils.TimeSecond2MillSecond(dto.getWsUpdateTime().longValue()));
@ -241,22 +243,40 @@ public class TerminalServiceImpl implements TerminalService {
@Override
public ServiceBody<TerminalUpdateModel> updateTerminalId(TerminalIdUpdateVo vo) {
TerminalUpdateModel model = new TerminalUpdateModel();
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=termid --cmdid="+vo.getCmdId()+"\t"+"--reqid="+ Constants.REQUEST_ID +"\t"+"--newcmdid="+vo.getNewCmdId()+"\t"+"--newcmdid="+vo.getNewCmdId();
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=termid --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--newcmdid=" + vo.getNewCmdId() + "\t" + "--newcmdid=" + vo.getNewCmdId();
Integer retCode = ProcessExecUtils.exec(cmd);
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
model.setTermId(vo.getTermId());
Constants.REQUEST_ID.addAndGet(1);
if(retCode==0){
if (retCode == 0) {
int result = terminalsDao.updateCmd(vo);
if(result>0) {
if (result > 0) {
return Asserts.success(model);
}
}
return Asserts.error("装置ID修改失败");
return Asserts.error("装置ID修改失败");
}
/**
*
*
* @param vo
* @return
*/
@Override
public ServiceBody<DyLineAndTermModel> getTermListByChannel(TerminalChannelIdVo vo) {
Integer id = vo.getId();
DyLineAndTermModel model = new DyLineAndTermModel();
List<DyLineAndTerminalNoHeartDto> list = dyLevelDao.selectTreeListByChannelId(id,CommonStatus.EFFECTIVE.value());
boolean empty = CollectionUtil.isEmpty(list);
if (empty) {
model.setList(new ArrayList<>());
} else {
List<DyLineAndTermModel.DyListBean> beans = BeanUtil.copyToList(list, DyLineAndTermModel.DyListBean.class,CopyOptions.create().ignoreCase());
model.setList(beans);
}
return Asserts.success(model);
}
}

@ -0,0 +1,27 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.DyLineTreeAndChannelListModel;
import com.shxy.xymanager_common.model.TerminalAllChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelListModel;
import com.shxy.xymanager_common.model.TerminalChannelMapperListModel;
import com.shxy.xymanager_common.vo.*;
/**
*
*
* @author
*/
public interface TermSetService {
/**
*
*
* @return
*/
ServiceBody<Integer> alarmMark(TerminalIdVo vo);
ServiceBody<Integer> selectPhotoTimeGet(TerminalIdVo vo);
}

@ -1,10 +1,7 @@
package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.TerminalListModel;
import com.shxy.xymanager_common.model.TerminalModel;
import com.shxy.xymanager_common.model.TerminalStatusGetModel;
import com.shxy.xymanager_common.model.TerminalUpdateModel;
import com.shxy.xymanager_common.model.*;
import com.shxy.xymanager_common.vo.*;
/**
@ -64,5 +61,13 @@ public interface TerminalService {
*/
ServiceBody<TerminalUpdateModel> updateTerminalId(TerminalIdUpdateVo vo);
/**
*
*
* @param vo
* @return
*/
ServiceBody<DyLineAndTermModel> getTermListByChannel(TerminalChannelIdVo vo);
}

Loading…
Cancel
Save