核心信息提取
This commit is contained in:
@@ -56,6 +56,17 @@ public class BpmTaskVO {
|
|||||||
*/
|
*/
|
||||||
private ProcessInstance processInstance;
|
private ProcessInstance processInstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史流程实例编号
|
||||||
|
*/
|
||||||
|
private String historyInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务流程重要信息
|
||||||
|
*/
|
||||||
|
private String instanceSign;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("父任务编号")
|
@ApiModelProperty("父任务编号")
|
||||||
private String parentTaskId;
|
private String parentTaskId;
|
||||||
|
|
||||||
@@ -102,5 +113,4 @@ public class BpmTaskVO {
|
|||||||
private BpmProcessInstanceVO.User startUser;
|
private BpmProcessInstanceVO.User startUser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ public interface IBpmService<T> extends IService<T> {
|
|||||||
*/
|
*/
|
||||||
void updateProcessStatus(String businessId, Integer status);
|
void updateProcessStatus(String businessId, Integer status);
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 根据业务id获取历史审批id以及该任务的重要信息
|
* 根据业务id获取历史审批id以及该任务的重要信息
|
||||||
// * @param processKey 业务流程key
|
* @param businessId 业务流程id
|
||||||
// * @param businessId 业务流程id
|
*/
|
||||||
// */
|
BpmInstanceInfo getInstanceInfo(String businessId);
|
||||||
// BpmInstanceInfo getInstanceInfo(String processKey,String businessId);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.supervision.api.BusinessCommonFeignClient;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
@@ -60,6 +61,8 @@ public class BpmProcessInstanceController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBpmProcessInstanceService processInstanceService;
|
private IBpmProcessInstanceService processInstanceService;
|
||||||
@Resource
|
@Resource
|
||||||
|
private BusinessCommonFeignClient businessCommonFeignClient;
|
||||||
|
@Resource
|
||||||
private IBpmTaskService taskService;
|
private IBpmTaskService taskService;
|
||||||
@Resource
|
@Resource
|
||||||
private IBpmProcessDefinitionService processDefinitionService;
|
private IBpmProcessDefinitionService processDefinitionService;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.supervision.api.BusinessCommonFeignClient;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
@@ -58,6 +59,9 @@ public class BpmTaskController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBpmTaskService taskService;
|
private IBpmTaskService taskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BusinessCommonFeignClient businessCommonFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IBpmProcessInstanceService processInstanceService;
|
private IBpmProcessInstanceService processInstanceService;
|
||||||
|
|
||||||
@@ -86,7 +90,7 @@ public class BpmTaskController extends BaseController {
|
|||||||
convertSet(pageResult.getList(), Task::getProcessInstanceId));
|
convertSet(pageResult.getList(), Task::getProcessInstanceId));
|
||||||
List<UserVO> userList = userFeignClient.getUserVOByIdList(convertList(processInstanceMap.values(), ProcessInstance::getStartUserId)).getData();
|
List<UserVO> userList = userFeignClient.getUserVOByIdList(convertList(processInstanceMap.values(), ProcessInstance::getStartUserId)).getData();
|
||||||
Map<String, UserVO> userMap = CollectionUtils.convertMap(userList, UserVO::getId);
|
Map<String, UserVO> userMap = CollectionUtils.convertMap(userList, UserVO::getId);
|
||||||
PageResult<BpmTaskVO> bpmTaskVOPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap);
|
PageResult<BpmTaskVO> bpmTaskVOPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap,businessCommonFeignClient);
|
||||||
//封装调整为当前系统的格式
|
//封装调整为当前系统的格式
|
||||||
Page<BpmTaskVO> page = new Page<>();
|
Page<BpmTaskVO> page = new Page<>();
|
||||||
page.setRecords(bpmTaskVOPageResult.getList());
|
page.setRecords(bpmTaskVOPageResult.getList());
|
||||||
|
|||||||
@@ -2,10 +2,18 @@ package com.njcn.bpm.utils;
|
|||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.PageResult;
|
import com.njcn.bpm.pojo.dto.PageResult;
|
||||||
import com.njcn.bpm.pojo.po.BpmForm;
|
import com.njcn.bpm.pojo.po.BpmForm;
|
||||||
import com.njcn.bpm.pojo.vo.instance.BpmProcessInstanceVO;
|
import com.njcn.bpm.pojo.vo.instance.BpmProcessInstanceVO;
|
||||||
import com.njcn.bpm.pojo.vo.task.BpmTaskVO;
|
import com.njcn.bpm.pojo.vo.task.BpmTaskVO;
|
||||||
|
import com.njcn.bpm.service.IBpmService;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.supervision.api.BusinessCommonFeignClient;
|
||||||
|
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||||
|
import com.njcn.supervision.enums.SupervisionResponseEnum;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.user.pojo.vo.UserVO;
|
import com.njcn.user.pojo.vo.UserVO;
|
||||||
import org.flowable.engine.history.HistoricProcessInstance;
|
import org.flowable.engine.history.HistoricProcessInstance;
|
||||||
@@ -15,10 +23,13 @@ import org.flowable.task.api.history.HistoricTaskInstance;
|
|||||||
import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl;
|
import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.validation.beanvalidation.SpringValidatorAdapter;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.njcn.bpm.utils.CollectionUtils.*;
|
import static com.njcn.bpm.utils.CollectionUtils.*;
|
||||||
import static com.njcn.bpm.utils.MapUtils.findAndThen;
|
import static com.njcn.bpm.utils.MapUtils.findAndThen;
|
||||||
@@ -34,9 +45,12 @@ public interface BpmTaskConvert {
|
|||||||
|
|
||||||
BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
|
BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default PageResult<BpmTaskVO> buildTodoTaskPage(PageResult<Task> pageResult,
|
default PageResult<BpmTaskVO> buildTodoTaskPage(PageResult<Task> pageResult,
|
||||||
Map<String, ProcessInstance> processInstanceMap,
|
Map<String, ProcessInstance> processInstanceMap,
|
||||||
Map<String, UserVO> userMap) {
|
Map<String, UserVO> userMap,
|
||||||
|
BusinessCommonFeignClient businessCommonFeignClient) {
|
||||||
|
|
||||||
return BeanUtils.toBean(pageResult, BpmTaskVO.class, taskVO -> {
|
return BeanUtils.toBean(pageResult, BpmTaskVO.class, taskVO -> {
|
||||||
ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
|
ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
|
||||||
@@ -46,11 +60,21 @@ public interface BpmTaskConvert {
|
|||||||
taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskVO.ProcessInstance.class));
|
taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskVO.ProcessInstance.class));
|
||||||
UserVO startUserVO = userMap.get(processInstance.getStartUserId());
|
UserVO startUserVO = userMap.get(processInstance.getStartUserId());
|
||||||
taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUserVO, BpmProcessInstanceVO.User.class));
|
taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUserVO, BpmProcessInstanceVO.User.class));
|
||||||
|
String processDefinitionId = taskVO.getProcessInstance().getProcessDefinitionId();
|
||||||
|
String key = processDefinitionId.substring(0,processDefinitionId.lastIndexOf(":"));
|
||||||
|
key = key.substring(0,key.lastIndexOf(":"));
|
||||||
|
BpmInstanceInfo instanceInfo = businessCommonFeignClient.getInstanceInfo(key, processInstance.getBusinessKey()).getData();
|
||||||
|
if(Objects.nonNull(instanceInfo)){
|
||||||
|
taskVO.setHistoryInstanceId(instanceInfo.getHistoryInstanceId());
|
||||||
|
taskVO.setInstanceSign(instanceInfo.getInstanceSign());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default PageResult<BpmTaskVO> buildTaskPage(PageResult<HistoricTaskInstance> pageResult,
|
default PageResult<BpmTaskVO> buildTaskPage(PageResult<HistoricTaskInstance> pageResult,
|
||||||
Map<String, HistoricProcessInstance> processInstanceMap,
|
Map<String, HistoricProcessInstance> processInstanceMap,
|
||||||
Map<String, UserVO> userMap,
|
Map<String, UserVO> userMap,
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.njcn.device.pq.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum RunFlagEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运行状态枚举
|
||||||
|
*/
|
||||||
|
RUNNING(0, "运行"),
|
||||||
|
OVERHAUL(1, "检修"),
|
||||||
|
OFF_LINE(2, "停运"),
|
||||||
|
DEBUG(3, "调试"),
|
||||||
|
QUIT(4, "退运");
|
||||||
|
|
||||||
|
private final Integer status;
|
||||||
|
private final String remark;
|
||||||
|
|
||||||
|
RunFlagEnum(Integer status, String remark) {
|
||||||
|
this.status = status;
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRunFlagRemarkByStatus(Integer status) {
|
||||||
|
RunFlagEnum runFlagEnum = Arrays.stream(RunFlagEnum.values())
|
||||||
|
.filter(runFlagEnum1 -> runFlagEnum1.getStatus().equals(status))
|
||||||
|
.findAny()
|
||||||
|
.orElse(RUNNING);
|
||||||
|
return runFlagEnum.getRemark();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,6 +38,12 @@
|
|||||||
<artifactId>common-poi</artifactId>
|
<artifactId>common-poi</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>bpm-api</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,11 +1,16 @@
|
|||||||
package com.njcn.supervision.api;
|
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.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.supervision.api.fallback.BusinessCommonFeignClientFallbackFactory;
|
import com.njcn.supervision.api.fallback.BusinessCommonFeignClientFallbackFactory;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,4 +30,12 @@ public interface BusinessCommonFeignClient {
|
|||||||
@GetMapping("/updateProcessStatus")
|
@GetMapping("/updateProcessStatus")
|
||||||
HttpResult<Object> updateProcessStatus(@RequestParam("processKey") String processKey,@RequestParam("businessId") String businessId, @RequestParam("status")Integer status);
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.supervision.api.fallback;
|
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.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
@@ -28,6 +29,12 @@ public class BusinessCommonFeignClientFallbackFactory implements FallbackFactory
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey, String businessId) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取流程额外信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.njcn.supervision.enums;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum ProblemTypeEnum {
|
public enum ProblemTypeEnum {
|
||||||
|
|
||||||
@@ -18,4 +20,12 @@ public enum ProblemTypeEnum {
|
|||||||
this.code = code;
|
this.code = code;
|
||||||
this.name = name;
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ public class WarningLeaflet extends BaseEntity implements Serializable{
|
|||||||
*/
|
*/
|
||||||
private String leafletNo;
|
private String leafletNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责单位id
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标
|
* 1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -33,6 +33,16 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
|
|||||||
*/
|
*/
|
||||||
private String leafletNo;
|
private String leafletNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责单位id
|
||||||
|
*/
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责单位
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标
|
* 1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.supervision.controller;
|
package com.njcn.supervision.controller;
|
||||||
|
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -40,6 +41,17 @@ public class BusinessCommonController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiIgnore
|
||||||
|
@GetMapping("/getInstanceInfo")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("获取业务数据")
|
||||||
|
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey,String businessId) {
|
||||||
|
String methodDescribe = getMethodDescribe("getInstanceInfo");
|
||||||
|
IBpmService iBpmService = getBpmServiceByBusinessKey(processKey);
|
||||||
|
BpmInstanceInfo instanceInfo = iBpmService.getInstanceInfo(businessId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, instanceInfo, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据业务流key获取实现类对象
|
* 根据业务流key获取实现类对象
|
||||||
* @param processKey 业务流key
|
* @param processKey 业务流key
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ public class SupervisionPlanController extends BaseController {
|
|||||||
supervisionPlanPOService.updateProcessStatus(businessKey,status);
|
supervisionPlanPOService.updateProcessStatus(businessKey,status);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@GetMapping("/initiateWarningLeaflet")
|
@GetMapping("/initiateWarningLeaflet")
|
||||||
@ApiOperation("针对技术监督问题发起告警单")
|
@ApiOperation("针对技术监督问题发起告警单")
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
supervision_temp_line_report.line_name lineName,
|
supervision_temp_line_report.line_name lineName,
|
||||||
supervision_temp_line_debug.reason reason,
|
supervision_temp_line_debug.reason reason,
|
||||||
supervision_temp_line_run_test.process_instance_id process_instanceId,
|
supervision_temp_line_run_test.process_instance_id process_instanceId,
|
||||||
|
supervision_temp_line_run_test.history_instance_id historyInstanceId,
|
||||||
supervision_temp_line_run_test.`status` `Status`,
|
supervision_temp_line_run_test.`status` `Status`,
|
||||||
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`,
|
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`,
|
||||||
supervision_temp_line_run_test.test_run_time,
|
supervision_temp_line_run_test.test_run_time,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.supervision.service.device.impl;
|
package com.njcn.supervision.service.device.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -9,6 +10,7 @@ import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.db.constant.DbConstant;
|
import com.njcn.db.constant.DbConstant;
|
||||||
@@ -79,7 +81,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
|
|||||||
return checkDevice;
|
return checkDevice;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
this.saveOrUpdateBatchByMultiId(checkDevices,100);
|
this.saveOrUpdateBatchByMultiId(checkDevices, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -95,7 +97,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
|
|||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(devList)) {
|
if (CollUtil.isNotEmpty(devList)) {
|
||||||
queryWrapper.in("A.device_id",devList);
|
queryWrapper.in("A.device_id", devList);
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotNull(param)) {
|
if (ObjectUtil.isNotNull(param)) {
|
||||||
//查询参数不为空,进行条件填充
|
//查询参数不为空,进行条件填充
|
||||||
@@ -147,7 +149,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
|
|||||||
public void reloadReport(CheckDeviceParam param) {
|
public void reloadReport(CheckDeviceParam param) {
|
||||||
CheckDevice checkDevice = this.baseMapper.selectById(param.getId());
|
CheckDevice checkDevice = this.baseMapper.selectById(param.getId());
|
||||||
//判断是否有权限操作
|
//判断是否有权限操作
|
||||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),checkDevice.getCreateBy());
|
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), checkDevice.getCreateBy());
|
||||||
//处理历史流程id列表
|
//处理历史流程id列表
|
||||||
String historyInstanceIds = InstanceUtil.dealHistoryId(checkDevice.getProcessInstanceId(), checkDevice.getHistoryInstanceId());
|
String historyInstanceIds = InstanceUtil.dealHistoryId(checkDevice.getProcessInstanceId(), checkDevice.getHistoryInstanceId());
|
||||||
checkDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
checkDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||||
@@ -186,4 +188,18 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
|
|||||||
checkDevice.setStatus(status);
|
checkDevice.setStatus(status);
|
||||||
this.updateById(checkDevice);
|
this.updateById(checkDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
CheckDeviceVo checkDevice = this.getInfoById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(checkDevice.getHistoryInstanceId());
|
||||||
|
String sign = checkDevice.getDept()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(checkDevice.getSubstation())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(checkDevice.getDeviceName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -10,11 +11,13 @@ import com.njcn.bpm.api.BpmProcessFeignClient;
|
|||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmResponseEnum;
|
import com.njcn.bpm.enums.BpmResponseEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
|
import com.njcn.device.pq.enums.RunFlagEnum;
|
||||||
import com.njcn.device.pq.pojo.po.line.LineInfoVO;
|
import com.njcn.device.pq.pojo.po.line.LineInfoVO;
|
||||||
import com.njcn.device.pq.pojo.vo.DeviceVO;
|
import com.njcn.device.pq.pojo.vo.DeviceVO;
|
||||||
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||||
@@ -22,6 +25,7 @@ import com.njcn.supervision.enums.SupervisionUserStatusEnum;
|
|||||||
import com.njcn.supervision.mapper.device.QuitRunningDeviceMapper;
|
import com.njcn.supervision.mapper.device.QuitRunningDeviceMapper;
|
||||||
import com.njcn.supervision.pojo.param.device.QuitRunningDeviceParam;
|
import com.njcn.supervision.pojo.param.device.QuitRunningDeviceParam;
|
||||||
import com.njcn.supervision.pojo.po.device.QuitRunningDevice;
|
import com.njcn.supervision.pojo.po.device.QuitRunningDevice;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.QuitRunningDeviceVO;
|
import com.njcn.supervision.pojo.vo.device.QuitRunningDeviceVO;
|
||||||
import com.njcn.supervision.service.device.IQuitRunningDeviceService;
|
import com.njcn.supervision.service.device.IQuitRunningDeviceService;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
@@ -68,7 +72,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
|||||||
QuitRunningDevice quitRunningDevice = new QuitRunningDevice();
|
QuitRunningDevice quitRunningDevice = new QuitRunningDevice();
|
||||||
BeanUtils.copyProperties(quitRunningDeviceParam, quitRunningDevice);
|
BeanUtils.copyProperties(quitRunningDeviceParam, quitRunningDevice);
|
||||||
//监测点只有退运,终端由前端选择了指定状态
|
//监测点只有退运,终端由前端选择了指定状态
|
||||||
if(quitRunningDevice.getDeviceType() == 2){
|
if (quitRunningDevice.getDeviceType() == 2) {
|
||||||
quitRunningDevice.setDevStatus(4);
|
quitRunningDevice.setDevStatus(4);
|
||||||
}
|
}
|
||||||
quitRunningDevice.setState(DataStateEnum.ENABLE.getCode());
|
quitRunningDevice.setState(DataStateEnum.ENABLE.getCode());
|
||||||
@@ -95,7 +99,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
|||||||
//判断是否有权限操作
|
//判断是否有权限操作
|
||||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), quitRunningDevice.getCreateBy());
|
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), quitRunningDevice.getCreateBy());
|
||||||
//监测点只有退运,终端由前端选择了指定状态
|
//监测点只有退运,终端由前端选择了指定状态
|
||||||
if(quitRunningDevice.getDeviceType() == 2){
|
if (quitRunningDevice.getDeviceType() == 2) {
|
||||||
quitRunningDevice.setDevStatus(4);
|
quitRunningDevice.setDevStatus(4);
|
||||||
}
|
}
|
||||||
quitRunningDeviceUpdateParam.setProcessInstanceId(quitRunningDevice.getProcessInstanceId());
|
quitRunningDeviceUpdateParam.setProcessInstanceId(quitRunningDevice.getProcessInstanceId());
|
||||||
@@ -198,6 +202,24 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
|||||||
this.updateById(quitRunningDevice);
|
this.updateById(quitRunningDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
QuitRunningDeviceVO quitRunningDeviceVO = this.getVOById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(quitRunningDeviceVO.getHistoryInstanceId());
|
||||||
|
String sign = quitRunningDeviceVO.getGdName()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(quitRunningDeviceVO.getSubName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(quitRunningDeviceVO.getDeviceName())
|
||||||
|
.concat("运行状态由:")
|
||||||
|
.concat(RunFlagEnum.getRunFlagRemarkByStatus(quitRunningDeviceVO.getDevOriginalStatus()))
|
||||||
|
.concat("申请变更为:")
|
||||||
|
.concat(RunFlagEnum.getRunFlagRemarkByStatus(quitRunningDeviceVO.getDevStatus()));
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QuitRunningDeviceVO getVOById(String id) {
|
public QuitRunningDeviceVO getVOById(String id) {
|
||||||
QuitRunningDevice quitRunningDevice = this.baseMapper.selectById(id);
|
QuitRunningDevice quitRunningDevice = this.baseMapper.selectById(id);
|
||||||
@@ -260,4 +282,5 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
|||||||
throw new BusinessException(BpmResponseEnum.QUIT_RUNNING_REPEAT);
|
throw new BusinessException(BpmResponseEnum.QUIT_RUNNING_REPEAT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -22,6 +24,7 @@ import com.njcn.supervision.pojo.param.device.SupervisionDevMainReportParam;
|
|||||||
import com.njcn.supervision.pojo.param.device.SupervisionTempDeviceReportParam;
|
import com.njcn.supervision.pojo.param.device.SupervisionTempDeviceReportParam;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||||
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
|
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
|
||||||
import com.njcn.supervision.service.device.SupervisionTempDeviceReportService;
|
import com.njcn.supervision.service.device.SupervisionTempDeviceReportService;
|
||||||
@@ -185,6 +188,20 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
this.lambdaUpdate().set(SupervisionDevMainReportPO::getStatus,status).eq(SupervisionDevMainReportPO::getId,businessKey).update();
|
this.lambdaUpdate().set(SupervisionDevMainReportPO::getStatus,status).eq(SupervisionDevMainReportPO::getId,businessKey).update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SupervisionDevMainReportVO supervisionDevMainReportVO = this.querySurveyDetail(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(supervisionDevMainReportVO.getHistoryInstanceId());
|
||||||
|
String sign = supervisionDevMainReportVO.getOrgName()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionDevMainReportVO.getSubstationName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionDevMainReportVO.getMonitoringTerminalName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String cancelDevMainReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
public String cancelDevMainReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
//准备取消该流程,需要远程调用接口
|
//准备取消该流程,需要远程调用接口
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -25,6 +27,7 @@ import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
|||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempDeviceReport;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
|
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
|
||||||
@@ -85,7 +88,7 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
|
SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
|
||||||
if(Objects.nonNull(byId)){
|
if(Objects.nonNull(byId)){
|
||||||
if(byId.getState() == 1) {
|
if(byId.getState() == 1) {
|
||||||
throw new BusinessException("该监测点以申请联调");
|
throw new BusinessException("该监测点已申请联调");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SupervisionTempLineDebugPO supervisionTempLineDebugPO = new SupervisionTempLineDebugPO();
|
SupervisionTempLineDebugPO supervisionTempLineDebugPO = new SupervisionTempLineDebugPO();
|
||||||
@@ -224,6 +227,21 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
this.lambdaUpdate().set(SupervisionTempLineDebugPO::getStatus,status).eq(SupervisionTempLineDebugPO::getId,businessKey).update();
|
this.lambdaUpdate().set(SupervisionTempLineDebugPO::getStatus,status).eq(SupervisionTempLineDebugPO::getId,businessKey).update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SupervisionTempLineDebugVO supervisionTempLineDebugVO = this.getDetailTempLineDebug(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineDebugVO.getHistoryInstanceId());
|
||||||
|
String sign = supervisionTempLineDebugVO.getPowerSubstationName()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineDebugVO.getMonitoringTerminalName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineDebugVO.getLineName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 临时表台账数据同步到实际表中
|
* @Description: 临时表台账数据同步到实际表中
|
||||||
* @Param:
|
* @Param:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -20,6 +22,7 @@ import com.njcn.supervision.enums.SupervisionUserStatusEnum;
|
|||||||
import com.njcn.supervision.mapper.device.SupervisionTempLineReportMapper;
|
import com.njcn.supervision.mapper.device.SupervisionTempLineReportMapper;
|
||||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineReportParam;
|
import com.njcn.supervision.pojo.param.device.SupervisionTempLineReportParam;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineReportVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineReportVO;
|
||||||
import com.njcn.supervision.service.device.SupervisionTempLineReportService;
|
import com.njcn.supervision.service.device.SupervisionTempLineReportService;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
@@ -162,6 +165,22 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SupervisionTempLineReportVO supervisionTempLineReportVO = this.getDetailTempLine(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineReportVO.getHistoryInstanceId());
|
||||||
|
String sign = supervisionTempLineReportVO.getPowerSubstationName()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineReportVO.getMonitoringTerminalName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineReportVO.getConnectedBus())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineReportVO.getLineName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String cancelTempLineReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
public String cancelTempLineReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
//准备取消该流程,需要远程调用接口
|
//准备取消该流程,需要远程调用接口
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ package com.njcn.supervision.service.device.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -26,6 +28,7 @@ import com.njcn.supervision.mapper.device.SupervisionTempLineRunTestMapper;
|
|||||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineRunTestParam;
|
import com.njcn.supervision.pojo.param.device.SupervisionTempLineRunTestParam;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||||
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
@@ -217,6 +220,22 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
this.updateById(supervisionTempLineRunTestPO);
|
this.updateById(supervisionTempLineRunTestPO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SupervisionTempLineRunTestVO supervisionTempLineRunTestVO = this.getRunTestById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(supervisionTempLineRunTestVO.getHistoryInstanceId());
|
||||||
|
String sign = supervisionTempLineRunTestVO.getPowerSubstationName()
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineRunTestVO.getMonitoringTerminalName())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineRunTestVO.getConnectedBus())
|
||||||
|
.concat(StrPool.SLASH)
|
||||||
|
.concat(supervisionTempLineRunTestVO.getLineName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupervisionTempLineRunTestVO getRunTestById(String id) {
|
public SupervisionTempLineRunTestVO getRunTestById(String id) {
|
||||||
return this.baseMapper.getRunTestInfo(id);
|
return this.baseMapper.getRunTestInfo(id);
|
||||||
|
|||||||
@@ -21,13 +21,14 @@ public interface IWarningLeafletService extends IBpmService<WarningLeaflet> {
|
|||||||
/**
|
/**
|
||||||
* 创建预告警单,此时还没有走流程,等待用户上传反馈单后,才正式进入工作流阶段
|
* 创建预告警单,此时还没有走流程,等待用户上传反馈单后,才正式进入工作流阶段
|
||||||
* name:预告警单名称,此处暂时用普测计划名称+变电站名称组成预告警单名
|
* name:预告警单名称,此处暂时用普测计划名称+变电站名称组成预告警单名
|
||||||
|
* deptId:预告警单名称,负责单位id
|
||||||
* code:预告警编号暂时随机by yxb
|
* code:预告警编号暂时随机by yxb
|
||||||
* id:对应问题源id,用于查询详细数据
|
* id:对应问题源id,用于查询详细数据
|
||||||
* problemType:问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
* problemType:问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,参考枚举:ProblemTypeEnum
|
||||||
* leaflet:单子类型:1:预警单;2:告警单
|
* leaflet:单子类型:1:预警单;2:告警单
|
||||||
* issueDetail:问题详细描述
|
* issueDetail:问题详细描述
|
||||||
*/
|
*/
|
||||||
void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet,String issueDetail);
|
void createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail);
|
||||||
|
|
||||||
Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);
|
Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -29,6 +31,7 @@ import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
|||||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||||
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanPO;
|
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanPO;
|
||||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||||
@@ -66,11 +69,11 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper, WarningLeaflet> implements IWarningLeafletService {
|
public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper, WarningLeaflet> implements IWarningLeafletService {
|
||||||
@Resource
|
@Resource
|
||||||
private UserFeignClient userFeignClient;
|
private UserFeignClient userFeignClient;
|
||||||
@Resource
|
@Resource
|
||||||
private DicDataFeignClient dicDataFeignClient;
|
private DicDataFeignClient dicDataFeignClient;
|
||||||
@Resource
|
@Resource
|
||||||
private BpmProcessFeignClient bpmProcessFeignClient;
|
private BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISurveyTestService surveyTestService;
|
private ISurveyTestService surveyTestService;
|
||||||
@@ -79,20 +82,16 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
private DeptFeignClient deptFeignClient;
|
private DeptFeignClient deptFeignClient;
|
||||||
@Lazy
|
@Lazy
|
||||||
@Resource
|
@Resource
|
||||||
private SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
|
private SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 预告警单的反馈单对应的流程定义 KEY
|
|
||||||
*/
|
|
||||||
// public static final String PROCESS_KEY = "warn_leaflet";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
|
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet,String issueDetail) {
|
public void createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail) {
|
||||||
WarningLeaflet warningLeaflet = new WarningLeaflet();
|
WarningLeaflet warningLeaflet = new WarningLeaflet();
|
||||||
warningLeaflet.setLeafletName(name);
|
warningLeaflet.setLeafletName(name);
|
||||||
|
warningLeaflet.setDeptId(deptId);
|
||||||
warningLeaflet.setLeafletNo(code);
|
warningLeaflet.setLeafletNo(code);
|
||||||
warningLeaflet.setProblemType(problemType);
|
warningLeaflet.setProblemType(problemType);
|
||||||
warningLeaflet.setProblemId(id);
|
warningLeaflet.setProblemId(id);
|
||||||
@@ -115,7 +114,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||||
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.Create_By", colleaguesIds)
|
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.Create_By", colleaguesIds)
|
||||||
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
|
.eq("supervision_warning_leaflet.state", DataStateEnum.ENABLE.getCode())
|
||||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
||||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||||
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.warningPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.warningPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
||||||
@@ -124,13 +123,13 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void extracted(Page<WarningLeafletVO> warningLeafletVOPage) {
|
private void extracted(Page<WarningLeafletVO> warningLeafletVOPage) {
|
||||||
if(CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())){
|
if (CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())) {
|
||||||
List<String> deptIds = warningLeafletVOPage.getRecords().stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
List<String> deptIds = warningLeafletVOPage.getRecords().stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
||||||
if(CollUtil.isNotEmpty(deptIds)){
|
if (CollUtil.isNotEmpty(deptIds)) {
|
||||||
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
||||||
Map<String, String> deptMap = data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
|
Map<String, String> deptMap = data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
|
||||||
warningLeafletVOPage.getRecords().stream().peek(x -> {
|
warningLeafletVOPage.getRecords().stream().peek(x -> {
|
||||||
if(deptMap.containsKey(x.getDutyOrgId())){
|
if (deptMap.containsKey(x.getDutyOrgId())) {
|
||||||
x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
|
x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -163,13 +162,13 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
public String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam) {
|
public String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam) {
|
||||||
WarningLeaflet warningLeaflet = this.baseMapper.selectById(warningLeafletUpdateParam.getId());
|
WarningLeaflet warningLeaflet = this.baseMapper.selectById(warningLeafletUpdateParam.getId());
|
||||||
//判断是否有权限操作
|
//判断是否有权限操作
|
||||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),warningLeaflet.getCreateBy());
|
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), warningLeaflet.getCreateBy());
|
||||||
|
|
||||||
//处理历史流程id列表
|
//处理历史流程id列表
|
||||||
String historyInstanceIds = InstanceUtil.dealHistoryId(warningLeaflet.getProcessInstanceId(), warningLeaflet.getHistoryInstanceId());
|
String historyInstanceIds = InstanceUtil.dealHistoryId(warningLeaflet.getProcessInstanceId(), warningLeaflet.getHistoryInstanceId());
|
||||||
|
|
||||||
|
|
||||||
BeanUtils.copyProperties(warningLeafletUpdateParam,warningLeaflet);
|
BeanUtils.copyProperties(warningLeafletUpdateParam, warningLeaflet);
|
||||||
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||||
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
|
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
|
||||||
@@ -192,16 +191,22 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
@Override
|
@Override
|
||||||
public WarningLeafletVO getVOById(String id) {
|
public WarningLeafletVO getVOById(String id) {
|
||||||
WarningLeaflet warningLeaflet = this.getById(id);
|
WarningLeaflet warningLeaflet = this.getById(id);
|
||||||
WarningLeafletVO vo = new WarningLeafletVO();
|
WarningLeafletVO warningLeafletVO = new WarningLeafletVO();
|
||||||
BeanUtil.copyProperties(warningLeaflet,vo);
|
BeanUtil.copyProperties(warningLeaflet, warningLeafletVO);
|
||||||
if(warningLeaflet.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode())){
|
if (StrUtil.isNotBlank(warningLeaflet.getDeptId())) {
|
||||||
|
Dept dept = deptFeignClient.getDeptById(warningLeaflet.getDeptId()).getData();
|
||||||
|
if (Objects.nonNull(dept)) {
|
||||||
|
warningLeafletVO.setDeptName(dept.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (warningLeaflet.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode())) {
|
||||||
String problemId = warningLeaflet.getProblemId();
|
String problemId = warningLeaflet.getProblemId();
|
||||||
//查询谐波普测,获取该普测计划上传的文件
|
//查询谐波普测,获取该普测计划上传的文件
|
||||||
//查询到现场测试超标附件地址
|
//查询到现场测试超标附件地址
|
||||||
SurveyTest surveyTest = surveyTestService.getById(problemId);
|
SurveyTest surveyTest = surveyTestService.getById(problemId);
|
||||||
vo.setProblemPath(surveyTest.getTestReport());
|
warningLeafletVO.setProblemPath(surveyTest.getTestReport());
|
||||||
}
|
}
|
||||||
return vo;
|
return warningLeafletVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -209,6 +214,25 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
this.lambdaUpdate().set(WarningLeaflet::getStatus, status).eq(WarningLeaflet::getId, businessKey).update();
|
this.lambdaUpdate().set(WarningLeaflet::getStatus, status).eq(WarningLeaflet::getId, businessKey).update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
WarningLeafletVO warningLeafletVO = this.getVOById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(warningLeafletVO.getHistoryInstanceId());
|
||||||
|
String type = "告警单";
|
||||||
|
if(warningLeafletVO.getLeafletType() == 1){
|
||||||
|
type = "预警单";
|
||||||
|
}
|
||||||
|
String sign = "问题来源:".concat(ProblemTypeEnum.getNameByCode(warningLeafletVO.getProblemType()))
|
||||||
|
.concat(",由单位:")
|
||||||
|
.concat(warningLeafletVO.getDeptName())
|
||||||
|
.concat("负责的:")
|
||||||
|
.concat(warningLeafletVO.getLeafletName())
|
||||||
|
.concat(type);
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam) {
|
public Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam) {
|
||||||
QueryWrapper<WarningLeafletVO> warningLeafletVOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<WarningLeafletVO> warningLeafletVOQueryWrapper = new QueryWrapper<>();
|
||||||
@@ -221,27 +245,27 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
//获取当前用户部门所有同事的id,查看该部门下所有的数据
|
||||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||||
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.Create_By", colleaguesIds)
|
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.Create_By", colleaguesIds)
|
||||||
.eq("supervision_warning_leaflet.state",DataStateEnum.ENABLE.getCode())
|
.eq("supervision_warning_leaflet.state", DataStateEnum.ENABLE.getCode())
|
||||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.ALARM.getCode())
|
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.ALARM.getCode())
|
||||||
.eq(Objects.nonNull(warningLeafletQueryParam.getStatus()),"supervision_warning_leaflet.status",warningLeafletQueryParam.getStatus())
|
.eq(Objects.nonNull(warningLeafletQueryParam.getStatus()), "supervision_warning_leaflet.status", warningLeafletQueryParam.getStatus())
|
||||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||||
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
|
||||||
//目前仅知道现场测试超标会有附件
|
//目前仅知道现场测试超标会有附件
|
||||||
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
List<WarningLeafletVO> records = warningLeafletVOPage.getRecords();
|
||||||
if(CollectionUtil.isNotEmpty(records)){
|
if (CollectionUtil.isNotEmpty(records)) {
|
||||||
List<String> deptIds = records.stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
List<String> deptIds = records.stream().distinct().map(WarningLeafletVO::getDutyOrgId).collect(Collectors.toList());
|
||||||
Map<String, String> deptMap = new HashMap<>();
|
Map<String, String> deptMap = new HashMap<>();
|
||||||
if(CollUtil.isNotEmpty(deptIds)){
|
if (CollUtil.isNotEmpty(deptIds)) {
|
||||||
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
||||||
deptMap.putAll(data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName)));
|
deptMap.putAll(data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName)));
|
||||||
}
|
}
|
||||||
for (WarningLeafletVO record : records) {
|
for (WarningLeafletVO record : records) {
|
||||||
if(record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())){
|
if (record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())) {
|
||||||
//查询到现场测试超标附件地址
|
//查询到现场测试超标附件地址
|
||||||
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
||||||
record.setProblemPath(surveyTest.getTestReport());
|
record.setProblemPath(surveyTest.getTestReport());
|
||||||
}
|
}
|
||||||
if(deptMap.containsKey(record.getDutyOrgId())){
|
if (deptMap.containsKey(record.getDutyOrgId())) {
|
||||||
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -251,21 +275,21 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String addLineOverLimitData(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
|
public String addLineOverLimitData(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
|
||||||
//组装预警告警信息
|
// //组装预警告警信息
|
||||||
String info = assembleOverLimitInfo(rMpPartHarmonicDetailDTO);
|
// String info = assembleOverLimitInfo(rMpPartHarmonicDetailDTO);
|
||||||
//检查是否存在该预警单
|
// //检查是否存在该预警单
|
||||||
List<WarningLeaflet> list = this.lambdaQuery().eq(WarningLeaflet::getIssueDetail, info).list();
|
// List<WarningLeaflet> list = this.lambdaQuery().eq(WarningLeaflet::getIssueDetail, info).list();
|
||||||
if(CollectionUtil.isNotEmpty(list)){
|
// if(CollectionUtil.isNotEmpty(list)){
|
||||||
throw new BusinessException("该预/告警单以发布");
|
// throw new BusinessException("该预/告警单已发布");
|
||||||
}
|
// }
|
||||||
this.createLeaflet(
|
// this.createLeaflet(
|
||||||
rMpPartHarmonicDetailDTO.getMeasurementPointName(),
|
// rMpPartHarmonicDetailDTO.getMeasurementPointName(),
|
||||||
IdWorker.get32UUID(),
|
// IdWorker.get32UUID(),
|
||||||
rMpPartHarmonicDetailDTO.getMeasurementPointId(),
|
// rMpPartHarmonicDetailDTO.getMeasurementPointId(),
|
||||||
ProblemTypeEnum.ONLINE.getCode(),
|
// ProblemTypeEnum.ONLINE.getCode(),
|
||||||
Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? LeafletTypeEnum.ALARM.getCode(): LeafletTypeEnum.WARNING.getCode(),
|
// Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? LeafletTypeEnum.ALARM.getCode(): LeafletTypeEnum.WARNING.getCode(),
|
||||||
assembleOverLimitInfo(rMpPartHarmonicDetailDTO)
|
// assembleOverLimitInfo(rMpPartHarmonicDetailDTO)
|
||||||
);
|
// );
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -276,7 +300,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
//准备取消该流程,需要远程调用接口
|
//准备取消该流程,需要远程调用接口
|
||||||
WarningLeaflet warningLeaflet = this.baseMapper.selectById(cancelReqVO.getId());
|
WarningLeaflet warningLeaflet = this.baseMapper.selectById(cancelReqVO.getId());
|
||||||
//判断是否有权限操作
|
//判断是否有权限操作
|
||||||
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),warningLeaflet.getCreateBy());
|
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), warningLeaflet.getCreateBy());
|
||||||
//取消流程
|
//取消流程
|
||||||
bpmProcessFeignClient.cancelProcessInstanceByStartUser(cancelReqVO);
|
bpmProcessFeignClient.cancelProcessInstanceByStartUser(cancelReqVO);
|
||||||
//更新状态
|
//更新状态
|
||||||
@@ -287,18 +311,18 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
|||||||
|
|
||||||
|
|
||||||
private String assembleOverLimitInfo(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
|
private String assembleOverLimitInfo(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
|
||||||
String info ="";
|
String info = "";
|
||||||
String leafletType = Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? "告警单" : "预警单";
|
String leafletType = Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(), 1) ? "告警单" : "预警单";
|
||||||
/*获取稳态统计指标*/
|
/*获取稳态统计指标*/
|
||||||
List<DictData> steadyStatis = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDICATOR_TYPE.getCode()).getData();
|
List<DictData> steadyStatis = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDICATOR_TYPE.getCode()).getData();
|
||||||
List<String> harmonicTypes = steadyStatis.stream().filter(temp -> rMpPartHarmonicDetailDTO.getHarmonicTypes().contains(temp.getId())).map(DictData::getName).collect(Collectors.toList());
|
List<String> harmonicTypes = steadyStatis.stream().filter(temp -> rMpPartHarmonicDetailDTO.getHarmonicTypes().contains(temp.getId())).map(DictData::getName).collect(Collectors.toList());
|
||||||
|
|
||||||
info= "预警/告警单类型:"+ "监测点超标"+leafletType+" "+
|
info = "预警/告警单类型:" + "监测点超标" + leafletType + " " +
|
||||||
"预警/告警单生成时间:"+ LocalDateTimeUtil.format(LocalDate.now(), DatePattern.CHINESE_DATE_PATTERN)+"\n"+
|
"预警/告警单生成时间:" + LocalDateTimeUtil.format(LocalDate.now(), DatePattern.CHINESE_DATE_PATTERN) + "\n" +
|
||||||
"超标电站名称:" +rMpPartHarmonicDetailDTO.getSustationName()+" "+"超标母线名称:" +rMpPartHarmonicDetailDTO.getBarName()+" "+"超标监测点名称:" +rMpPartHarmonicDetailDTO.getMeasurementPointName()+"\n"+
|
"超标电站名称:" + rMpPartHarmonicDetailDTO.getSustationName() + " " + "超标母线名称:" + rMpPartHarmonicDetailDTO.getBarName() + " " + "超标监测点名称:" + rMpPartHarmonicDetailDTO.getMeasurementPointName() + "\n" +
|
||||||
"统计超标指标:" +String.join(",",harmonicTypes)+"\n"+
|
"统计超标指标:" + String.join(",", harmonicTypes) + "\n" +
|
||||||
"当月累计超标天数:" +rMpPartHarmonicDetailDTO.getOverLimitDay()+"天"+" "+ "当月累计连续天数:" +rMpPartHarmonicDetailDTO.getOverLimitContinuous()+"天"+"\n"+
|
"当月累计超标天数:" + rMpPartHarmonicDetailDTO.getOverLimitDay() + "天" + " " + "当月累计连续天数:" + rMpPartHarmonicDetailDTO.getOverLimitContinuous() + "天" + "\n" +
|
||||||
"超标天数详情:"+rMpPartHarmonicDetailDTO.getDateList();
|
"超标天数详情:" + rMpPartHarmonicDetailDTO.getDateList();
|
||||||
log.warn(info);
|
log.warn(info);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public interface SupervisionPlanPOService extends IBpmService<SupervisionPlanPO>
|
|||||||
|
|
||||||
SupervisionPlanVO getDetailPlan(String id);
|
SupervisionPlanVO getDetailPlan(String id);
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
void initiateWarningLeaflet(String id);
|
void initiateWarningLeaflet(String id);
|
||||||
|
|
||||||
String cancelSuperPlan(BpmProcessInstanceCancelParam cancelReqVO);
|
String cancelSuperPlan(BpmProcessInstanceCancelParam cancelReqVO);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -377,33 +378,39 @@ public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Deprecated
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void initiateWarningLeaflet(String id) {
|
public void initiateWarningLeaflet(String id) {
|
||||||
//获取数据源用于组装数据
|
// //获取数据源用于组装数据
|
||||||
List<SupervisionProblemPO> list = supervisionProblemPOService.lambdaQuery().eq(SupervisionProblemPO::getPlanId, id).list();
|
// List<SupervisionProblemPO> list = supervisionProblemPOService.lambdaQuery().eq(SupervisionProblemPO::getPlanId, id).list();
|
||||||
|
//
|
||||||
SupervisionPlanPO byId = this.getById(id);
|
// SupervisionPlanPO byId = this.getById(id);
|
||||||
if(byId.getStatus()!=2){
|
// if(byId.getStatus()!=2){
|
||||||
throw new BusinessException("该计划未审核通过无法发送预告警单");
|
// throw new BusinessException("该计划未审核通过无法发送预告警单");
|
||||||
}
|
// }
|
||||||
/*
|
// /*
|
||||||
* 1、预告警单名称,此处暂时用计算监督计划名称
|
// * 1、预告警单名称,此处暂时用计算监督计划名称
|
||||||
* 2、预告警编号暂时随机by yxb
|
// * 2、预告警编号暂时随机by yxb
|
||||||
* 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
// * 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
||||||
* 4、对应问题源id,用于查询详细数据
|
// * 4、对应问题源id,用于查询详细数据
|
||||||
* 5、单子类型:1:预警单;2:告警单
|
// * 5、单子类型:1:预警单;2:告警单
|
||||||
* 6、问题详细描述
|
// * 6、问题详细描述
|
||||||
* */
|
// * */
|
||||||
warningLeafletService.createLeaflet(
|
// warningLeafletService.createLeaflet(
|
||||||
byId.getWorkPlanName(),
|
// byId.getWorkPlanName(),
|
||||||
IdWorker.get32UUID(),
|
// IdWorker.get32UUID(),
|
||||||
id,
|
// id,
|
||||||
ProblemTypeEnum.PLAN.getCode(),
|
// ProblemTypeEnum.PLAN.getCode(),
|
||||||
LeafletTypeEnum.ALARM.getCode(),
|
// LeafletTypeEnum.ALARM.getCode(),
|
||||||
assembleIssueDetail(list,byId)
|
// assembleIssueDetail(list,byId)
|
||||||
);
|
// );
|
||||||
//将当前的问题记录是否告警修改为已告警
|
// //将当前的问题记录是否告警修改为已告警
|
||||||
this.lambdaUpdate().eq(SupervisionPlanPO::getPlanId,id).set(SupervisionPlanPO::getIsUploadHead,1).update();
|
// this.lambdaUpdate().eq(SupervisionPlanPO::getPlanId,id).set(SupervisionPlanPO::getIsUploadHead,1).update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void initiateWarningLeaflet(String id) {
|
public void initiateWarningLeaflet(String id) {
|
||||||
SupervisionUserComplaintPO byId = this.getById(id);
|
SupervisionUserComplaintPO supervisionUserComplaintPO = this.getById(id);
|
||||||
//组装告警单
|
//组装告警单
|
||||||
String complainteDetail = assembleComplainteDetail(byId);
|
String complainteDetail = assembleComplainteDetail(supervisionUserComplaintPO);
|
||||||
/*
|
/*
|
||||||
* 1、预告警单名称,此处暂时用用户名+投诉
|
* 1、预告警单名称,此处暂时用用户名+投诉
|
||||||
* 2、预告警编号暂时随机by yxb
|
* 2、预告警编号暂时随机by yxb
|
||||||
@@ -87,12 +87,13 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
* 6、问题详细描述
|
* 6、问题详细描述
|
||||||
* */
|
* */
|
||||||
warningLeafletService.createLeaflet(
|
warningLeafletService.createLeaflet(
|
||||||
byId.getUserName().concat("投诉"),
|
supervisionUserComplaintPO.getUserName().concat("投诉"),
|
||||||
|
supervisionUserComplaintPO.getDutyOrgId(),
|
||||||
IdWorker.get32UUID(),
|
IdWorker.get32UUID(),
|
||||||
id,
|
id,
|
||||||
ProblemTypeEnum.USER.getCode(),
|
ProblemTypeEnum.USER.getCode(),
|
||||||
LeafletTypeEnum.ALARM.getCode(),
|
LeafletTypeEnum.ALARM.getCode(),
|
||||||
byId.getComplaintText()
|
supervisionUserComplaintPO.getComplaintText()
|
||||||
);
|
);
|
||||||
this.lambdaUpdate().eq(SupervisionUserComplaintPO::getId,id).set(SupervisionUserComplaintPO::getInitiateWarningFlag,1).update();
|
this.lambdaUpdate().eq(SupervisionUserComplaintPO::getId,id).set(SupervisionUserComplaintPO::getInitiateWarningFlag,1).update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -63,6 +64,7 @@ import java.util.stream.Collectors;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Deprecated
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<SupervisionGeneralSurveyPlanPOMapper, SupervisionGeneralSurveyPlanPO> implements SupervisionGeneralSurveyPlanPOService {
|
public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<SupervisionGeneralSurveyPlanPOMapper, SupervisionGeneralSurveyPlanPO> implements SupervisionGeneralSurveyPlanPOService {
|
||||||
/**
|
/**
|
||||||
@@ -320,6 +322,11 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
|
|||||||
this.lambdaUpdate().set(SupervisionGeneralSurveyPlanPO::getStatus, status).eq(SupervisionGeneralSurveyPlanPO::getPlanNo, businessKey).update();
|
this.lambdaUpdate().set(SupervisionGeneralSurveyPlanPO::getStatus, status).eq(SupervisionGeneralSurveyPlanPO::getPlanNo, businessKey).update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String cancelGeneralSurvey(BpmProcessInstanceCancelParam cancelReqVO) {
|
public String cancelGeneralSurvey(BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
//准备取消该流程,需要远程调用接口
|
//准备取消该流程,需要远程调用接口
|
||||||
@@ -334,34 +341,34 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initiateWarningLeaflet(String id, String subId) {
|
public void initiateWarningLeaflet(String id, String subId) {
|
||||||
//获取数据源用于组装数据
|
// //获取数据源用于组装数据
|
||||||
LambdaQueryWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
detailPOLambdaQueryWrapper.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
|
// detailPOLambdaQueryWrapper.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
|
||||||
.eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
|
// .eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
|
||||||
SupervisionGeneralSurveyPlanDetailPO detailPlan = supervisionGeneralSurveyPlanDetailPOService.getOne(detailPOLambdaQueryWrapper);
|
// SupervisionGeneralSurveyPlanDetailPO detailPlan = supervisionGeneralSurveyPlanDetailPOService.getOne(detailPOLambdaQueryWrapper);
|
||||||
SupervisionGeneralSurveyPlanPO generalSurveyPlan = this.getById(id);
|
// SupervisionGeneralSurveyPlanPO generalSurveyPlan = this.getById(id);
|
||||||
/*
|
// /*
|
||||||
* 1、预告警单名称,此处暂时用普测计划名称+变电站名称组成预告警单名
|
// * 1、预告警单名称,此处暂时用普测计划名称+变电站名称组成预告警单名
|
||||||
* 2、预告警编号暂时随机by yxb
|
// * 2、预告警编号暂时随机by yxb
|
||||||
* 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
// * 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
||||||
* 4、对应问题源id,用于查询详细数据
|
// * 4、对应问题源id,用于查询详细数据
|
||||||
* 5、单子类型:1:预警单;2:告警单
|
// * 5、单子类型:1:预警单;2:告警单
|
||||||
* 6、问题详细描述
|
// * 6、问题详细描述
|
||||||
* */
|
// * */
|
||||||
warningLeafletService.createLeaflet(
|
// warningLeafletService.createLeaflet(
|
||||||
generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
|
// generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
|
||||||
IdWorker.get32UUID(),
|
// IdWorker.get32UUID(),
|
||||||
id,
|
// id,
|
||||||
ProblemTypeEnum.SITE_TEST.getCode(),
|
// ProblemTypeEnum.SITE_TEST.getCode(),
|
||||||
LeafletTypeEnum.ALARM.getCode(),
|
// LeafletTypeEnum.ALARM.getCode(),
|
||||||
assembleIssueDetail(detailPlan,generalSurveyPlan)
|
// assembleIssueDetail(detailPlan,generalSurveyPlan)
|
||||||
);
|
// );
|
||||||
//将当前的问题记录是否告警修改为已告警
|
// //将当前的问题记录是否告警修改为已告警
|
||||||
LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
// LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||||
detailPOLambdaUpdateWrapper.set(SupervisionGeneralSurveyPlanDetailPO::getInitiateWarningFlag, 1)
|
// detailPOLambdaUpdateWrapper.set(SupervisionGeneralSurveyPlanDetailPO::getInitiateWarningFlag, 1)
|
||||||
.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
|
// .eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
|
||||||
.eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
|
// .eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
|
||||||
supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper);
|
// supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -23,11 +24,14 @@ import com.njcn.supervision.mapper.survey.SurveyPlanMapper;
|
|||||||
import com.njcn.supervision.pojo.param.survey.SurveyPlanParam;
|
import com.njcn.supervision.pojo.param.survey.SurveyPlanParam;
|
||||||
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
import com.njcn.supervision.pojo.po.survey.SurveyPlan;
|
||||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||||
|
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
|
||||||
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||||
import com.njcn.supervision.pojo.vo.survey.SurveySubstation;
|
import com.njcn.supervision.pojo.vo.survey.SurveySubstation;
|
||||||
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
||||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||||
import com.njcn.supervision.utils.InstanceUtil;
|
import com.njcn.supervision.utils.InstanceUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
@@ -52,19 +56,22 @@ import java.util.*;
|
|||||||
public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyPlan> implements ISurveyPlanService {
|
public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyPlan> implements ISurveyPlanService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserFeignClient userFeignClient;
|
private UserFeignClient userFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BpmProcessFeignClient bpmProcessFeignClient;
|
private BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private DeptFeignClient deptFeignClient;
|
private DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private LineFeignClient lineFeignClient;
|
private LineFeignClient lineFeignClient;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ISurveyTestService surveyTestService;
|
private ISurveyTestService surveyTestService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -194,9 +201,9 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
|||||||
SurveyPlan surveyPlan = this.baseMapper.selectById(businessKey);
|
SurveyPlan surveyPlan = this.baseMapper.selectById(businessKey);
|
||||||
surveyPlan.setStatus(status);
|
surveyPlan.setStatus(status);
|
||||||
this.updateById(surveyPlan);
|
this.updateById(surveyPlan);
|
||||||
if(Objects.equals(status, FlowStatusEnum.APPROVE.getCode())){
|
if (Objects.equals(status, FlowStatusEnum.APPROVE.getCode())) {
|
||||||
//计划审核成功后,需要将计划拆成一个个待测试的
|
//计划审核成功后,需要将计划拆成一个个待测试的
|
||||||
if(surveyPlan.getCustomSubstationFlag() == 0){
|
if (surveyPlan.getCustomSubstationFlag() == 0) {
|
||||||
String substation = surveyPlan.getSubstation();
|
String substation = surveyPlan.getSubstation();
|
||||||
String[] subIds = substation.split(StrPool.COMMA);
|
String[] subIds = substation.split(StrPool.COMMA);
|
||||||
for (String subId : subIds) {
|
for (String subId : subIds) {
|
||||||
@@ -210,7 +217,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
|||||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||||
surveyTestService.save(surveyTest);
|
surveyTestService.save(surveyTest);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
SurveyTest surveyTest = new SurveyTest();
|
SurveyTest surveyTest = new SurveyTest();
|
||||||
surveyTest.setPlanId(surveyPlan.getId());
|
surveyTest.setPlanId(surveyPlan.getId());
|
||||||
surveyTest.setDeptId(surveyPlan.getDeptId());
|
surveyTest.setDeptId(surveyPlan.getDeptId());
|
||||||
@@ -224,6 +231,26 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SurveyPlanVO surveyPlanVO = this.getVOById(businessId);
|
||||||
|
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(surveyPlanVO.getHistoryInstanceId());
|
||||||
|
DictData data = dicDataFeignClient.getDicDataById(surveyPlanVO.getSupvType()).getData();
|
||||||
|
String name = "未知监督类型";
|
||||||
|
if(Objects.nonNull(data)){
|
||||||
|
name = data.getName();
|
||||||
|
}
|
||||||
|
String sign = "监督类型为:".concat(name)
|
||||||
|
.concat(",由")
|
||||||
|
.concat(surveyPlanVO.getDeptName())
|
||||||
|
.concat("负责的:")
|
||||||
|
.concat(surveyPlanVO.getPlanName());
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SurveyPlanVO getVOById(String id) {
|
public SurveyPlanVO getVOById(String id) {
|
||||||
SurveyPlan surveyPlan = this.baseMapper.selectById(id);
|
SurveyPlan surveyPlan = this.baseMapper.selectById(id);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -35,6 +36,8 @@ import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
|||||||
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
import com.njcn.supervision.service.survey.ISurveyPlanService;
|
||||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||||
import com.njcn.supervision.utils.InstanceUtil;
|
import com.njcn.supervision.utils.InstanceUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
@@ -79,6 +82,9 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
|||||||
@Resource
|
@Resource
|
||||||
private IWarningLeafletService warningLeafletService;
|
private IWarningLeafletService warningLeafletService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<SurveyTestVO> surveyTestPage(SurveyTestParam.SurveyTestQueryParam surveyTestQueryParam) {
|
public Page<SurveyTestVO> surveyTestPage(SurveyTestParam.SurveyTestQueryParam surveyTestQueryParam) {
|
||||||
@@ -259,6 +265,31 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
|||||||
this.updateById(surveyTest);
|
this.updateById(surveyTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
SurveyTestVO surveyTestVO = this.getVOById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(surveyTestVO.getHistoryInstanceId());
|
||||||
|
DictData data = dicDataFeignClient.getDicDataById(surveyTestVO.getSupvType()).getData();
|
||||||
|
String name = "未知监督类型";
|
||||||
|
if(Objects.nonNull(data)){
|
||||||
|
name = data.getName();
|
||||||
|
}
|
||||||
|
String sign = "监督类型为:".concat(name)
|
||||||
|
.concat("由")
|
||||||
|
.concat(surveyTestVO.getDeptName())
|
||||||
|
.concat("负责的:")
|
||||||
|
.concat(surveyTestVO.getPlanName())
|
||||||
|
.concat(",由")
|
||||||
|
.concat(surveyTestVO.getCompleteBy())
|
||||||
|
.concat(",在")
|
||||||
|
.concat(LocalDateTimeUtil.format(surveyTestVO.getCompleteTime(),DatePattern.CHINESE_DATE_PATTERN))
|
||||||
|
.concat("完成计划测试。")
|
||||||
|
;
|
||||||
|
bpmInstanceInfo.setInstanceSign(sign);
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SurveyTestVO getVOById(String id) {
|
public SurveyTestVO getVOById(String id) {
|
||||||
SurveyTest surveyTest = this.baseMapper.selectById(id);
|
SurveyTest surveyTest = this.baseMapper.selectById(id);
|
||||||
@@ -301,6 +332,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
|||||||
* */
|
* */
|
||||||
warningLeafletService.createLeaflet(
|
warningLeafletService.createLeaflet(
|
||||||
surveyTestVO.getPlanName().concat(StrPool.UNDERLINE).concat(surveyTestVO.getSubstationName()),
|
surveyTestVO.getPlanName().concat(StrPool.UNDERLINE).concat(surveyTestVO.getSubstationName()),
|
||||||
|
surveyTestVO.getDeptId(),
|
||||||
IdWorker.get32UUID(),
|
IdWorker.get32UUID(),
|
||||||
id,
|
id,
|
||||||
ProblemTypeEnum.SITE_TEST.getCode(),
|
ProblemTypeEnum.SITE_TEST.getCode(),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -21,6 +22,7 @@ import com.njcn.supervision.pojo.param.user.UserReportParam;
|
|||||||
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
import com.njcn.supervision.pojo.po.device.SupervisionDevMainReportPO;
|
||||||
import com.njcn.supervision.pojo.po.user.UserReportNormalPO;
|
import com.njcn.supervision.pojo.po.user.UserReportNormalPO;
|
||||||
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
import com.njcn.supervision.pojo.po.user.UserReportPO;
|
||||||
|
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||||
import com.njcn.supervision.service.user.IUserReportNormalService;
|
import com.njcn.supervision.service.user.IUserReportNormalService;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
@@ -176,6 +178,15 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
|||||||
this.update(new UpdateWrapper<UserReportNormalPO>().lambda().set(UserReportNormalPO::getStatus,status).eq(UserReportNormalPO::getId,businessKey));
|
this.update(new UpdateWrapper<UserReportNormalPO>().lambda().set(UserReportNormalPO::getStatus,status).eq(UserReportNormalPO::getId,businessKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
UserReportVO.UserReportGoNetVO userReportGoNet = this.userReportGoNetById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(userReportGoNet.getHistoryInstanceId());
|
||||||
|
bpmInstanceInfo.setInstanceSign(userReportGoNet.getProjectName());
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String cancelUserReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
public String cancelUserReport(BpmProcessInstanceCancelParam cancelReqVO) {
|
||||||
//准备取消该流程,需要远程调用接口
|
//准备取消该流程,需要远程调用接口
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||||
|
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
@@ -36,6 +37,7 @@ import com.njcn.supervision.pojo.po.user.UserReportPO;
|
|||||||
import com.njcn.supervision.pojo.po.user.UserReportProjectPO;
|
import com.njcn.supervision.pojo.po.user.UserReportProjectPO;
|
||||||
import com.njcn.supervision.pojo.po.user.UserReportSensitivePO;
|
import com.njcn.supervision.pojo.po.user.UserReportSensitivePO;
|
||||||
import com.njcn.supervision.pojo.po.user.UserReportSubstationPO;
|
import com.njcn.supervision.pojo.po.user.UserReportSubstationPO;
|
||||||
|
import com.njcn.supervision.pojo.vo.survey.SurveyPlanVO;
|
||||||
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
import com.njcn.supervision.pojo.vo.user.UserReportVO;
|
||||||
import com.njcn.supervision.service.user.UserReportPOService;
|
import com.njcn.supervision.service.user.UserReportPOService;
|
||||||
import com.njcn.supervision.service.user.UserReportProjectPOService;
|
import com.njcn.supervision.service.user.UserReportProjectPOService;
|
||||||
@@ -331,6 +333,15 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
|||||||
this.updateById(userReportPO);
|
this.updateById(userReportPO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||||
|
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||||
|
UserReportPO userReportPO = this.getById(businessId);
|
||||||
|
bpmInstanceInfo.setHistoryInstanceId(userReportPO.getHistoryInstanceId());
|
||||||
|
bpmInstanceInfo.setInstanceSign(userReportPO.getProjectName());
|
||||||
|
return bpmInstanceInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserReportVO> getUserReportList() {
|
public List<UserReportVO> getUserReportList() {
|
||||||
String deptIndex = RequestUtil.getDeptIndex();
|
String deptIndex = RequestUtil.getDeptIndex();
|
||||||
|
|||||||
Reference in New Issue
Block a user