Skip to content

Commit

Permalink
新增根据实例ID查询流程扩展实例信息方法
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Sep 13, 2024
1 parent 8ebd407 commit aa4372f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public interface QueryService {
*/
FlwHisInstance getHistInstance(Long instanceId);

/**
* 根据流程实例ID获取扩展流程实例对象
*
* @param instanceId 扩展流程实例ID
* @return FlwExtInstance 扩展流程实例对象
*/
FlwExtInstance getExtInstance(Long instanceId);

/**
* 判断流程实例下是否存在活跃子流程实例
*
Expand Down Expand Up @@ -172,7 +180,6 @@ default Optional<List<FlwTaskActor>> getActiveTaskActorsByTaskId(Long taskId) {
/**
* 根据实例ID获取所有子流程
*
*
* @param instanceId 实例ID
* @return 所有子流程
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@
public class QueryServiceImpl implements QueryService {
private final FlwInstanceDao instanceDao;
private final FlwHisInstanceDao hisInstanceDao;
private final FlwExtInstanceDao extInstanceDao;
private final FlwTaskDao taskDao;
private final FlwTaskActorDao taskActorDao;
private final FlwHisTaskDao hisTaskDao;
private final FlwHisTaskActorDao hisTaskActorDao;

public QueryServiceImpl(FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao,
FlwTaskDao taskDao, FlwTaskActorDao taskActorDao,
FlwExtInstanceDao extInstanceDao, FlwTaskDao taskDao, FlwTaskActorDao taskActorDao,
FlwHisTaskDao hisTaskDao, FlwHisTaskActorDao hisTaskActorDao) {
this.instanceDao = instanceDao;
this.hisInstanceDao = hisInstanceDao;
this.extInstanceDao = extInstanceDao;
this.taskDao = taskDao;
this.taskActorDao = taskActorDao;
this.hisTaskDao = hisTaskDao;
Expand All @@ -54,6 +56,11 @@ public FlwHisInstance getHistInstance(Long instanceId) {
return hisInstanceDao.selectById(instanceId);
}

@Override
public FlwExtInstance getExtInstance(Long instanceId) {
return extInstanceDao.selectById(instanceId);
}

@Override
public boolean existActiveSubProcess(Long instanceId) {
return instanceDao.selectCountByParentInstanceId(instanceId) > 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ public TaskService taskService(@Inject(required = false) TaskAccessStrategy task

@Bean
@Condition(onMissingBean = QueryService.class)
public QueryService queryService(FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao,
FlwTaskDao taskDao, FlwTaskActorDao taskActorDao,
FlwHisTaskDao hisTaskDao, FlwHisTaskActorDao hisTaskActorDao) {
return new QueryServiceImpl(instanceDao, hisInstanceDao, taskDao, taskActorDao, hisTaskDao, hisTaskActorDao);
public QueryService queryService(FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao, FlwExtInstanceDao extInstanceDao,
FlwTaskDao taskDao, FlwTaskActorDao taskActorDao, FlwHisTaskDao hisTaskDao, FlwHisTaskActorDao hisTaskActorDao) {
return new QueryServiceImpl(instanceDao, hisInstanceDao, extInstanceDao, taskDao, taskActorDao, hisTaskDao, hisTaskActorDao);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ public TaskService taskService(@Autowired(required = false) TaskAccessStrategy t

@Bean
@ConditionalOnMissingBean
public QueryService queryService(FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao,
FlwTaskDao taskDao, FlwTaskActorDao taskActorDao,
FlwHisTaskDao hisTaskDao, FlwHisTaskActorDao hisTaskActorDao) {
return new QueryServiceImpl(instanceDao, hisInstanceDao, taskDao, taskActorDao, hisTaskDao, hisTaskActorDao);
public QueryService queryService(FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao, FlwExtInstanceDao extInstanceDao,
FlwTaskDao taskDao, FlwTaskActorDao taskActorDao, FlwHisTaskDao hisTaskDao, FlwHisTaskActorDao hisTaskActorDao) {
return new QueryServiceImpl(instanceDao, hisInstanceDao, extInstanceDao, taskDao, taskActorDao, hisTaskDao, hisTaskActorDao);
}

@Bean
Expand Down

0 comments on commit aa4372f

Please sign in to comment.