| | |
| | | */ |
| | | package cn.gistack.flow.business.feign; |
| | | |
| | | import cn.gistack.flow.business.service.FlowBusinessService; |
| | | import cn.gistack.flow.core.entity.BladeFlow; |
| | | import cn.gistack.flow.core.feign.IFlowClient; |
| | | import cn.gistack.flow.core.utils.TaskUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.IdentityService; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | private final RuntimeService runtimeService; |
| | | private final IdentityService identityService; |
| | | private final TaskService taskService; |
| | | private final FlowBusinessService flowBusinessService; |
| | | |
| | | @Override |
| | | @PostMapping(START_PROCESS_INSTANCE_BY_ID) |
| | |
| | | return R.data(taskService.getVariables(taskId)); |
| | | } |
| | | |
| | | @Override |
| | | @GetMapping(GET_BLADEFLOW) |
| | | public R<BladeFlow> getBladeFlow(String businessId,String currentUserId) { |
| | | return R.data(flowBusinessService.getBladeFlowByBusinessId(businessId,currentUserId)); |
| | | } |
| | | |
| | | @Override |
| | | @PostMapping(TODO_LIST) |
| | | public R<List<BladeFlow>> getTodoBladeFlowList(Integer size, Integer current, String currentUserId, BladeFlow bladeFlow) { |
| | | Query query = new Query(); |
| | | query.setCurrent(current); |
| | | query.setSize(size); |
| | | IPage<BladeFlow> bladeFlowIPage = flowBusinessService.selectTodoPage(Condition.getPage(query), bladeFlow, currentUserId); |
| | | return R.data(bladeFlowIPage.getRecords()); |
| | | } |
| | | |
| | | |
| | | } |