|
@@ -3,6 +3,7 @@ package org.jeecg.modules.activiti.web;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -64,7 +65,8 @@ public class ActivitiProcessController {
|
|
|
String zx = request.getParameter("zx");
|
|
|
String status = request.getParameter("status");
|
|
|
LambdaQueryWrapper<ActZprocess> wrapper = new LambdaQueryWrapper<ActZprocess>();
|
|
|
- wrapper.orderByDesc(ActZprocess::getProcessKey).orderByDesc(ActZprocess::getVersion);
|
|
|
+ wrapper.orderByDesc(ActZprocess::getCreateTime);
|
|
|
+
|
|
|
if (StrUtil.isNotBlank(lcmc)){
|
|
|
wrapper.like(ActZprocess::getName, lcmc);
|
|
|
}
|
|
@@ -206,6 +208,20 @@ public class ActivitiProcessController {
|
|
|
actZprocessService.updateById(actProcess);
|
|
|
return Result.ok("修改成功");
|
|
|
}
|
|
|
+ @RequestMapping(value = "/updateInfo2", method = RequestMethod.POST)
|
|
|
+ public Result<Object> updateInfo2(@RequestBody ActZprocess actProcess){
|
|
|
+
|
|
|
+ ProcessDefinition pd = repositoryService.getProcessDefinition(actProcess.getId());
|
|
|
+ if(pd==null){
|
|
|
+ return Result.error("流程定义不存在");
|
|
|
+ }
|
|
|
+ if(StrUtil.isNotBlank(actProcess.getCategoryId())){
|
|
|
+ repositoryService.setProcessDefinitionCategory(actProcess.getId(), actProcess.getCategoryId());
|
|
|
+ repositoryService.setDeploymentCategory(pd.getDeploymentId(), actProcess.getCategoryId());
|
|
|
+ }
|
|
|
+ actZprocessService.updateById(actProcess);
|
|
|
+ return Result.ok("修改成功");
|
|
|
+ }
|
|
|
|
|
|
@RequestMapping(value = "/getProcessNode")
|
|
|
public Result getProcessNode(String id){
|
|
@@ -240,6 +256,14 @@ public class ActivitiProcessController {
|
|
|
node.setChooseDepHeader(actNodeService.hasChooseDepHeader(element.getId()));
|
|
|
|
|
|
node.setChooseSponsor(actNodeService.hasChooseSponsor(element.getId()));
|
|
|
+
|
|
|
+ List<ActNode> actNodeList= actNodeService.list(new QueryWrapper<ActNode>().eq("node_id",element.getId()));
|
|
|
+ if(actNodeList!=null&&actNodeList.size()>0){
|
|
|
+ node.setTbTableInfoId(actNodeList.get(0).getTbTableInfoId());
|
|
|
+ }else{
|
|
|
+ node.setTbTableInfoId("");
|
|
|
+ }
|
|
|
+
|
|
|
}else if(element instanceof EndEvent){
|
|
|
|
|
|
node.setType(2);
|
|
@@ -264,13 +288,14 @@ public class ActivitiProcessController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/editNodeUser", method = RequestMethod.POST)
|
|
|
- public Result editNodeUser(String nodeId, String userIds, String roleIds, String departmentIds, Boolean chooseDepHeader, Boolean chooseSponsor){
|
|
|
+ public Result editNodeUser(String nodeId, String userIds, String roleIds, String departmentIds, Boolean chooseDepHeader, Boolean chooseSponsor,String tbTableInfoId){
|
|
|
|
|
|
|
|
|
actNodeService.deleteByNodeId(nodeId);
|
|
|
|
|
|
for(String userId : userIds.split(",")){
|
|
|
ActNode actNode = new ActNode();
|
|
|
+ actNode.setTbTableInfoId(tbTableInfoId);
|
|
|
actNode.setNodeId(nodeId);
|
|
|
actNode.setRelateId(userId);
|
|
|
actNode.setType(1);
|
|
@@ -279,6 +304,7 @@ public class ActivitiProcessController {
|
|
|
|
|
|
for(String roleId : roleIds.split(",")){
|
|
|
ActNode actNode = new ActNode();
|
|
|
+ actNode.setTbTableInfoId(tbTableInfoId);
|
|
|
actNode.setNodeId(nodeId);
|
|
|
actNode.setRelateId(roleId);
|
|
|
actNode.setType(0);
|
|
@@ -287,6 +313,7 @@ public class ActivitiProcessController {
|
|
|
|
|
|
for(String departmentId : departmentIds.split(",")){
|
|
|
ActNode actNode = new ActNode();
|
|
|
+ actNode.setTbTableInfoId(tbTableInfoId);
|
|
|
actNode.setNodeId(nodeId);
|
|
|
actNode.setRelateId(departmentId);
|
|
|
actNode.setType(2);
|
|
@@ -294,12 +321,14 @@ public class ActivitiProcessController {
|
|
|
}
|
|
|
if(chooseDepHeader!=null&&chooseDepHeader){
|
|
|
ActNode actNode = new ActNode();
|
|
|
+ actNode.setTbTableInfoId(tbTableInfoId);
|
|
|
actNode.setNodeId(nodeId);
|
|
|
actNode.setType(4);
|
|
|
actNodeService.save(actNode);
|
|
|
}
|
|
|
if(chooseSponsor!=null&&chooseSponsor){
|
|
|
ActNode actNode = new ActNode();
|
|
|
+ actNode.setTbTableInfoId(tbTableInfoId);
|
|
|
actNode.setNodeId(nodeId);
|
|
|
actNode.setType(3);
|
|
|
actNodeService.save(actNode);
|