From b80a258cd95b3b4161518012274c2cbda37b42c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Fri, 27 Jan 2023 12:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=9B=9E=E5=BD=92=E5=88=86?= =?UTF-8?q?=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xm/core/dao/XmTestPlanCaseMapper.xml | 101 +++++++----------- 1 file changed, 40 insertions(+), 61 deletions(-) diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml index 6efe8407..f0c210da 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml @@ -6,21 +6,47 @@ - and (res.case_id, res.plan_id) in - - ( #{item.caseId}, #{item.planId}) - - - and c.case_name like concat('%',#{key},'%') - - - and exists( select 1 from xm_func f where f.pid_paths like concat(#{funcPidPathsLike},'%') and c.func_id=f.id) + + and res.plan_id=#{planId} + + + and p.casedb_id=#{casedbId} + + + and p.project_id=#{projectId} - and c.product_id=#{productId} + and p.product_id=#{productId} - + + + and res.plan_id=#{planId} + + + and p.casedb_id=#{casedbId} + + + and p.project_id=#{projectId} + + + and p.product_id=#{productId} + + + and p.pbranch_id=#{pbranchId} + + + and res.exec_date between #{startExecDate} and #{endExecDate} + + + and exists ( select 1 from xm_test_case c inner join xm_menu m on c.menu_id=m.menu_id + where m.iteration_id=#{linkIterationId} and c.id=res.case_id + + and m.product_id=#{productId} + + ) + + select count(*) as total_cnt,res.exec_status from xm_test_plan_case res left join xm_test_plan p on res.plan_id=p.id - - and res.plan_id=#{planId} - - - and p.casedb_id=#{casedbId} - - - and p.project_id=#{projectId} - - - and p.product_id=#{productId} - + group by res.exec_status @@ -54,18 +69,7 @@ ,res.exec_userid,max(res.exec_username) as exec_username from xm_test_plan_case res left join xm_test_plan p on res.plan_id=p.id - - and res.plan_id=#{planId} - - - and p.casedb_id=#{casedbId} - - - and p.project_id=#{projectId} - - - and p.product_id=#{productId} - + group by res.exec_userid @@ -77,32 +81,7 @@ select res.exec_date, sum(case when res.exec_status>='1' then 1 else 0 end) as had_exec from xm_test_plan_case res inner join xm_test_plan p on res.plan_id=p.id - - and res.plan_id=#{planId} - - - and p.casedb_id=#{casedbId} - - - and p.project_id=#{projectId} - - - and p.product_id=#{productId} - - - and p.pbranch_id=#{pbranchId} - - - and res.exec_date between #{startExecDate} and #{endExecDate} - - - and exists ( select 1 from xm_test_case c inner join xm_menu m on c.menu_id=m.menu_id - where m.iteration_id=#{linkIterationId} and c.id=res.case_id - - and m.product_id=#{productId} - - ) - + group by res.exec_date order by res.exec_date asc