| | |
| | | */ |
| | | package com.vci.ubcs.flow.business.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.vci.ubcs.flow.core.entity.BladeFlow; |
| | | import com.vci.ubcs.flow.core.entity.ProcessTemplate; |
| | | import com.vci.ubcs.flow.core.feign.IFlowClient; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import com.vci.ubcs.flow.engine.service.ProcessTemplateService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.IdentityService; |
| | | import org.flowable.engine.RuntimeService; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | private final RuntimeService runtimeService; |
| | | private final IdentityService identityService; |
| | | private final TaskService taskService; |
| | | private final ProcessTemplateService processTemplateService; |
| | | |
| | | @Override |
| | | @PostMapping(START_PROCESS_INSTANCE_BY_ID) |
| | |
| | | return R.data(taskService.getVariables(taskId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询数据wrapper方式 |
| | | * |
| | | * @param wrapperMap 条件 |
| | | * @return R |
| | | */ |
| | | @Override |
| | | @PostMapping(SELECT_BY_WRAPPER) |
| | | public R<List<ProcessTemplate>> selectByWrapper(@RequestBody Map<String,Object> wrapperMap){ |
| | | return R.data(processTemplateService.listByMap(wrapperMap)); |
| | | } |
| | | |
| | | /** |
| | | * 批量保存流程数据 |
| | | * |
| | | * @param listProcessTemplate 保存数据 |
| | | * @return R |
| | | */ |
| | | @Override |
| | | @PostMapping(PROCESS_BATCH_SAVE) |
| | | public R processBatchSave(@RequestBody List<ProcessTemplate> listProcessTemplate) { |
| | | if(listProcessTemplate.size() == 0){ |
| | | return R.fail("为传入数据,请检查!"); |
| | | } |
| | | boolean b = processTemplateService.saveBatch(listProcessTemplate); |
| | | return R.data(b); |
| | | } |
| | | |
| | | } |