Przeglądaj źródła

开始流程节点关联表单查询

chenc 3 lat temu
rodzic
commit
c74652e9a1

+ 14 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActivitiProcessController.java

@@ -247,6 +247,20 @@ public class ActivitiProcessController {
                 if(element instanceof StartEvent){
                     // 开始节点
                     node.setType(0);
+                    //设置关联表单
+                    //查询发布流程模型
+                     ActZprocess actZprocess=actZprocessService.getById(id);
+                     if(actZprocess!=null){
+                         //查询已近被设定为初始的表单
+                         QueryWrapper<TbTableInfo> queryWrapper=new QueryWrapper<>();
+                         queryWrapper.lambda().eq(TbTableInfo::getDelFlag,"0");
+                         queryWrapper.lambda().eq(TbTableInfo::getBusinessTable,actZprocess.getBusinessTable());
+                         queryWrapper.lambda().eq(TbTableInfo::getIsInitial,"1");
+                         TbTableInfo tbTableInfo= tbTableInfoService.getOne(queryWrapper);
+                         if(tbTableInfo!=null){
+                             node.setTbTableInfoId(tbTableInfo.getId());
+                         }
+                     }
                 }else if(element instanceof UserTask){
                     // 用户任务
                     node.setType(1);