核心信息提取

This commit is contained in:
2024-06-19 08:31:51 +08:00
parent 0140a1166d
commit 9a9af5db5d
31 changed files with 507 additions and 133 deletions

View File

@@ -1,11 +1,16 @@
package com.njcn.supervision.api;
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
import com.njcn.common.pojo.annotation.OperateInfo;
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;
/**
@@ -25,4 +30,12 @@ public interface BusinessCommonFeignClient {
@GetMapping("/updateProcessStatus")
HttpResult<Object> updateProcessStatus(@RequestParam("processKey") String processKey,@RequestParam("businessId") String businessId, @RequestParam("status")Integer status);
/**
* 根据流程key,业务id去实时更新流程状态
* @param processKey 流程定义key
* @param businessId 业务id
*/
@GetMapping("/getInstanceInfo")
HttpResult<BpmInstanceInfo> getInstanceInfo(@RequestParam("processKey") String processKey, @RequestParam("businessId")String businessId);
}

View File

@@ -1,5 +1,6 @@
package com.njcn.supervision.api.fallback;
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
@@ -28,6 +29,12 @@ public class BusinessCommonFeignClientFallbackFactory implements FallbackFactory
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey, String businessId) {
log.error("{}异常,降级处理,异常为:{}", "获取流程额外信息", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -2,6 +2,8 @@ package com.njcn.supervision.enums;
import lombok.Getter;
import java.util.Arrays;
@Getter
public enum ProblemTypeEnum {
@@ -18,4 +20,12 @@ public enum ProblemTypeEnum {
this.code = code;
this.name = name;
}
public static String getNameByCode(Integer code) {
ProblemTypeEnum problemTypeEnumTemp = Arrays.stream(ProblemTypeEnum.values())
.filter(problemTypeEnum -> problemTypeEnum.getCode().equals(code))
.findAny()
.orElse(PLAN);
return problemTypeEnumTemp.getName();
}
}

View File

@@ -38,6 +38,11 @@ public class WarningLeaflet extends BaseEntity implements Serializable{
*/
private String leafletNo;
/**
* 负责单位id
*/
private String deptId;
/**
* 1技术监督管理2在线监测超标问题3用户投诉4现场测试超标
*/

View File

@@ -33,6 +33,16 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
*/
private String leafletNo;
/**
* 负责单位id
*/
private String deptId;
/**
* 负责单位
*/
private String deptName;
/**
* 1技术监督管理2在线监测超标问题3用户投诉4现场测试超标
*/