Merge branch 'master' of http://dev.xinyingpower.com:8080/git/xymp/backend
commit
3438605c57
@ -0,0 +1,50 @@
|
|||||||
|
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.*;
|
||||||
|
import com.shxy.xymanager_common.vo.*;
|
||||||
|
import com.shxy.xymanager_service.service.TerminalAlarmService;
|
||||||
|
import com.shxy.xymanager_service.service.TerminalPhotoService;
|
||||||
|
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;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
@Api(value = "告警接口", tags = "告警接口相关")
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
public class TerminalAlarmController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TerminalAlarmService terminalAlarmService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取告警列表", notes = "获取告警列表接口", httpMethod = "POST")
|
||||||
|
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
||||||
|
@RequestMapping("/getTerminalAlarmList")
|
||||||
|
@Log(title = "获取告警列表", type = "查询")
|
||||||
|
public ResponseReult<TerminalAlarmListModel> getTerminalAlarmList(@RequestBody @Validated TerminalAlarmVo vo) {
|
||||||
|
ServiceBody<TerminalAlarmListModel> serviceBody = terminalAlarmService.getAlarmList(vo);
|
||||||
|
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
||||||
|
return ResponseReult.success(serviceBody.getData());
|
||||||
|
} else {
|
||||||
|
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通道列表
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "通道列表", description = "通道列表信息")
|
||||||
|
public class TerminalAlarmListModel implements Serializable {
|
||||||
|
@ApiModelProperty(value = "总记录数", example = "120")
|
||||||
|
private long total;
|
||||||
|
@ApiModelProperty(value = "总页数", example = "120")
|
||||||
|
private int totalpage;
|
||||||
|
@ApiModelProperty(value = "当前页", example = "1")
|
||||||
|
private int currentpage;
|
||||||
|
@ApiModelProperty(value = "每页记录数", example = "1")
|
||||||
|
private int pagesize;
|
||||||
|
@ApiModelProperty(value = "通道列表对象", example = "[]")
|
||||||
|
private List<AlarmBean> list;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class AlarmBean {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "告警编号", example = "123456")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "告警时间", example = "123456")
|
||||||
|
private BigInteger alarmTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压等级", example = "123456")
|
||||||
|
private String dyLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "线路名称", example = "123456")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否已读", example = "123456")
|
||||||
|
private Short status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "杆塔名称", example = "123456")
|
||||||
|
private String towerName;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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.NotNull;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "告警信息查询对象", description = "告警信息查询对象描述")
|
||||||
|
public class TerminalAlarmVo extends PageVo{
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电压等级编号", example = "123455")
|
||||||
|
private Integer dyId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "线路编号", example = "123455")
|
||||||
|
private Integer lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "杆塔编号", example = "123455")
|
||||||
|
private Integer towerId;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.shxy.xymanager_service.impl;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.bean.ServiceBody;
|
||||||
|
import com.shxy.xymanager_common.model.TerminalAlarmListModel;
|
||||||
|
import com.shxy.xymanager_common.model.TerminalChannelListModel;
|
||||||
|
import com.shxy.xymanager_common.vo.TerminalAlarmVo;
|
||||||
|
import com.shxy.xymanager_service.service.TerminalAlarmService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警实现层
|
||||||
|
*
|
||||||
|
* @author cy
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class TerminalAlarmServiceImpl implements TerminalAlarmService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServiceBody<TerminalAlarmListModel> getAlarmList(TerminalAlarmVo vo) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.shxy.xymanager_service.service;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.bean.ServiceBody;
|
||||||
|
import com.shxy.xymanager_common.model.*;
|
||||||
|
import com.shxy.xymanager_common.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警接口
|
||||||
|
*
|
||||||
|
* @author CY
|
||||||
|
*/
|
||||||
|
public interface TerminalAlarmService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取告警信息列表分页
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ServiceBody<TerminalAlarmListModel> getAlarmList(TerminalAlarmVo vo);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue