提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.bpm.service.task; |
H |
2 |
|
|
3 |
import com.iailab.module.bpm.controller.admin.task.vo.activity.BpmActivityRespVO; |
|
4 |
import com.iailab.module.bpm.convert.task.BpmActivityConvert; |
|
5 |
import lombok.extern.slf4j.Slf4j; |
|
6 |
import org.flowable.engine.HistoryService; |
|
7 |
import org.flowable.engine.history.HistoricActivityInstance; |
|
8 |
import org.springframework.stereotype.Service; |
|
9 |
import org.springframework.validation.annotation.Validated; |
|
10 |
|
|
11 |
import javax.annotation.Resource; |
|
12 |
import java.util.List; |
|
13 |
|
|
14 |
|
|
15 |
/** |
|
16 |
* BPM 活动实例 Service 实现类 |
|
17 |
* |
|
18 |
* @author iailab |
|
19 |
*/ |
|
20 |
@Service |
|
21 |
@Slf4j |
|
22 |
@Validated |
|
23 |
public class BpmActivityServiceImpl implements BpmActivityService { |
|
24 |
|
|
25 |
@Resource |
|
26 |
private HistoryService historyService; |
|
27 |
|
|
28 |
@Override |
|
29 |
public List<BpmActivityRespVO> getActivityListByProcessInstanceId(String processInstanceId) { |
|
30 |
List<HistoricActivityInstance> activityList = historyService.createHistoricActivityInstanceQuery() |
|
31 |
.processInstanceId(processInstanceId).list(); |
|
32 |
return BpmActivityConvert.INSTANCE.convertList(activityList); |
|
33 |
} |
|
34 |
|
|
35 |
@Override |
|
36 |
public List<HistoricActivityInstance> getHistoricActivityListByExecutionId(String executionId) { |
|
37 |
return historyService.createHistoricActivityInstanceQuery().executionId(executionId).list(); |
|
38 |
} |
|
39 |
|
|
40 |
} |