Commit 51bb80d9 by lijingjing

优化任务分配历史查询速度;

parent c4fb047a
......@@ -160,13 +160,13 @@
</if>
<if test="null != vo.itemStatus || null != vo.testerId">
AND exists (
select 1 from entrust_sample_item i where i.deleted = 0
<if test="null != vo.itemStatus">
and i.entrust_sample_id = s.id and i.status = #{vo.itemStatus}
</if>
<if test="null != vo.testerId">
and i.entrust_sample_id = s.id and i.tester_id = #{vo.testerId}
</if>
select 1 from entrust_sample_item i where i.deleted = 0 and i.entrust_sample_id = s.id
<if test="null != vo.itemStatus">
and i.status = #{vo.itemStatus}
</if>
<if test="null != vo.testerId">
and i.tester_id = #{vo.testerId}
</if>
)
</if>
GROUP BY s.company_id,s.entrust_id
......@@ -226,8 +226,8 @@
<include refid="basicCondition"/>
<if test="null != vo.itemStatusEnumList">
AND exists (
select 1 from entrust_sample s,entrust_sample_item i where s.deleted = 0 and i.deleted = 0
and s.id = i.entrust_sample_id and e.id = s.entrust_id
select 1 from entrust_sample_item i where i.deleted = 0
and e.id = i.entrust_id
and i.status IN
<foreach collection="vo.itemStatusEnumList" item="item" open="(" separator="," close=")">
#{item}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment