From 9c6509284ffd2b168c7e7fbd86a1afbd530649ef Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 10 Sep 2024 07:27:14 +0000 Subject: [PATCH] * [task#127481,done,0.5h] Adjust filters and sql. --- module/bi/config/pivots.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/module/bi/config/pivots.php b/module/bi/config/pivots.php index 12e94b039b..934b7b2789 100644 --- a/module/bi/config/pivots.php +++ b/module/bi/config/pivots.php @@ -1602,8 +1602,11 @@ left join zt_bug as t2 on t1.id=t2.execution left join zt_project as t3 on t3.id=t1.project where t1.deleted='0' and t2.deleted='0' +and (case when \$projectStatus='' then 1=1 else t3.status=\$projectStatus end) +and (case when \$executionStatus='' then 1=1 else t1.status=\$executionStatus end) and (case when \$project='' then 1 else t3.id=\$project end) and (case when \$execution='' then 1 else t1.id=\$execution end) +and not (\$projectStatus='' and \$executionStatus='' and \$project='' and \$execution='') EOT, 'settings' => array ( @@ -1618,6 +1621,8 @@ EOT, ), 'filters' => array ( + array('from' => 'query', 'field' => 'projectStatus', 'name' => '项目状态', 'type' => 'select', 'typeOption' => 'project.status', 'default' => 'doing'), + array('from' => 'query', 'field' => 'executionStatus', 'name' => '执行状态', 'type' => 'select', 'typeOption' => 'execution.status', 'default' => 'doing'), array('from' => 'query', 'field' => 'project', 'name' => '项目列表', 'type' => 'select', 'typeOption' => 'project', 'default' => ''), array('from' => 'query', 'field' => 'execution', 'name' => '执行列表', 'type' => 'select', 'typeOption' => 'execution', 'default' => '') ), @@ -1643,11 +1648,11 @@ EOT, ), 'vars' => array ( - 'varName' => array('project', 'execution'), - 'showName' => array('项目列表', '执行列表'), - 'requestType' => array('select', 'select'), - 'selectList' => array('project', 'execution'), - 'default' => array('', '') + 'varName' => array('projectStatus', 'executionStatus', 'project', 'execution'), + 'showName' => array('项目状态', '执行状态', '项目列表', '执行列表'), + 'requestType' => array('select', 'select', 'select', 'select'), + 'selectList' => array('projectStatus', 'executionStatus', 'project', 'execution'), + 'default' => array('doing', 'doing', '', '') ), 'drills' => array (