mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-29 18:51:53 +08:00
待办列表
This commit is contained in:
parent
2607f13abe
commit
e43039b0c6
@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||||
|
|
||||||
@Api(tags = "流程实例") // 流程实例,通过流程定义创建的一次“申请”
|
@Api(tags = "流程实例") // 流程实例,通过流程定义创建的一次“申请”
|
||||||
@ -29,7 +28,9 @@ public class BpmProcessInstanceController {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@ApiOperation("新建流程实例")
|
@ApiOperation("新建流程实例")
|
||||||
public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
|
public CommonResult<String> createProcessInstance(@Valid @RequestBody BpmProcessInstanceCreateReqVO createReqVO) {
|
||||||
return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
|
// return success(processInstanceService.createProcessInstance(getLoginUserId(), createReqVO));
|
||||||
|
processInstanceService.getMyProcessInstancePage(getLoginUserId());
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,6 @@ public interface BpmProcessInstanceService {
|
|||||||
*/
|
*/
|
||||||
String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO);
|
String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqVO createReqVO);
|
||||||
|
|
||||||
|
void getMyProcessInstancePage(Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import org.activiti.engine.HistoryService;
|
|||||||
import org.activiti.engine.RepositoryService;
|
import org.activiti.engine.RepositoryService;
|
||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
|
import org.activiti.engine.history.HistoricProcessInstance;
|
||||||
import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
import org.activiti.engine.history.HistoricProcessInstanceQuery;
|
||||||
import org.activiti.engine.impl.identity.Authentication;
|
import org.activiti.engine.impl.identity.Authentication;
|
||||||
import org.activiti.engine.repository.ProcessDefinition;
|
import org.activiti.engine.repository.ProcessDefinition;
|
||||||
@ -20,6 +21,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.adminserver.modules.bpm.enums.BpmErrorCodeConstants.PROCESS_DEFINITION_IS_SUSPENDED;
|
import static cn.iocoder.yudao.adminserver.modules.bpm.enums.BpmErrorCodeConstants.PROCESS_DEFINITION_IS_SUSPENDED;
|
||||||
@ -92,9 +94,16 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getMyProcessInstancePage(Long userId) {
|
public void getMyProcessInstancePage(Long userId) {
|
||||||
|
// id title 所属流程 当前审批环节 状态 结果 创建时间 提交申请时间 【标题、状态】「ActBusiness」
|
||||||
|
// id title 流程类别 流程版本 提交时间 流程状态 耗时 当前节点 办理 【标题、提交时间】「HistoricProcessInstanceQuery」
|
||||||
|
|
||||||
|
runtimeService.createProcessInstanceQuery().list();
|
||||||
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery()
|
||||||
.startedBy(String.valueOf(userId)) // 发起人是自己
|
.startedBy(String.valueOf(userId)) // 发起人是自己
|
||||||
.orderByProcessInstanceStartTime().desc(); // 按照发起时间倒序
|
.orderByProcessInstanceStartTime().desc(); // 按照发起时间倒序
|
||||||
|
List<HistoricProcessInstance> list = historicProcessInstanceQuery.list();
|
||||||
|
System.out.println("test");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user