前置联调
This commit is contained in:
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.pq.api.fallback.DeviceFeignClientFallbackFactory;
|
||||
import com.njcn.device.pq.api.fallback.LineFeignClientFallbackFactory;
|
||||
import com.njcn.device.pq.pojo.dto.DevComFlagDTO;
|
||||
import com.njcn.device.pq.pojo.dto.DeviceDTO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -41,4 +42,9 @@ public interface DeviceFeignClient {
|
||||
@ApiOperation("修改装置通讯状态及时间")
|
||||
HttpResult<Boolean> updateDevComFlag(@RequestBody DevComFlagDTO devComFlagDTO);
|
||||
|
||||
|
||||
@PostMapping("/getDeviceInfo")
|
||||
@ApiOperation("查询设备详情")
|
||||
HttpResult<DeviceDTO> getDeviceInfo(@RequestParam("devId") String devId);
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.device.pq.api.DeviceFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.DevComFlagDTO;
|
||||
import com.njcn.device.pq.pojo.dto.DeviceDTO;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -38,6 +39,12 @@ public class DeviceFeignClientFallbackFactory implements FallbackFactory<DeviceF
|
||||
log.error("{}异常,降级处理,异常为:{}", "修改设备状态", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<DeviceDTO> getDeviceInfo(String devId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "查询设备详情", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.njcn.device.pq.pojo.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-04
|
||||
*/
|
||||
@Data
|
||||
public class DeviceDTO implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 装置序号
|
||||
*/
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 装置模型(0:虚拟设备;1:实际设备;2:离线设备;)默认是实际设备
|
||||
*/
|
||||
private Integer devModel;
|
||||
|
||||
/**
|
||||
* 数据类型(0:暂态系统;1:稳态系统;2:两个系统)
|
||||
*/
|
||||
private Integer devDataType;
|
||||
|
||||
/**
|
||||
* 终端运行状态(0:运行;1:检修;2:停运;3:调试;4:退运)
|
||||
*/
|
||||
private Integer runFlag;
|
||||
|
||||
/**
|
||||
* 通讯状态(0:中断;1:正常)
|
||||
*/
|
||||
private Integer comFlag;
|
||||
|
||||
/**
|
||||
* 设备制造商,字典表
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 定检状态(0:未检 1:已检)
|
||||
*/
|
||||
private Integer checkFlag;
|
||||
|
||||
/**
|
||||
* 前置类型(MMS、CLD)字典表
|
||||
*/
|
||||
private String frontType;
|
||||
|
||||
/**
|
||||
* 终端型号(570、580……)字典表
|
||||
*/
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 网络参数
|
||||
*/
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 召唤标志(0:周期触发;1:变为触发)
|
||||
*/
|
||||
private Integer callFlag;
|
||||
|
||||
/**
|
||||
* 端口
|
||||
*/
|
||||
private Integer port;
|
||||
|
||||
/**
|
||||
* 装置识别码(3ds加密)
|
||||
*/
|
||||
private String series;
|
||||
|
||||
/**
|
||||
* 装置秘钥(3ds加密)
|
||||
*/
|
||||
private String devKey;
|
||||
|
||||
/**
|
||||
* 前置序号Id,前置表
|
||||
*/
|
||||
private String nodeId;
|
||||
|
||||
/**
|
||||
* 投运时间
|
||||
*/
|
||||
private LocalDate loginTime;
|
||||
|
||||
/**
|
||||
* 数据更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 本次定检时间,默认等于投运时间
|
||||
*/
|
||||
private LocalDate thisTimeCheck;
|
||||
|
||||
/**
|
||||
* 下次定检时间,默认为投运时间后推3年,假如时间小于3个月则为待检
|
||||
*/
|
||||
private LocalDate nextTimeCheck;
|
||||
|
||||
/**
|
||||
* 电度功能 0 关闭 1开启
|
||||
*/
|
||||
private Integer electroplate;
|
||||
|
||||
/**
|
||||
* 对时功能 0 关闭, 1开启
|
||||
*/
|
||||
private Integer onTime;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contract;
|
||||
|
||||
/**
|
||||
* 设备sim卡号
|
||||
*/
|
||||
private String sim;
|
||||
|
||||
|
||||
/**
|
||||
* 装置系列
|
||||
*/
|
||||
private String devSeries;
|
||||
|
||||
|
||||
/**
|
||||
* 监测装置安装位置
|
||||
*/
|
||||
private String devLocation;
|
||||
|
||||
|
||||
/**
|
||||
* 监测厂家设备编号
|
||||
*/
|
||||
private String devNo;
|
||||
|
||||
|
||||
/**
|
||||
* 告警功能 0:关闭 null、1:开启
|
||||
*/
|
||||
private Integer isAlarm;
|
||||
|
||||
}
|
||||
@@ -25,7 +25,7 @@ public class NodeProcessDeviceTree {
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public static class ProcessDevice {
|
||||
private Integer processNo;
|
||||
private Integer processState;
|
||||
private String processState;
|
||||
private List<DeviceInfo> deviceInfoList;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,11 +28,18 @@ public class PqsTerminalPushLogDTO implements Serializable {
|
||||
|
||||
private String nodeId;
|
||||
|
||||
private String nodeName;
|
||||
|
||||
private Integer processNum;
|
||||
|
||||
|
||||
private String devId;
|
||||
|
||||
private String devName;
|
||||
//设备是否进程号是否修改
|
||||
|
||||
private Boolean processUpdateFlag;
|
||||
|
||||
/**
|
||||
* 新增,修改,删除
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.device.pq.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2025/05/07 上午 11:38【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class PreCommandDTO {
|
||||
private String guid;
|
||||
private String command;
|
||||
private String result;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user