1.app远程接口代码提交
This commit is contained in:
@@ -7,6 +7,8 @@ import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -127,4 +129,28 @@ public interface GeneralDeviceInfoClient {
|
||||
*/
|
||||
@GetMapping("/deptGetRunLineEvent")
|
||||
HttpResult<List<String>> deptGetRunLineEvent(@RequestParam("deptId")String deptId);
|
||||
|
||||
/**
|
||||
* 根据单位获取终端集合
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deptGetRunDev")
|
||||
HttpResult<List<String>> deptGetRunDev(@RequestParam("deptId")String deptId);
|
||||
|
||||
/**
|
||||
* 根据终端id集合获取终端信息
|
||||
* @param devIds
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getDevInfoByIds")
|
||||
HttpResult<List<DevDetail>> getDevInfoByIds(@RequestBody List<String> devIds);
|
||||
|
||||
/**
|
||||
* @Description: 根据topIds集合获取终端信息
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/9 13:55
|
||||
*/
|
||||
@PostMapping("/getTopMsgInfoByIds")
|
||||
HttpResult<List<TopMsgPO>> getTopMsgInfoByIds(@RequestBody List<String> topIds);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.njcn.device.pq.pojo.po.Line;
|
||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.vo.*;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -311,4 +313,17 @@ public interface LineFeignClient {
|
||||
|
||||
@PostMapping("getOnIntegrityByIdsAndTime")
|
||||
HttpResult<List<RStatIntegrityVO>> getOnIntegrityByIdsAndTime(@RequestBody LineBaseQueryParam param);
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 根据监测点id获取监测点集合
|
||||
* @param ids
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/8 15:55
|
||||
*/
|
||||
@PostMapping("/getLineDetailByIds")
|
||||
HttpResult<List<LineDetailVO.Detail>> getLineDetailByIds(@RequestBody List<String> ids);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.njcn.device.pq.pojo.bo.BaseLineInfo;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||
import com.njcn.device.pq.pojo.po.TopMsgPO;
|
||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -98,6 +100,24 @@ public class GeneralDeviceInfoClientFallbackFactory implements FallbackFactory<G
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取单位暂态系统投运监测点", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> deptGetRunDev(String deptId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取终端集合", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DevDetail>> getDevInfoByIds(List<String> devIds) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据终端id集合获取终端信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<TopMsgPO>> getTopMsgInfoByIds(List<String> topIds) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据topIds集合获取终端信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -231,6 +231,12 @@ public class LineFeignClientFallbackFactory implements FallbackFactory<LineFeign
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取监测点数据完整率: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<LineDetailVO.Detail>> getLineDetailByIds(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据监测点id获取监测点集合: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -8,6 +9,14 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TopMsgPO extends BaseEntity {
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String topId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ip;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private String subName;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.device.pq.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Description: 终端信息
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/7 15:34
|
||||
*/
|
||||
@Data
|
||||
public class DevDetail {
|
||||
|
||||
@ApiModelProperty("终端id")
|
||||
private String devIndex;
|
||||
|
||||
@ApiModelProperty("终端名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty("ip")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("供电公司")
|
||||
private String gdName;
|
||||
|
||||
@ApiModelProperty("变电站名称")
|
||||
private String bdzName;
|
||||
|
||||
@ApiModelProperty("数据更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("终端等级")
|
||||
private String lineGrade;
|
||||
|
||||
@ApiModelProperty("通讯状态(0:中断;1:正常)")
|
||||
private Integer comFlag;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.njcn.device.pq.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
@@ -26,4 +28,53 @@ public class LineDetailVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
@Data
|
||||
public static class Detail extends LineDetailVO implements Serializable{
|
||||
|
||||
@ApiModelProperty("区域id")
|
||||
private String areaId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("终端id")
|
||||
private String devId;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty("测量间隔(1-10分钟)")
|
||||
private Integer timeInterval;
|
||||
|
||||
@ApiModelProperty("接线类型")
|
||||
private Integer ptType;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
private String voltageLevel;
|
||||
|
||||
@ApiModelProperty("数据更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("终端等级")
|
||||
private String lineGrade;
|
||||
|
||||
@ApiModelProperty("通讯状态(0:中断;1:正常)")
|
||||
private Integer comFlag;
|
||||
|
||||
@ApiModelProperty("PT一次变比")
|
||||
private Double PT1;
|
||||
|
||||
@ApiModelProperty("PT二次变比")
|
||||
private Double PT2;
|
||||
|
||||
@ApiModelProperty("CT一次变比")
|
||||
private Double CT1;
|
||||
|
||||
@ApiModelProperty("CT二次变比")
|
||||
private Double CT2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user