feat(测试计划): 报告用例详情测试点展示支持过滤
This commit is contained in:
parent
c0400c483d
commit
d9847330b1
|
@ -51,9 +51,14 @@
|
|||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tprac.id) as count
|
||||
from test_plan_report_api_case tprac
|
||||
join test_plan_collection tpc on tprac.test_plan_collection_id = tpc.id and tpc.type = 'API'
|
||||
right join test_plan_collection tpc on tprac.test_plan_collection_id = tpc.id and tpc.type = 'API'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
where tprac.test_plan_report_id = #{request.reportId}
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (tprac.api_case_name like concat('%', #{request.keyword}, '%')
|
||||
or tprac.api_case_num like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<include refid="filter"/>
|
||||
group by tprac.test_plan_collection_id
|
||||
</select>
|
||||
|
||||
|
@ -87,6 +92,11 @@
|
|||
and tprac.api_case_priority in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
<!-- 计划名称 -->
|
||||
<when test="key == 'planName'">
|
||||
and tp.name in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
|
|
|
@ -50,9 +50,14 @@
|
|||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tpras.id) as count
|
||||
from test_plan_report_api_scenario tpras
|
||||
join test_plan_collection tpc on tpras.test_plan_collection_id = tpc.id and tpc.type = 'SCENARIO'
|
||||
right join test_plan_collection tpc on tpras.test_plan_collection_id = tpc.id and tpc.type = 'SCENARIO'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
where tpras.test_plan_report_id = #{request.reportId}
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (tpras.api_scenario_name like concat('%', #{request.keyword}, '%')
|
||||
or tpras.api_scenario_num like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<include refid="filter"/>
|
||||
group by tpras.test_plan_collection_id
|
||||
</select>
|
||||
|
||||
|
@ -80,6 +85,11 @@
|
|||
and tpras.api_scenario_priority in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
<!-- 计划名称 -->
|
||||
<when test="key == 'planName'">
|
||||
and tp.name in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
|
|
|
@ -71,9 +71,14 @@
|
|||
<select id="listCollection" resultType="io.metersphere.plan.dto.response.TestPlanReportDetailCollectionResponse">
|
||||
select tpc.id as id, tpc.name as name, tp.name as planName, count(tprfc.id) as count
|
||||
from test_plan_report_function_case tprfc
|
||||
join test_plan_collection tpc on tprfc.test_plan_collection_id = tpc.id and tpc.type = 'FUNCTIONAL'
|
||||
right join test_plan_collection tpc on tprfc.test_plan_collection_id = tpc.id and tpc.type = 'FUNCTIONAL'
|
||||
join test_plan tp on tpc.test_plan_id = tp.id
|
||||
where tprfc.test_plan_report_id = #{request.reportId}
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (tprfc.function_case_num like concat('%', #{request.keyword}, '%')
|
||||
or tprfc.function_case_name like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<include refid="filter"/>
|
||||
group by tprfc.test_plan_collection_id
|
||||
</select>
|
||||
|
||||
|
@ -101,6 +106,11 @@
|
|||
and tprfc.function_case_priority in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
<!-- 计划名称 -->
|
||||
<when test="key == 'planName'">
|
||||
and tp.name in
|
||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
|
|
Loading…
Reference in New Issue