| | |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.vci.ubcs.flow.core.constant.ProcessConstant; |
| | | import com.vci.ubcs.flow.core.entity.BladeFlow; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import com.vci.ubcs.flow.engine.entity.*; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.FlowTaskUserService; |
| | | import com.vci.ubcs.flow.engine.service.ProcessStageAttrService; |
| | | import com.vci.ubcs.flow.engine.service.VICFlowService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.support.Kv; |
| | |
| | | private final FlowTaskUserService flowTaskUserService; |
| | | private final FlowEngineService flowEngineService; |
| | | private final HistoryService historyService; |
| | | private final ProcessStageAttrService processStageAttrService; |
| | | |
| | | private static String MODELKEY = "modelKey";//前端传过来的模型key |
| | | @Override |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //流程常量 |
| | | Map<String,Object> variables = runtimeService.getVariables(processInstanceId); |
| | | if(!variables.isEmpty()){ |
| | | flowTaskDTO.setVariables(variables); |
| | | } |
| | | |
| | | String templateId = variables.get("templateId").toString(); |
| | | //流程阶段 |
| | | Map<String, Object> m = new HashMap<>(); |
| | | m.put("template_id", templateId); |
| | | m.put("task_id", crruentActivityId); |
| | | m.put("model_key", modelKey); |
| | | QueryWrapper q = Condition.getQueryWrapper(m, ProcessStageAttr.class) |
| | | .select("attr_id attrId,attr_name attrName,attr_group attrGroup"); |
| | | List<ProcessStageAttr> stageAttrs = processStageAttrService.list(q); |
| | | flowTaskDTO.setStageAttrs(stageAttrs); |
| | | return flowTaskDTO; |
| | | } |
| | | } |