|
|
|
@ -129,17 +129,17 @@
|
|
|
|
|
</if> |
|
|
|
|
order by instance.start_time desc |
|
|
|
|
</select> |
|
|
|
|
<select id="queryTasksByPIdAndStatesAndType"> |
|
|
|
|
<select id="queryTaskByPIdAndStateAndType" resultType="java.lang.Integer"> |
|
|
|
|
select id from t_ds_task_instance |
|
|
|
|
where process_instance_id = #{processInstanceId} |
|
|
|
|
and task_type = #{taskType} |
|
|
|
|
and state = #{state} |
|
|
|
|
and flag = 1 |
|
|
|
|
</select> |
|
|
|
|
<select id="queryTasksBySubProcessTaskIdAndState"> |
|
|
|
|
<select id="queryTasksBySubProcessTaskIdAndState" resultType="java.lang.Integer"> |
|
|
|
|
select id from t_ds_task_instance |
|
|
|
|
where process_instance_id = |
|
|
|
|
(select process_instance_id in t_ds_relation_process_instance where parent_task_instance_id = #{subProcessTaskId}) |
|
|
|
|
(select process_instance_id from t_ds_relation_process_instance where parent_task_instance_id = #{subProcessTaskId}) |
|
|
|
|
and state = #{state} |
|
|
|
|
and flag = 1 |
|
|
|
|
</select> |
|
|
|
|