feat(ledger): 添加缺失台账信息的相关接口

This commit is contained in:
xy
2026-06-10 20:15:55 +08:00
parent 85f0775c97
commit 38be9f6839
33 changed files with 595 additions and 301 deletions

View File

@@ -3,8 +3,7 @@ package com.njcn.csdevice.api;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.fallback.CsCommTerminalFeignClientFallbackFactory;
import com.njcn.csdevice.api.fallback.CsDeviceUserClientFallbackFactory;
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -31,4 +30,7 @@ public interface CsCommTerminalFeignClient {
@GetMapping("getPqUserIdsByUser")
HttpResult<List<String>> getPqUserIdsByUser(@RequestParam("userId") String userId);
@PostMapping("/getLedgerByLineId")
HttpResult<List<DevDetailDTO>> getLedgerByLineId(@RequestBody List<String> list);
}

View File

@@ -5,6 +5,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
import com.njcn.csdevice.pojo.dto.CsLineDTO;
import com.njcn.csdevice.pojo.param.CsLineParam;
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
import com.njcn.csdevice.pojo.po.CsLinePO;
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
import com.njcn.device.biz.pojo.po.Overlimit;
@@ -71,9 +72,9 @@ public interface CsLineFeignClient {
@PostMapping("/getOverLimitDataByIds")
HttpResult<List<Overlimit>> getOverLimitData(@RequestBody List<String> ids);
@PostMapping("/getLineBySensitiveUser")
@ApiOperation("根据敏感用户查询监测点")
HttpResult<List<CsLinePO>> getLineBySensitiveUser(@RequestBody List<String> list);
@PostMapping("/getDevBySensitiveUser")
@ApiOperation("根据敏感用户查询装置")
HttpResult<List<CsEquipmentDeliveryPO>> getDevBySensitiveUser(@RequestBody List<String> list);
@PostMapping("/list")
HttpResult<List<CsLinePO>> list(@RequestBody CsLinePO param);

View File

@@ -4,6 +4,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.CsCommTerminalFeignClient;
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -51,6 +52,12 @@ public class CsCommTerminalFeignClientFallbackFactory implements FallbackFactory
log.error("{}异常,降级处理,异常为:{}","根据登录用户id获取电能质量用户id集合",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<DevDetailDTO>> getLedgerByLineId(List<String> list) {
log.error("{}异常,降级处理,异常为:{}","根据监测点id集合获取所有台账信息异常",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -6,6 +6,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.CsLineFeignClient;
import com.njcn.csdevice.pojo.dto.CsLineDTO;
import com.njcn.csdevice.pojo.param.CsLineParam;
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
import com.njcn.csdevice.pojo.po.CsLinePO;
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
import com.njcn.device.biz.pojo.po.Overlimit;
@@ -117,7 +118,7 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
}
@Override
public HttpResult<List<CsLinePO>> getLineBySensitiveUser(List<String> list) {
public HttpResult<List<CsEquipmentDeliveryPO>> getDevBySensitiveUser(List<String> list) {
log.error("{}异常,降级处理,异常为:{}","根据敏感用户查询监测点异常",cause.toString());
throw new BusinessException(finalExceptionEnum);
}

View File

@@ -120,4 +120,19 @@ public class CsEquipmentDeliveryDTO {
* 设备软件信息id
*/
private String softinfoId;
/**
* 治理方法
*/
private String governMethod;
/**
* 敏感用户id
*/
private String monitorUser;
/**
* 治理类型(稳态:harmonic 暂态:event)
*/
private String governType;
}

View File

@@ -34,6 +34,12 @@ public class DevDetailDTO {
@ApiModelProperty(value = "设备名称")
private String equipmentName;
@ApiModelProperty(value = "监测点id")
private String lineId;
@ApiModelProperty(value = "监测点名称")
private String lineName;
@ApiModelProperty(value = "设备通讯状态")
private Integer runStatus;
@@ -43,6 +49,12 @@ public class DevDetailDTO {
@ApiModelProperty(value = "nDid")
private String nDid;
@ApiModelProperty(value = "监测对象")
private String objType;
@ApiModelProperty(value = "设备治理方案")
private String governType;
@ApiModelProperty(value = "监测点id集合")
private List<String> lineList;
}

View File

@@ -176,10 +176,4 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
*/
@TableField(value = "govern_type")
private String governType;
/**
* 治理报告文件路径
*/
@TableField(value = "report_file_path")
private String reportFilePath;
}

View File

@@ -127,14 +127,7 @@ public class CsLinePO extends BaseEntity {
*/
@TableField(value = "monitor_obj")
private String monitorObj;
/**
* 是否治理(0:未治理 1:已治理)
*/
@TableField(value = "is_govern")
private Integer govern;
@TableField(value = "monitor_user")
private String monitorUser;
/**
* 短路容量

View File

@@ -106,4 +106,13 @@ public class CsEquipmentDeliveryVO extends BaseEntity {
@ApiModelProperty(value="所属项目名称")
private String associatedProjectName;
@ApiModelProperty(value="治理方法")
private String governMethod;
@ApiModelProperty(value="敏感用户id")
private String monitorUser;
@ApiModelProperty(value="治理类型(稳态:harmonic 暂态:event)")
private String governType;
}

View File

@@ -8,17 +8,25 @@ import java.time.LocalDateTime;
@Data
public class PqSensitiveUserLineVO {
@ApiModelProperty("工程名称")
private String engineeringName;
@ApiModelProperty("项目名称")
private String projectName;
@ApiModelProperty("设备id")
private String devId;
@ApiModelProperty("设备名称")
private String devName;
@ApiModelProperty("治理对象")
private String sensitiveUser;
@ApiModelProperty("监测点ID")
private String lineId;
@ApiModelProperty("测点名称")
private String lineName;
@ApiModelProperty("是否治理")
@ApiModelProperty("治理方案")
private String govern;
@ApiModelProperty("电压等级")
private double volGrade;
@ApiModelProperty("监测类型")
@ApiModelProperty("监测位置")
private String position;
@ApiModelProperty("运行状态")
private String runStatus;