前置联调

This commit is contained in:
hzj
2025-05-14 10:09:37 +08:00
parent 44d7a97c84
commit 05e71b823d
13 changed files with 556 additions and 115 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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;
/**
* 新增,修改,删除
*/

View File

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