冀北干扰源常态化管理接口
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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.UserReportNoramlFeignClientFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
|
||||
/**
|
||||
* 流程实例 Api 接口
|
||||
*
|
||||
* @author hongawen
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.SUPERVISION, path = "/userReportNormal", fallbackFactory = UserReportNoramlFeignClientFallbackFactory.class)
|
||||
public interface UserReportNormalFeignClient {
|
||||
|
||||
@GetMapping("/updateUserReportNormalStatus")
|
||||
HttpResult<Object> updateUserReportNormalStatus(@RequestParam("businessKey") String businessKey, @RequestParam("status")Integer status);
|
||||
|
||||
}
|
||||
@@ -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.UserReportNormalFeignClient;
|
||||
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 UserReportNoramlFeignClientFallbackFactory implements FallbackFactory<UserReportNormalFeignClient> {
|
||||
@Override
|
||||
public UserReportNormalFeignClient 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 UserReportNormalFeignClient() {
|
||||
@Override
|
||||
public HttpResult<Object> updateUserReportNormalStatus(String businessKey, Integer status) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "更新用户数据流程状态", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.njcn.supervision.pojo.param.user;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 干扰源用户常态化管理
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2024-05-17
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserReportNormalParam extends BaseParam {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 关联干扰源用户表
|
||||
*/
|
||||
private String userReportId;
|
||||
|
||||
/**
|
||||
* 类型0:方案审查 1:治理工程
|
||||
*/
|
||||
private Boolean type;
|
||||
|
||||
/**
|
||||
* 报告存放路径
|
||||
*/
|
||||
private String reportUrl;
|
||||
|
||||
/**
|
||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
@ApiModelProperty("发起人自选审批人 Map")
|
||||
private Map<String, List<String>> startUserSelectAssignees;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.supervision.pojo.po.user;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 干扰源用户常态化管理
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2024-05-17
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("supervision_user_report_normal")
|
||||
public class UserReportNormalPO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 关联干扰源用户表
|
||||
*/
|
||||
private String userReportId;
|
||||
|
||||
/**
|
||||
* 类型0:方案审查 1:治理工程
|
||||
*/
|
||||
private Boolean type;
|
||||
|
||||
/**
|
||||
* 报告存放路径
|
||||
*/
|
||||
private String reportUrl;
|
||||
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
private Integer state;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -12,12 +12,13 @@ import com.njcn.supervision.pojo.po.user.UserReportSensitivePO;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportSubstationPO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/4/25 10:07【需求编号】
|
||||
*
|
||||
@@ -141,4 +142,18 @@ public class UserReportVO {
|
||||
private UserReportSensitivePO userReportSensitivePO;
|
||||
|
||||
private UserReportSubstationPO userReportSubstationPO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UserReportGoNetVO extends UserReportVO{
|
||||
/**
|
||||
* 入网评估报告和治理报告的文件路径名
|
||||
*/
|
||||
@ApiModelProperty(value = "入网评估报告和治理报告的文件路径名")
|
||||
private String otherReport;
|
||||
|
||||
private String userReportId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user