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

工作流

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