流转工作流程

This commit is contained in:
2024-05-12 16:15:34 +08:00
parent 1a9beeed93
commit eb9818dd7f
71 changed files with 3810 additions and 302 deletions

View File

@@ -25,4 +25,6 @@ public interface UserReportPOService extends IService<UserReportPO> {
Page<UserReportVO> getUserReport(UserReportParam.UserReportQueryParam userReportQueryParam);
Boolean removeUserReport(List<String> ids);
UserReportVO getVOById(String id);
}

View File

@@ -1,5 +1,6 @@
package com.njcn.supervision.service.user.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -23,6 +24,9 @@ import com.njcn.supervision.service.user.UserReportPOService;
import com.njcn.supervision.service.user.UserReportProjectPOService;
import com.njcn.supervision.service.user.UserReportSensitivePOService;
import com.njcn.supervision.service.user.UserReportSubstationPOService;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.user.api.UserFeignClient;
import com.njcn.user.pojo.vo.UserVO;
import com.njcn.web.factory.PageFactory;
import com.njcn.web.utils.RequestUtil;
import lombok.RequiredArgsConstructor;
@@ -55,6 +59,8 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
private final UserReportSubstationPOService userReportSubstationPOService;
private final UserReportSensitivePOService userReportSensitivePOService;
private final BpmProcessFeignClient bpmProcessFeignClient;
private final UserFeignClient userFeignClient;
private final DeptFeignClient deptFeignClient;
@@ -107,7 +113,6 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
// 将工作流的编号,更新到流程单中
userReportPO.setProcessInstanceId(processInstanceId);
this.baseMapper.updateById(userReportPO);
return userReportPO.getId();
}
@@ -167,6 +172,25 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
return true;
}
@Override
public UserReportVO getVOById(String id) {
UserReportVO userReportVO = new UserReportVO();
UserReportPO userReportPO = this.baseMapper.selectById(id);
//复制基础信息
BeanUtil.copyProperties(userReportPO,userReportVO);
//处理特殊字段,用户名、部门名
UserVO userVO = userFeignClient.getUserById(userReportPO.getReporter()).getData();
userReportVO.setReporter(userVO.getName());
userReportVO.setOrgName(deptFeignClient.getDeptById(userReportPO.getOrgId()).getData().getName());
/*
根据用户性质获取自己特有的字段,此处需要特殊处理
1、每个附件需要返回文件名称以及可以预览的url
todo...by黄正剑
*/
userReportVO.setUserReportProjectPO(new UserReportProjectPO());
return userReportVO;
}
/**
* 获取所有字段为null的属性名