工作流程审核不通过、预告警单处理、终端周期检测等需求
1、提交了主pom,因为需要引入达梦数据量; 2、提交了gateway的配置文件,因为部分接口没有添加到权限中,待后续增加后再注释
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package com.njcn.supervision.api;
|
||||
|
||||
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.bpm.pojo.vo.TodoVO;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.fallback.BusinessCommonFeignClientFallbackFactory;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,4 +41,16 @@ public interface BusinessCommonFeignClient {
|
||||
*/
|
||||
@GetMapping("/getInstanceInfo")
|
||||
HttpResult<BpmInstanceInfo> getInstanceInfo(@RequestParam("processKey") String processKey, @RequestParam("businessId") String businessId);
|
||||
|
||||
/**
|
||||
* 获取当前用户所有不通过的流程实例ID
|
||||
*/
|
||||
@GetMapping("/getAllRejectInstanceId")
|
||||
HttpResult<Set<String>> getAllRejectInstanceId();
|
||||
|
||||
/**
|
||||
* 获取当前用户部分待办业务,回显在待办列表中
|
||||
*/
|
||||
@GetMapping("/getTodoBusiness")
|
||||
HttpResult<List<TodoVO>> getTodoBusiness();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.supervision.api.fallback;
|
||||
|
||||
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.bpm.pojo.vo.TodoVO;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
@@ -10,6 +11,9 @@ import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@@ -35,6 +39,18 @@ public class BusinessCommonFeignClientFallbackFactory implements FallbackFactory
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取流程额外信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Set<String>> getAllRejectInstanceId() {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取所有流程不通过实例id", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<TodoVO>> getTodoBusiness() {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取当前用户部分待办业务", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public enum ProblemTypeEnum {
|
||||
PLAN(1, "技术监督计划"),
|
||||
ONLINE(2, "在线监测超标问题"),
|
||||
USER(3, "用户投诉问题"),
|
||||
SITE_TEST(4, "现场测试超标问题");
|
||||
SITE_TEST(4, "试运行监测点问题");
|
||||
|
||||
private final Integer code;
|
||||
|
||||
|
||||
@@ -2,27 +2,36 @@ package com.njcn.supervision.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
public enum SupervisionKeyEnum {
|
||||
// 干扰源接入
|
||||
BUILD_USER_INFO("build_user_info", "user", "干扰源建档流程", "UserReportPOServiceImpl","supervision/interferencemanagement"),
|
||||
USER_REPORT_RENEWAL("user_report_update", "user", "干扰源常态化信息编辑流程", "UserReportRenewalServiceImpl","supervision/interferencemanagement"),
|
||||
USER_GO_NET("user_go_net", "user", "入网设计方案流程", "UserReportNormalServiceImpl","supervision/interferencemanagement"),
|
||||
USER_TREAT_CHECK("user_treat_check", "user", "治理工程流程", "UserReportNormalServiceImpl","supervision/interferencemanagement"),
|
||||
// 终端检测
|
||||
DEVICE_INFO_ADD("device_info_add", "device", "电能质量监测装置设备管理流程", "SupervisionDevMainReportPOServiceImpl","terminalNetwotk"),
|
||||
LINE_INFO_ADD("line_info_add", "device", "电能质量监测点管理流程", "SupervisionTempLineReportServiceImpl","terminalNetwotk"),
|
||||
TEMP_LINE_DEBUG("temp_line_debug", "device", "监测点联调流程", "SupervisionTempLineDebugPOServiceImpl","terminalNetwotk"),
|
||||
TIMING_CHECK_DEVICE("timing_check_device", "device", "终端周期检测", "CheckDeviceServiceImpl","terminalNetwotk"),
|
||||
// 试运行评估
|
||||
LINE_RUN_TEST("line_run_test", "device", "监测点试运行评估流程", "SupervisionTempLineRunTestServiceImpl","testRun"),
|
||||
// 技术监督计划
|
||||
SUP_PLAN_ADD("sup_plan_add", "plan", "技术监督计划流程(计划和测试)", "SupervisionPlanPOServiceImpl","supervision/harmonicmanagement"),
|
||||
SURVEY_PLAN("survey_plan", "survey", "监督计划流程", "SurveyPlanServiceImpl","supervision/harmonicmanagement"),
|
||||
SURVEY_TEST("survey_test", "survey", "监督测试流程", "SurveyTestServiceImpl","supervision/harmonicmanagement"),
|
||||
// 预告警单
|
||||
WARN_LEAFLET("warn_leaflet", "leaflet", "预告警单流程", "WarningLeafletServiceImpl","supervision/supervision/manage"),
|
||||
// 终端状态管理
|
||||
QUIT_RUNNING_DEVICE("quit_running_device", "device", "终端状态变更流程", "QuitRunningDeviceServiceImpl","supervision/retire"),
|
||||
|
||||
QUIT_RUNNING_DEVICE("quit_running_device","device","终端状态变更流程","QuitRunningDeviceServiceImpl"),
|
||||
DEVICE_INFO_ADD("device_info_add","device","电能质量监测装置设备管理流程","SupervisionDevMainReportPOServiceImpl"),
|
||||
LINE_INFO_ADD("line_info_add","device","电能质量监测点管理流程","SupervisionTempLineReportServiceImpl"),
|
||||
TEMP_LINE_DEBUG("temp_line_debug","device","监测点联调流程","SupervisionTempLineDebugPOServiceImpl"),
|
||||
LINE_RUN_TEST("line_run_test","device","监测点试运行评估流程","SupervisionTempLineRunTestServiceImpl"),
|
||||
WARN_LEAFLET("warn_leaflet","leaflet","预告警单流程","WarningLeafletServiceImpl"),
|
||||
SUP_PLAN_ADD("sup_plan_add","plan","技术监督计划流程(计划和测试)","SupervisionPlanPOServiceImpl"),
|
||||
SURVEY_PLAN("survey_plan","survey","监督计划流程","SurveyPlanServiceImpl"),
|
||||
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"),
|
||||
TIMING_CHECK_DEVICE("timing_check_device","device","终端周期检测","CheckDeviceServiceImpl"),
|
||||
USER_REPORT_RENEWAL("user_report_update","user","干扰源常态化信息编辑流程","UserReportRenewalServiceImpl"),
|
||||
USER_REPORT_DELETE("user_report_delete","user","干扰源常态化信息删除流程","UserReportDeleteServiceImpl"),
|
||||
BUILD_USER_INFO_ARCHIVIST("build_user_info_archivist","user","干扰源用户台账归档流程","UserReportPOServiceImpl"),
|
||||
BUILD_USER_INFO_ARCHIVIST("build_user_info_archivist","user","干扰源用户台账归档流程","UserReportPOServiceImpl",""),
|
||||
// 弃用
|
||||
USER_REPORT_DELETE("user_report_delete", "user", "干扰源常态化信息删除流程", "UserReportDeleteServiceImpl","");
|
||||
|
||||
;
|
||||
|
||||
private final String key;
|
||||
|
||||
@@ -32,17 +41,21 @@ public enum SupervisionKeyEnum {
|
||||
|
||||
private final String clazzName;
|
||||
|
||||
private final String routePath;
|
||||
|
||||
/**
|
||||
* @param key 流程标识key
|
||||
* @param key 流程标识key
|
||||
* @param servicePrefix 服务类前缀
|
||||
* @param describe 描述
|
||||
* @param clazzName 类名,方便获取spring中对应的对象
|
||||
* @param describe 描述
|
||||
* @param clazzName 类名,方便获取spring中对应的对象
|
||||
* @param routePath 页面路由路径
|
||||
*/
|
||||
SupervisionKeyEnum(String key, String servicePrefix, String describe, String clazzName) {
|
||||
SupervisionKeyEnum(String key, String servicePrefix, String describe, String clazzName, String routePath) {
|
||||
this.key = key;
|
||||
this.servicePrefix = servicePrefix;
|
||||
this.describe = describe;
|
||||
this.clazzName = clazzName;
|
||||
this.routePath = routePath;
|
||||
}
|
||||
|
||||
private static final String packagePrefix = "com.njcn.supervision.service.";
|
||||
@@ -51,7 +64,7 @@ public enum SupervisionKeyEnum {
|
||||
/**
|
||||
* 根据流程key获取类的全路径,用于获取spring中的对象
|
||||
*/
|
||||
public static String getFullServicePathByKey(String key){
|
||||
public static String getFullServicePathByKey(String key) {
|
||||
for (SupervisionKeyEnum supervisionKeyEnum : SupervisionKeyEnum.values()) {
|
||||
if (supervisionKeyEnum.key.equalsIgnoreCase(key)) {
|
||||
return packagePrefix.concat(supervisionKeyEnum.servicePrefix).concat(packageMiddle).concat(supervisionKeyEnum.clazzName);
|
||||
@@ -60,11 +73,34 @@ public enum SupervisionKeyEnum {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程key获取页面路由路径
|
||||
*/
|
||||
public static String getRoutePathByKey(String key) {
|
||||
for (SupervisionKeyEnum supervisionKeyEnum : SupervisionKeyEnum.values()) {
|
||||
if (supervisionKeyEnum.key.equalsIgnoreCase(key)) {
|
||||
return supervisionKeyEnum.routePath;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有流程的全路径
|
||||
*/
|
||||
public static List<String> getAllFullServicePath() {
|
||||
List<String> path = new ArrayList<>();
|
||||
for (SupervisionKeyEnum supervisionKeyEnum : SupervisionKeyEnum.values()) {
|
||||
path.add(packagePrefix.concat(supervisionKeyEnum.servicePrefix).concat(packageMiddle).concat(supervisionKeyEnum.clazzName));
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断流程key是否在当前枚举内
|
||||
*/
|
||||
public static boolean containBusinessKye(String key){
|
||||
public static boolean containBusinessKye(String key) {
|
||||
for (SupervisionKeyEnum supervisionKeyEnum : SupervisionKeyEnum.values()) {
|
||||
if (supervisionKeyEnum.key.equalsIgnoreCase(key)) {
|
||||
return true;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class CheckDevice extends BaseEntity implements Serializable {
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 状态 0:未处理 1:已处理
|
||||
* 状态 0:未处理 1:处理中 2:处理完成
|
||||
*/
|
||||
@MppMultiId(value = "state")
|
||||
private Integer state;
|
||||
|
||||
Reference in New Issue
Block a user