From 40ed2b17f59dc95f7529751b7a492e2efb905cdf Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Fri, 13 Oct 2023 09:12:40 +0000 Subject: [PATCH] * Fix metric with vision. --- .../project/hour/pv_of_task_in_waterfall.php | 2 ++ .../calc/project/rate/cv_in_waterfall.php | 2 ++ .../calc/project/rate/sv_in_waterfall.php | 2 ++ .../hour/consume_of_annual_closed_project.php | 2 ++ .../hour/consume_of_monthly_closed_project.php | 2 ++ .../hour/day_of_annual_closed_project.php | 2 ++ module/metric/dataset.php | 18 ++++++++++++++++++ 7 files changed, 30 insertions(+) diff --git a/module/metric/calc/project/hour/pv_of_task_in_waterfall.php b/module/metric/calc/project/hour/pv_of_task_in_waterfall.php index 326b374d7e..4095bb16a9 100755 --- a/module/metric/calc/project/hour/pv_of_task_in_waterfall.php +++ b/module/metric/calc/project/hour/pv_of_task_in_waterfall.php @@ -29,6 +29,7 @@ class pv_of_task_in_waterfall extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -42,6 +43,7 @@ class pv_of_task_in_waterfall extends baseCalc ->andWhere('t1.type')->eq('project') ->andWhere('t1.model')->eq('waterfall') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } diff --git a/module/metric/calc/project/rate/cv_in_waterfall.php b/module/metric/calc/project/rate/cv_in_waterfall.php index 6d1fbb13c3..5008a521b3 100755 --- a/module/metric/calc/project/rate/cv_in_waterfall.php +++ b/module/metric/calc/project/rate/cv_in_waterfall.php @@ -29,6 +29,7 @@ class cv_in_waterfall extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -40,6 +41,7 @@ class cv_in_waterfall extends baseCalc ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id') ->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id') ->where("NOT FIND_IN_SET('or', t3.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t3.vision)") ->groupBy('t3.id') ->get(); diff --git a/module/metric/calc/project/rate/sv_in_waterfall.php b/module/metric/calc/project/rate/sv_in_waterfall.php index 9ad691ccee..f888e79337 100755 --- a/module/metric/calc/project/rate/sv_in_waterfall.php +++ b/module/metric/calc/project/rate/sv_in_waterfall.php @@ -29,6 +29,7 @@ class sv_in_waterfall extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -42,6 +43,7 @@ class sv_in_waterfall extends baseCalc ->andWhere('t1.type')->eq('project') ->andWhere('t1.model')->eq('waterfall') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } diff --git a/module/metric/calc/system/hour/consume_of_annual_closed_project.php b/module/metric/calc/system/hour/consume_of_annual_closed_project.php index bc7addec9f..958506712d 100755 --- a/module/metric/calc/system/hour/consume_of_annual_closed_project.php +++ b/module/metric/calc/system/hour/consume_of_annual_closed_project.php @@ -33,6 +33,7 @@ class consume_of_annual_closed_project extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->groupBy('project') ->get(); @@ -44,6 +45,7 @@ class consume_of_annual_closed_project extends baseCalc ->andWhere('t1.deleted')->eq('0') ->andWhere('t1.closedDate')->notZeroDatetime() ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } diff --git a/module/metric/calc/system/hour/consume_of_monthly_closed_project.php b/module/metric/calc/system/hour/consume_of_monthly_closed_project.php index 8d0022c4dd..5125189999 100755 --- a/module/metric/calc/system/hour/consume_of_monthly_closed_project.php +++ b/module/metric/calc/system/hour/consume_of_monthly_closed_project.php @@ -33,6 +33,7 @@ class consume_of_monthly_closed_project extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->groupBy('project') ->get(); @@ -45,6 +46,7 @@ class consume_of_monthly_closed_project extends baseCalc ->andWhere('t1.closedDate IS NOT NULL') ->andWhere('YEAR(t1.closedDate)')->ne('0000') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } diff --git a/module/metric/calc/system/hour/day_of_annual_closed_project.php b/module/metric/calc/system/hour/day_of_annual_closed_project.php index 0b0dc5e1d6..f7c91fcfc3 100755 --- a/module/metric/calc/system/hour/day_of_annual_closed_project.php +++ b/module/metric/calc/system/hour/day_of_annual_closed_project.php @@ -33,6 +33,7 @@ class day_of_annual_closed_project extends baseCalc ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') ->andWhere("NOT FIND_IN_SET('or', vision)") + ->andWhere("NOT FIND_IN_SET('lite', vision)") ->groupBy('project') ->get(); @@ -44,6 +45,7 @@ class day_of_annual_closed_project extends baseCalc ->andWhere('t1.deleted')->eq('0') ->andWhere('t1.closedDate')->notZeroDatetime() ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } diff --git a/module/metric/dataset.php b/module/metric/dataset.php index ca4f4ac9f2..a0cf4482fa 100644 --- a/module/metric/dataset.php +++ b/module/metric/dataset.php @@ -36,6 +36,7 @@ class dataset ->where('type')->eq('program') ->andWhere('deleted')->eq('0') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -55,6 +56,7 @@ class dataset ->andWhere('grade')->eq('1') ->andWhere('deleted')->eq('0') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -72,6 +74,7 @@ class dataset ->where('deleted')->eq(0) ->andWhere('type')->eq('project') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -92,6 +95,7 @@ class dataset ->andWhere('t1.type')->in('sprint,stage,kanban') ->andWhere('t2.type')->eq('project') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -112,6 +116,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t2.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t2.vision)") ->query(); } @@ -189,6 +194,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t3.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t3.vision)") ->query(); } @@ -226,6 +232,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -253,6 +260,7 @@ class dataset ->andWhere('t4.type')->in('sprint,stage,kanban') ->andWhere('t5.deleted')->eq(0) // 已删除的项目 ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -278,6 +286,7 @@ class dataset ->andWhere('t4.deleted')->eq(0) ->andWhere('t4.type')->eq('project') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -299,6 +308,7 @@ class dataset ->andWhere('t1.type')->eq('story') ->andWhere('t2.shadow')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -319,6 +329,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.type')->eq('story') ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -338,6 +349,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->andWhere('t1.stage', true)->eq('released') ->orWhere('t1.closedReason')->eq('done') ->markRight(1) @@ -361,6 +373,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t2.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t2.vision)") ->query(); } @@ -379,6 +392,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t1.shadow')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -399,6 +413,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); } @@ -419,6 +434,7 @@ class dataset ->andWhere('t1.type')->eq('line') ->andWhere('t2.type')->eq('program') ->andWhere("NOT FIND_IN_SET('or', t2.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t2.vision)") ->query(); } @@ -449,6 +465,8 @@ class dataset { return $this->dao->select($fieldList)->from(TABLE_DOC)->alias('t1') ->where('t1.deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") + ->andWhere("NOT FIND_IN_SET('lite', t1.vision)") ->query(); }