装置设置

jni
liuguijing 2 years ago
parent 82c8f568bb
commit b680dace0f

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

@ -19,7 +19,7 @@
<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"/>

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

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