核心信息提取

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

View File

@@ -56,6 +56,17 @@ public class BpmTaskVO {
*/
private ProcessInstance processInstance;
/**
* 历史流程实例编号
*/
private String historyInstanceId;
/**
* 业务流程重要信息
*/
private String instanceSign;
@ApiModelProperty("父任务编号")
private String parentTaskId;
@@ -102,5 +113,4 @@ public class BpmTaskVO {
private BpmProcessInstanceVO.User startUser;
}
}

View File

@@ -19,10 +19,9 @@ public interface IBpmService<T> extends IService<T> {
*/
void updateProcessStatus(String businessId, Integer status);
// /**
// * 根据业务id获取历史审批id以及该任务的重要信息
// * @param processKey 业务流程key
// * @param businessId 业务流程id
// */
// BpmInstanceInfo getInstanceInfo(String processKey,String businessId);
/**
* 根据业务id获取历史审批id以及该任务的重要信息
* @param businessId 业务流程id
*/
BpmInstanceInfo getInstanceInfo(String businessId);
}

View File

@@ -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.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.supervision.api.BusinessCommonFeignClient;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.api.UserFeignClient;
import com.njcn.user.pojo.po.Dept;
@@ -60,6 +61,8 @@ public class BpmProcessInstanceController extends BaseController {
@Resource
private IBpmProcessInstanceService processInstanceService;
@Resource
private BusinessCommonFeignClient businessCommonFeignClient;
@Resource
private IBpmTaskService taskService;
@Resource
private IBpmProcessDefinitionService processDefinitionService;

View File

@@ -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.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.supervision.api.BusinessCommonFeignClient;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.api.UserFeignClient;
import com.njcn.user.pojo.po.Dept;
@@ -58,6 +59,9 @@ public class BpmTaskController extends BaseController {
@Resource
private IBpmTaskService taskService;
@Resource
private BusinessCommonFeignClient businessCommonFeignClient;
@Resource
private IBpmProcessInstanceService processInstanceService;
@@ -86,7 +90,7 @@ public class BpmTaskController extends BaseController {
convertSet(pageResult.getList(), Task::getProcessInstanceId));
List<UserVO> userList = userFeignClient.getUserVOByIdList(convertList(processInstanceMap.values(), ProcessInstance::getStartUserId)).getData();
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.setRecords(bpmTaskVOPageResult.getList());

View File

@@ -2,10 +2,18 @@ package com.njcn.bpm.utils;
import cn.hutool.core.map.MapUtil;
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.po.BpmForm;
import com.njcn.bpm.pojo.vo.instance.BpmProcessInstanceVO;
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.vo.UserVO;
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.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.springframework.validation.beanvalidation.SpringValidatorAdapter;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import static com.njcn.bpm.utils.CollectionUtils.*;
import static com.njcn.bpm.utils.MapUtils.findAndThen;
@@ -34,9 +45,12 @@ public interface BpmTaskConvert {
BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
default PageResult<BpmTaskVO> buildTodoTaskPage(PageResult<Task> pageResult,
Map<String, ProcessInstance> processInstanceMap,
Map<String, UserVO> userMap) {
Map<String, UserVO> userMap,
BusinessCommonFeignClient businessCommonFeignClient) {
return BeanUtils.toBean(pageResult, BpmTaskVO.class, taskVO -> {
ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
@@ -46,11 +60,21 @@ public interface BpmTaskConvert {
taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskVO.ProcessInstance.class));
UserVO startUserVO = userMap.get(processInstance.getStartUserId());
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,
Map<String, HistoricProcessInstance> processInstanceMap,
Map<String, UserVO> userMap,

View File

@@ -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();
}
}

View File

@@ -38,6 +38,12 @@
<artifactId>common-poi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>bpm-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -1,11 +1,16 @@
package com.njcn.supervision.api;
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.supervision.api.fallback.BusinessCommonFeignClientFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;
/**
@@ -25,4 +30,12 @@ public interface BusinessCommonFeignClient {
@GetMapping("/updateProcessStatus")
HttpResult<Object> updateProcessStatus(@RequestParam("processKey") String processKey,@RequestParam("businessId") String businessId, @RequestParam("status")Integer status);
/**
* 根据流程key,业务id去实时更新流程状态
* @param processKey 流程定义key
* @param businessId 业务id
*/
@GetMapping("/getInstanceInfo")
HttpResult<BpmInstanceInfo> getInstanceInfo(@RequestParam("processKey") String processKey, @RequestParam("businessId")String businessId);
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,7 @@
package com.njcn.supervision.controller;
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.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
@@ -40,6 +41,17 @@ public class BusinessCommonController extends BaseController {
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获取实现类对象
* @param processKey 业务流key

View File

@@ -95,6 +95,8 @@ public class SupervisionPlanController extends BaseController {
supervisionPlanPOService.updateProcessStatus(businessKey,status);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@Deprecated
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@GetMapping("/initiateWarningLeaflet")
@ApiOperation("针对技术监督问题发起告警单")

View File

@@ -13,6 +13,7 @@
supervision_temp_line_report.line_name lineName,
supervision_temp_line_debug.reason reason,
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`,
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`,
supervision_temp_line_run_test.test_run_time,

View File

@@ -1,6 +1,7 @@
package com.njcn.supervision.service.device.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
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.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.db.constant.DbConstant;
@@ -79,7 +81,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
return checkDevice;
})
.collect(Collectors.toList());
this.saveOrUpdateBatchByMultiId(checkDevices,100);
this.saveOrUpdateBatchByMultiId(checkDevices, 100);
}
@Override
@@ -95,7 +97,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
.distinct()
.collect(Collectors.toList());
if (CollUtil.isNotEmpty(devList)) {
queryWrapper.in("A.device_id",devList);
queryWrapper.in("A.device_id", devList);
}
if (ObjectUtil.isNotNull(param)) {
//查询参数不为空,进行条件填充
@@ -147,7 +149,7 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
public void reloadReport(CheckDeviceParam param) {
CheckDevice checkDevice = this.baseMapper.selectById(param.getId());
//判断是否有权限操作
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),checkDevice.getCreateBy());
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), checkDevice.getCreateBy());
//处理历史流程id列表
String historyInstanceIds = InstanceUtil.dealHistoryId(checkDevice.getProcessInstanceId(), checkDevice.getHistoryInstanceId());
checkDevice.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
@@ -186,4 +188,18 @@ public class CheckDeviceServiceImpl extends MppServiceImpl<CheckDeviceMapper, Ch
checkDevice.setStatus(status);
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;
}
}

View File

@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
import cn.hutool.core.collection.CollectionUtil;
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.QueryWrapper;
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.BpmResponseEnum;
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.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.exception.BusinessException;
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.vo.DeviceVO;
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.pojo.param.device.QuitRunningDeviceParam;
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.service.device.IQuitRunningDeviceService;
import com.njcn.supervision.service.user.UserReportPOService;
@@ -68,7 +72,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
QuitRunningDevice quitRunningDevice = new QuitRunningDevice();
BeanUtils.copyProperties(quitRunningDeviceParam, quitRunningDevice);
//监测点只有退运,终端由前端选择了指定状态
if(quitRunningDevice.getDeviceType() == 2){
if (quitRunningDevice.getDeviceType() == 2) {
quitRunningDevice.setDevStatus(4);
}
quitRunningDevice.setState(DataStateEnum.ENABLE.getCode());
@@ -95,7 +99,7 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
//判断是否有权限操作
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), quitRunningDevice.getCreateBy());
//监测点只有退运,终端由前端选择了指定状态
if(quitRunningDevice.getDeviceType() == 2){
if (quitRunningDevice.getDeviceType() == 2) {
quitRunningDevice.setDevStatus(4);
}
quitRunningDeviceUpdateParam.setProcessInstanceId(quitRunningDevice.getProcessInstanceId());
@@ -198,6 +202,24 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
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
public QuitRunningDeviceVO getVOById(String id) {
QuitRunningDevice quitRunningDevice = this.baseMapper.selectById(id);
@@ -260,4 +282,5 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
throw new BusinessException(BpmResponseEnum.QUIT_RUNNING_REPEAT);
}
}
}

View File

@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.po.device.SupervisionDevMainReportPO;
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.service.device.SupervisionDevMainReportPOService;
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();
}
@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
public String cancelDevMainReport(BpmProcessInstanceCancelParam cancelReqVO) {
//准备取消该流程,需要远程调用接口

View File

@@ -3,6 +3,7 @@ package com.njcn.supervision.service.device.impl;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.SupervisionTempLineDebugPO;
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.SupervisionTempLineDebugVO;
import com.njcn.supervision.service.device.SupervisionDevMainReportPOService;
@@ -85,7 +88,7 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
SupervisionTempLineDebugPO byId = this.getById(supervisionTempLineReportParam.getId());
if(Objects.nonNull(byId)){
if(byId.getState() == 1) {
throw new BusinessException("该监测点申请联调");
throw new BusinessException("该监测点申请联调");
}
}
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();
}
@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: 临时表台账数据同步到实际表中
* @Param:

View File

@@ -2,6 +2,7 @@ package com.njcn.supervision.service.device.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.pojo.param.device.SupervisionTempLineReportParam;
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.service.device.SupervisionTempLineReportService;
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
public String cancelTempLineReport(BpmProcessInstanceCancelParam cancelReqVO) {
//准备取消该流程,需要远程调用接口

View File

@@ -4,11 +4,13 @@ package com.njcn.supervision.service.device.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.text.StrPool;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.po.device.SupervisionTempLineReport;
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.service.device.ISupervisionTempLineRunTestService;
import com.njcn.supervision.service.user.UserReportPOService;
@@ -217,6 +220,22 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
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
public SupervisionTempLineRunTestVO getRunTestById(String id) {
return this.baseMapper.getRunTestInfo(id);

View File

@@ -21,13 +21,14 @@ public interface IWarningLeafletService extends IBpmService<WarningLeaflet> {
/**
* 创建预告警单,此时还没有走流程,等待用户上传反馈单后,才正式进入工作流阶段
* name预告警单名称此处暂时用普测计划名称+变电站名称组成预告警单名
* deptId预告警单名称负责单位id
* code预告警编号暂时随机by yxb
* id对应问题源id用于查询详细数据
* problemType问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* problemType问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标参考枚举ProblemTypeEnum
* leaflet单子类型1预警单2告警单
* 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);

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.survey.SupervisionGeneralSurveyPlanPO;
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.service.leaflet.IWarningLeafletService;
import com.njcn.supervision.service.survey.ISurveyTestService;
@@ -81,18 +84,14 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
@Resource
private SupervisionGeneralSurveyPlanPOService supervisionGeneralSurveyPlanPOService;
/**
* 预告警单的反馈单对应的流程定义 KEY
*/
// public static final String PROCESS_KEY = "warn_leaflet";
/**
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
*/
@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.setLeafletName(name);
warningLeaflet.setDeptId(deptId);
warningLeaflet.setLeafletNo(code);
warningLeaflet.setProblemType(problemType);
warningLeaflet.setProblemId(id);
@@ -115,7 +114,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
//获取当前用户部门所有同事的id查看该部门下所有的数据
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
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())
.orderByDesc("supervision_warning_leaflet.Update_Time");
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) {
if(CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())){
if (CollUtil.isNotEmpty(warningLeafletVOPage.getRecords())) {
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();
Map<String, String> deptMap = data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName));
warningLeafletVOPage.getRecords().stream().peek(x -> {
if(deptMap.containsKey(x.getDutyOrgId())){
if (deptMap.containsKey(x.getDutyOrgId())) {
x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
}
});
@@ -163,13 +162,13 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
public String updateFeedback(WarningLeafletParam.WarningLeafletUpdateParam warningLeafletUpdateParam) {
WarningLeaflet warningLeaflet = this.baseMapper.selectById(warningLeafletUpdateParam.getId());
//判断是否有权限操作
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),warningLeaflet.getCreateBy());
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), warningLeaflet.getCreateBy());
//处理历史流程id列表
String historyInstanceIds = InstanceUtil.dealHistoryId(warningLeaflet.getProcessInstanceId(), warningLeaflet.getHistoryInstanceId());
BeanUtils.copyProperties(warningLeafletUpdateParam,warningLeaflet);
BeanUtils.copyProperties(warningLeafletUpdateParam, warningLeaflet);
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
@@ -192,16 +191,22 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
@Override
public WarningLeafletVO getVOById(String id) {
WarningLeaflet warningLeaflet = this.getById(id);
WarningLeafletVO vo = new WarningLeafletVO();
BeanUtil.copyProperties(warningLeaflet,vo);
if(warningLeaflet.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode())){
WarningLeafletVO warningLeafletVO = new WarningLeafletVO();
BeanUtil.copyProperties(warningLeaflet, warningLeafletVO);
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();
//查询谐波普测,获取该普测计划上传的文件
//查询到现场测试超标附件地址
SurveyTest surveyTest = surveyTestService.getById(problemId);
vo.setProblemPath(surveyTest.getTestReport());
warningLeafletVO.setProblemPath(surveyTest.getTestReport());
}
return vo;
return warningLeafletVO;
}
@Override
@@ -209,6 +214,25 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
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
public Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam) {
QueryWrapper<WarningLeafletVO> warningLeafletVOQueryWrapper = new QueryWrapper<>();
@@ -221,27 +245,27 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
//获取当前用户部门所有同事的id查看该部门下所有的数据
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
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(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");
Page<WarningLeafletVO> warningLeafletVOPage = this.baseMapper.alarmPageData(new Page<>(PageFactory.getPageNum(warningLeafletQueryParam), PageFactory.getPageSize(warningLeafletQueryParam)), warningLeafletVOQueryWrapper);
//目前仅知道现场测试超标会有附件
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());
Map<String, String> deptMap = new HashMap<>();
if(CollUtil.isNotEmpty(deptIds)){
if (CollUtil.isNotEmpty(deptIds)) {
List<Dept> data = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
deptMap.putAll(data.stream().collect(Collectors.toMap(Dept::getId, Dept::getName)));
}
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());
record.setProblemPath(surveyTest.getTestReport());
}
if(deptMap.containsKey(record.getDutyOrgId())){
if (deptMap.containsKey(record.getDutyOrgId())) {
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
}
}
@@ -251,21 +275,21 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
@Override
public String addLineOverLimitData(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
//组装预警告警信息
String info = assembleOverLimitInfo(rMpPartHarmonicDetailDTO);
//检查是否存在该预警单
List<WarningLeaflet> list = this.lambdaQuery().eq(WarningLeaflet::getIssueDetail, info).list();
if(CollectionUtil.isNotEmpty(list)){
throw new BusinessException("该预/告警单发布");
}
this.createLeaflet(
rMpPartHarmonicDetailDTO.getMeasurementPointName(),
IdWorker.get32UUID(),
rMpPartHarmonicDetailDTO.getMeasurementPointId(),
ProblemTypeEnum.ONLINE.getCode(),
Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? LeafletTypeEnum.ALARM.getCode(): LeafletTypeEnum.WARNING.getCode(),
assembleOverLimitInfo(rMpPartHarmonicDetailDTO)
);
// //组装预警告警信息
// String info = assembleOverLimitInfo(rMpPartHarmonicDetailDTO);
// //检查是否存在该预警单
// List<WarningLeaflet> list = this.lambdaQuery().eq(WarningLeaflet::getIssueDetail, info).list();
// if(CollectionUtil.isNotEmpty(list)){
// throw new BusinessException("该预/告警单发布");
// }
// this.createLeaflet(
// rMpPartHarmonicDetailDTO.getMeasurementPointName(),
// IdWorker.get32UUID(),
// rMpPartHarmonicDetailDTO.getMeasurementPointId(),
// ProblemTypeEnum.ONLINE.getCode(),
// Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? LeafletTypeEnum.ALARM.getCode(): LeafletTypeEnum.WARNING.getCode(),
// assembleOverLimitInfo(rMpPartHarmonicDetailDTO)
// );
return null;
}
@@ -276,7 +300,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
//准备取消该流程,需要远程调用接口
WarningLeaflet warningLeaflet = this.baseMapper.selectById(cancelReqVO.getId());
//判断是否有权限操作
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(),warningLeaflet.getCreateBy());
InstanceUtil.judgeUserPower(RequestUtil.getUserIndex(), warningLeaflet.getCreateBy());
//取消流程
bpmProcessFeignClient.cancelProcessInstanceByStartUser(cancelReqVO);
//更新状态
@@ -287,18 +311,18 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
private String assembleOverLimitInfo(RMpPartHarmonicDetailDTO rMpPartHarmonicDetailDTO) {
String info ="";
String leafletType = Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(),1) ? "告警单" : "预警单";
String info = "";
String leafletType = Objects.equals(rMpPartHarmonicDetailDTO.getAlarmFlag(), 1) ? "告警单" : "预警单";
/*获取稳态统计指标*/
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());
info= "预警/告警单类型:"+ "监测点超标"+leafletType+" "+
"预警/告警单生成时间:"+ LocalDateTimeUtil.format(LocalDate.now(), DatePattern.CHINESE_DATE_PATTERN)+"\n"+
"超标电站名称:" +rMpPartHarmonicDetailDTO.getSustationName()+" "+"超标母线名称:" +rMpPartHarmonicDetailDTO.getBarName()+" "+"超标监测点名称:" +rMpPartHarmonicDetailDTO.getMeasurementPointName()+"\n"+
"统计超标指标:" +String.join(",",harmonicTypes)+"\n"+
"当月累计超标天数:" +rMpPartHarmonicDetailDTO.getOverLimitDay()+""+" "+ "当月累计连续天数:" +rMpPartHarmonicDetailDTO.getOverLimitContinuous()+""+"\n"+
"超标天数详情:"+rMpPartHarmonicDetailDTO.getDateList();
info = "预警/告警单类型:" + "监测点超标" + leafletType + " " +
"预警/告警单生成时间:" + LocalDateTimeUtil.format(LocalDate.now(), DatePattern.CHINESE_DATE_PATTERN) + "\n" +
"超标电站名称:" + rMpPartHarmonicDetailDTO.getSustationName() + " " + "超标母线名称:" + rMpPartHarmonicDetailDTO.getBarName() + " " + "超标监测点名称:" + rMpPartHarmonicDetailDTO.getMeasurementPointName() + "\n" +
"统计超标指标:" + String.join(",", harmonicTypes) + "\n" +
"当月累计超标天数:" + rMpPartHarmonicDetailDTO.getOverLimitDay() + "" + " " + "当月累计连续天数:" + rMpPartHarmonicDetailDTO.getOverLimitContinuous() + "" + "\n" +
"超标天数详情:" + rMpPartHarmonicDetailDTO.getDateList();
log.warn(info);
return info;

View File

@@ -27,6 +27,7 @@ public interface SupervisionPlanPOService extends IBpmService<SupervisionPlanPO>
SupervisionPlanVO getDetailPlan(String id);
@Deprecated
void initiateWarningLeaflet(String id);
String cancelSuperPlan(BpmProcessInstanceCancelParam cancelReqVO);

View File

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.common.pojo.enums.common.DataStateEnum;
@@ -377,33 +378,39 @@ public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOM
}
@Override
public BpmInstanceInfo getInstanceInfo(String businessId) {
return null;
}
@Override
@Deprecated
@Transactional(rollbackFor = Exception.class)
public void initiateWarningLeaflet(String id) {
//获取数据源用于组装数据
List<SupervisionProblemPO> list = supervisionProblemPOService.lambdaQuery().eq(SupervisionProblemPO::getPlanId, id).list();
SupervisionPlanPO byId = this.getById(id);
if(byId.getStatus()!=2){
throw new BusinessException("该计划未审核通过无法发送预告警单");
}
/*
* 1、预告警单名称此处暂时用计算监督计划名称
* 2、预告警编号暂时随机by yxb
* 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* 4、对应问题源id用于查询详细数据
* 5、单子类型1预警单2告警单
* 6、问题详细描述
* */
warningLeafletService.createLeaflet(
byId.getWorkPlanName(),
IdWorker.get32UUID(),
id,
ProblemTypeEnum.PLAN.getCode(),
LeafletTypeEnum.ALARM.getCode(),
assembleIssueDetail(list,byId)
);
//将当前的问题记录是否告警修改为已告警
this.lambdaUpdate().eq(SupervisionPlanPO::getPlanId,id).set(SupervisionPlanPO::getIsUploadHead,1).update();
// //获取数据源用于组装数据
// List<SupervisionProblemPO> list = supervisionProblemPOService.lambdaQuery().eq(SupervisionProblemPO::getPlanId, id).list();
//
// SupervisionPlanPO byId = this.getById(id);
// if(byId.getStatus()!=2){
// throw new BusinessException("该计划未审核通过无法发送预告警单");
// }
// /*
// * 1、预告警单名称此处暂时用计算监督计划名称
// * 2、预告警编号暂时随机by yxb
// * 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
// * 4、对应问题源id用于查询详细数据
// * 5、单子类型1预警单2告警单
// * 6、问题详细描述
// * */
// warningLeafletService.createLeaflet(
// byId.getWorkPlanName(),
// IdWorker.get32UUID(),
// id,
// ProblemTypeEnum.PLAN.getCode(),
// LeafletTypeEnum.ALARM.getCode(),
// assembleIssueDetail(list,byId)
// );
// //将当前的问题记录是否告警修改为已告警
// this.lambdaUpdate().eq(SupervisionPlanPO::getPlanId,id).set(SupervisionPlanPO::getIsUploadHead,1).update();
}

View File

@@ -75,9 +75,9 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
@Override
@Transactional(rollbackFor = Exception.class)
public void initiateWarningLeaflet(String id) {
SupervisionUserComplaintPO byId = this.getById(id);
SupervisionUserComplaintPO supervisionUserComplaintPO = this.getById(id);
//组装告警单
String complainteDetail = assembleComplainteDetail(byId);
String complainteDetail = assembleComplainteDetail(supervisionUserComplaintPO);
/*
* 1、预告警单名称此处暂时用用户名+投诉
* 2、预告警编号暂时随机by yxb
@@ -87,12 +87,13 @@ public class SupervisionUserComplaintPOServiceImpl extends ServiceImpl<Supervisi
* 6、问题详细描述
* */
warningLeafletService.createLeaflet(
byId.getUserName().concat("投诉"),
supervisionUserComplaintPO.getUserName().concat("投诉"),
supervisionUserComplaintPO.getDutyOrgId(),
IdWorker.get32UUID(),
id,
ProblemTypeEnum.USER.getCode(),
LeafletTypeEnum.ALARM.getCode(),
byId.getComplaintText()
supervisionUserComplaintPO.getComplaintText()
);
this.lambdaUpdate().eq(SupervisionUserComplaintPO::getId,id).set(SupervisionUserComplaintPO::getInitiateWarningFlag,1).update();
}

View File

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.common.pojo.enums.common.DataStateEnum;
@@ -63,6 +64,7 @@ import java.util.stream.Collectors;
* @version V1.0.0
*/
@Service
@Deprecated
@RequiredArgsConstructor
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();
}
@Override
public BpmInstanceInfo getInstanceInfo(String businessId) {
return null;
}
@Override
public String cancelGeneralSurvey(BpmProcessInstanceCancelParam cancelReqVO) {
//准备取消该流程,需要远程调用接口
@@ -334,34 +341,34 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
@Override
public void initiateWarningLeaflet(String id, String subId) {
//获取数据源用于组装数据
LambdaQueryWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
detailPOLambdaQueryWrapper.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
.eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
SupervisionGeneralSurveyPlanDetailPO detailPlan = supervisionGeneralSurveyPlanDetailPOService.getOne(detailPOLambdaQueryWrapper);
SupervisionGeneralSurveyPlanPO generalSurveyPlan = this.getById(id);
/*
* 1、预告警单名称此处暂时用普测计划名称+变电站名称组成预告警单名
* 2、预告警编号暂时随机by yxb
* 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* 4、对应问题源id用于查询详细数据
* 5、单子类型1预警单2告警单
* 6、问题详细描述
* */
warningLeafletService.createLeaflet(
generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
IdWorker.get32UUID(),
id,
ProblemTypeEnum.SITE_TEST.getCode(),
LeafletTypeEnum.ALARM.getCode(),
assembleIssueDetail(detailPlan,generalSurveyPlan)
);
//将当前的问题记录是否告警修改为已告警
LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
detailPOLambdaUpdateWrapper.set(SupervisionGeneralSurveyPlanDetailPO::getInitiateWarningFlag, 1)
.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
.eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper);
// //获取数据源用于组装数据
// LambdaQueryWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaQueryWrapper = new LambdaQueryWrapper<>();
// detailPOLambdaQueryWrapper.eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
// .eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
// SupervisionGeneralSurveyPlanDetailPO detailPlan = supervisionGeneralSurveyPlanDetailPOService.getOne(detailPOLambdaQueryWrapper);
// SupervisionGeneralSurveyPlanPO generalSurveyPlan = this.getById(id);
// /*
// * 1、预告警单名称此处暂时用普测计划名称+变电站名称组成预告警单名
// * 2、预告警编号暂时随机by yxb
// * 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
// * 4、对应问题源id用于查询详细数据
// * 5、单子类型1预警单2告警单
// * 6、问题详细描述
// * */
// warningLeafletService.createLeaflet(
// generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
// IdWorker.get32UUID(),
// id,
// ProblemTypeEnum.SITE_TEST.getCode(),
// LeafletTypeEnum.ALARM.getCode(),
// assembleIssueDetail(detailPlan,generalSurveyPlan)
// );
// //将当前的问题记录是否告警修改为已告警
// LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
// detailPOLambdaUpdateWrapper.set(SupervisionGeneralSurveyPlanDetailPO::getInitiateWarningFlag, 1)
// .eq(SupervisionGeneralSurveyPlanDetailPO::getPlanNo, id)
// .eq(SupervisionGeneralSurveyPlanDetailPO::getSubId, subId);
// supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper);
}
/**

View File

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.po.survey.SurveyPlan;
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.SurveySubstation;
import com.njcn.supervision.service.survey.ISurveyPlanService;
import com.njcn.supervision.service.survey.ISurveyTestService;
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.UserFeignClient;
import com.njcn.web.factory.PageFactory;
@@ -66,6 +70,9 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
@Resource
private ISurveyTestService surveyTestService;
@Resource
private DicDataFeignClient dicDataFeignClient;
@Override
public Page<SurveyPlanVO> surveyPlanPage(SurveyPlanParam.SurveyPlanQueryParam surveyPlanQueryParam) {
@@ -194,9 +201,9 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
SurveyPlan surveyPlan = this.baseMapper.selectById(businessKey);
surveyPlan.setStatus(status);
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[] subIds = substation.split(StrPool.COMMA);
for (String subId : subIds) {
@@ -210,7 +217,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
surveyTest.setCreateBy(surveyPlan.getCreateBy());
surveyTestService.save(surveyTest);
}
}else{
} else {
SurveyTest surveyTest = new SurveyTest();
surveyTest.setPlanId(surveyPlan.getId());
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
public SurveyPlanVO getVOById(String id) {
SurveyPlan surveyPlan = this.baseMapper.selectById(id);

View File

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.ISurveyTestService;
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.UserFeignClient;
import com.njcn.web.factory.PageFactory;
@@ -79,6 +82,9 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
@Resource
private IWarningLeafletService warningLeafletService;
@Resource
private DicDataFeignClient dicDataFeignClient;
@Override
public Page<SurveyTestVO> surveyTestPage(SurveyTestParam.SurveyTestQueryParam surveyTestQueryParam) {
@@ -259,6 +265,31 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
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
public SurveyTestVO getVOById(String id) {
SurveyTest surveyTest = this.baseMapper.selectById(id);
@@ -301,6 +332,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
* */
warningLeafletService.createLeaflet(
surveyTestVO.getPlanName().concat(StrPool.UNDERLINE).concat(surveyTestVO.getSubstationName()),
surveyTestVO.getDeptId(),
IdWorker.get32UUID(),
id,
ProblemTypeEnum.SITE_TEST.getCode(),

View File

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.user.UserReportNormalPO;
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.service.user.IUserReportNormalService;
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));
}
@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
public String cancelUserReport(BpmProcessInstanceCancelParam cancelReqVO) {
//准备取消该流程,需要远程调用接口

View File

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
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.param.instance.BpmProcessInstanceCancelParam;
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.UserReportSensitivePO;
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.service.user.UserReportPOService;
import com.njcn.supervision.service.user.UserReportProjectPOService;
@@ -331,6 +333,15 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
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
public List<UserReportVO> getUserReportList() {
String deptIndex = RequestUtil.getDeptIndex();