1.综合评估省级趋势展示
2.技术监督-终端周期检测
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.njcn.supervision.api;
|
||||
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.fallback.CheckDeviceFeignClientFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
|
||||
/**
|
||||
* 流程实例 Api 接口
|
||||
*
|
||||
* @author hongawen
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.SUPERVISION, path = "/checkDevice", fallbackFactory = CheckDeviceFeignClientFallbackFactory.class)
|
||||
public interface CheckDeviceFeignClient {
|
||||
|
||||
@PostMapping("/add")
|
||||
HttpResult<String> add();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.supervision.api.fallback;
|
||||
|
||||
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.supervision.api.CheckDeviceFeignClient;
|
||||
import com.njcn.supervision.utils.SupervisionEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022/3/16
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CheckDeviceFeignClientFallbackFactory implements FallbackFactory<CheckDeviceFeignClient> {
|
||||
@Override
|
||||
public CheckDeviceFeignClient create(Throwable throwable) {
|
||||
//判断抛出异常是否为解码器抛出的业务异常
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = SupervisionEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new CheckDeviceFeignClient() {
|
||||
@Override
|
||||
public HttpResult<String> add() {
|
||||
log.error("{}异常,降级处理,异常为:{}", "新增终端检测数据", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,8 @@ public enum SupervisionKeyEnum {
|
||||
SURVEY_TEST("survey_test","survey","监督测试流程","SurveyTestServiceImpl"),
|
||||
USER_GO_NET("user_go_net","user","入网设计方案流程","UserReportNormalServiceImpl"),
|
||||
USER_TREAT_CHECK("user_treat_check","user","治理工程流程","UserReportNormalServiceImpl"),
|
||||
BUILD_USER_INFO("build_user_info","user","干扰源建档流程","UserReportPOServiceImpl");
|
||||
|
||||
BUILD_USER_INFO("build_user_info","user","干扰源建档流程","UserReportPOServiceImpl"),
|
||||
TIMING_CHECK_DEVICE("timing_check_device","device","终端周期检测","CheckDeviceServiceImpl");
|
||||
|
||||
private final String key;
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.supervision.pojo.param.device;
|
||||
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author 徐扬
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CheckDeviceParam extends BaseParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号")
|
||||
private String processInstanceId;
|
||||
|
||||
@ApiModelProperty(value = "历史流程实例编号")
|
||||
private String historyInstanceId;
|
||||
|
||||
@ApiModelProperty(value = "审批状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "报告文件地址")
|
||||
private String reportPath;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.njcn.supervision.pojo.po.device;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 终端周期检测表
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2024-06-13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("supervision_check_device")
|
||||
public class CheckDevice extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 装置id
|
||||
*/
|
||||
@MppMultiId("device_id")
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 定检时间
|
||||
*/
|
||||
@MppMultiId("check_time")
|
||||
private LocalDate checkTime;
|
||||
|
||||
/**
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDay;
|
||||
|
||||
/**
|
||||
* 装置定检报告
|
||||
*/
|
||||
private String checkFilePath;
|
||||
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 历史流程实例
|
||||
*/
|
||||
private String historyInstanceId;
|
||||
|
||||
/**
|
||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.njcn.supervision.pojo.vo.device;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 终端周期检测表
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2024-06-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CheckDeviceVo extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("部门")
|
||||
private String dept;
|
||||
|
||||
@ApiModelProperty("变电站")
|
||||
private String substation;
|
||||
|
||||
@ApiModelProperty("装置id")
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty("装置名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty("逾期天数")
|
||||
private Integer overdueDay;
|
||||
|
||||
@ApiModelProperty("装置定检报告路径")
|
||||
private String checkFilePath;
|
||||
|
||||
@ApiModelProperty("流程实例的编号")
|
||||
private String processInstanceId;
|
||||
|
||||
@ApiModelProperty("历史流程实例")
|
||||
private String historyInstanceId;
|
||||
|
||||
@ApiModelProperty("状态 1:审批中;2:审批通过;3:审批不通过;4:已取消")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
}
|
||||
Reference in New Issue
Block a user