提交 ca1f544f authored 作者: kxjia's avatar kxjia

工作流

上级 4996e66f
...@@ -216,30 +216,38 @@ public class FlowFormController { ...@@ -216,30 +216,38 @@ public class FlowFormController {
List<Map<String, Object>> nodeInfos = orderedTaskElements.stream() List<Map<String, Object>> nodeInfos = orderedTaskElements.stream()
.filter(element -> element != null && isTaskElement(element)) .filter(element -> element != null && isTaskElement(element))
.map(element -> { .map(element -> {
UserTask userTask = (UserTask) element;
Map<String, Object> nodeInfo = new HashMap<>(); Map<String, Object> nodeInfo = new HashMap<>();
nodeInfo.put("id", element.getId()); nodeInfo.put("id", element.getId());
nodeInfo.put("deployId", deployId); nodeInfo.put("deployId", deployId);
nodeInfo.put("name", element.getName() != null ? element.getName() : ""); nodeInfo.put("name", element.getName() != null ? element.getName() : "");
nodeInfo.put("type", element.getClass().getSimpleName()); nodeInfo.put("type", element.getClass().getSimpleName());
nodeInfo.put("attributes", element.getAttributes()); nodeInfo.put("attributes", element.getAttributes());
String formKey = (element instanceof UserTask) ? ((UserTask) element).getFormKey() : null; nodeInfo.put("procDefId",processDefinition.getId());
//nodeInfo.put("formKey", formKey);
if (formKey != null) { if(element instanceof UserTask){
try { String formKey = ((UserTask) element).getFormKey();
Long formId = Long.parseLong(formKey); nodeInfo.put("assignee", userTask.getAssignee());
FlowForm flowForm = formMap.get(formId); if (formKey != null) {
if (flowForm != null) { try {
nodeInfo.put("formId", flowForm.getFormId()); Long formId = Long.parseLong(formKey);
nodeInfo.put("formUrl", flowForm.getFormUrl()); FlowForm flowForm = formMap.get(formId);
nodeInfo.put("formListUrl",flowForm.getFormListurl()); if (flowForm != null) {
nodeInfo.put("formId", flowForm.getFormId());
nodeInfo.put("formUrl", flowForm.getFormUrl());
nodeInfo.put("formListUrl",flowForm.getFormListurl());
}
} catch (NumberFormatException e) {
// 已经在前面处理过,这里可以忽略
} }
} catch (NumberFormatException e) {
// 已经在前面处理过,这里可以忽略
} }
} }
return nodeInfo; return nodeInfo;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
......
...@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.TableInfo; import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
...@@ -16,6 +16,8 @@ import org.jeecg.common.system.query.QueryGenerator; ...@@ -16,6 +16,8 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.system.service.ISysDictService; import org.jeecg.modules.system.service.ISysDictService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Lazy;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
...@@ -41,7 +43,7 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS ...@@ -41,7 +43,7 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS
private IStProblemCheckService stProblemCheckService; private IStProblemCheckService stProblemCheckService;
@Autowired @Autowired
private ISysDictService iSysDictService; private ISysDictService iSysDictService;
/** /**
* 分页列表查询 * 分页列表查询
* *
...@@ -100,7 +102,7 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS ...@@ -100,7 +102,7 @@ public class StProblemCheckController extends JeecgController<StProblemCheck, IS
stProblemCheckService.save(stProblemCheck); stProblemCheckService.save(stProblemCheck);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论