From 17ea64547796628ad59616780a3b2433d95fb977 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Wed, 27 Sep 2023 07:05:11 +0000 Subject: [PATCH] * Add where with 'vision = or'. --- .../qc/rate_of_approved_story_in_product.php | 1 + ...ncentration_of_developed_story_in_product.php | 1 + ...se_coverage_of_projected_story_in_product.php | 1 + .../count_of_delivered_story_in_product.php | 1 + .../count_of_developed_story_in_product.php | 1 + .../scale/count_of_invalid_story_in_product.php | 1 + .../count_of_projected_story_in_product.php | 1 + ...t_of_projected_story_with_case_in_product.php | 1 + .../scale/count_of_valid_story_in_product.php | 1 + .../calc/project/hour/ac_of_all_in_waterfall.php | 1 + .../project/hour/consume_of_all_in_project.php | 1 + .../project/hour/day_of_invested_in_project.php | 1 + .../hour/ev_of_finished_task_in_waterfall.php | 2 ++ .../project/hour/pv_of_task_in_waterfall.php | 2 ++ .../metric/calc/project/rate/cv_in_waterfall.php | 2 ++ .../metric/calc/project/rate/sv_in_waterfall.php | 2 ++ .../project/scale/count_of_user_in_project.php | 1 + .../hour/consume_of_annual_closed_project.php | 2 ++ .../hour/consume_of_monthly_closed_project.php | 2 ++ .../system/hour/day_of_annual_closed_project.php | 2 ++ .../system/scale/count_of_annual_created_bug.php | 12 +++++------- .../calc/system/scale/count_of_invalid_story.php | 1 + .../calc/system/scale/count_of_valid_story.php | 1 + .../scale/count_of_reviewing_story_in_user.php | 1 + module/metric/dataset.php | 16 ++++++++++++++++ module/metric/zen.php | 2 +- 26 files changed, 52 insertions(+), 8 deletions(-) diff --git a/module/metric/calc/product/qc/rate_of_approved_story_in_product.php b/module/metric/calc/product/qc/rate_of_approved_story_in_product.php index 31e912d2c5..861d1f95a7 100644 --- a/module/metric/calc/product/qc/rate_of_approved_story_in_product.php +++ b/module/metric/calc/product/qc/rate_of_approved_story_in_product.php @@ -32,6 +32,7 @@ class rate_of_approved_story_in_product extends baseCalc ->andWhere('t3.deleted')->eq(0) ->andWhere('t2.type')->eq('story') ->andWhere('t3.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->groupBy('t2.product') ->query(); } diff --git a/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php b/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php index d095c8e135..f60979abc0 100644 --- a/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php +++ b/module/metric/calc/product/scale/bug_concentration_of_developed_story_in_product.php @@ -27,6 +27,7 @@ class bug_concentration_of_developed_story_in_product extends baseCalc $developedStory = $this->dao->select('product, count(id) AS storyNum') ->from(TABLE_STORY) ->where('deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->andWhere('stage', true)->in('developed,testing,tested,verified,released') ->orWhere('closedReason')->eq('done') ->markRight(1) diff --git a/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php b/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php index fa871dbafc..bf0579a85f 100644 --- a/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php +++ b/module/metric/calc/product/scale/case_coverage_of_projected_story_in_product.php @@ -33,6 +33,7 @@ class case_coverage_of_projected_story_in_product extends baseCalc ->andWhere('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/product/scale/count_of_delivered_story_in_product.php b/module/metric/calc/product/scale/count_of_delivered_story_in_product.php index 8fe6e88909..5c89ccb793 100644 --- a/module/metric/calc/product/scale/count_of_delivered_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_delivered_story_in_product.php @@ -29,6 +29,7 @@ class count_of_delivered_story_in_product extends baseCalc ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->andWhere('t1.stage', true)->eq('released') ->orWhere('t1.closedReason')->eq('done') ->markRight(1) diff --git a/module/metric/calc/product/scale/count_of_developed_story_in_product.php b/module/metric/calc/product/scale/count_of_developed_story_in_product.php index bea5e42271..3b338169df 100644 --- a/module/metric/calc/product/scale/count_of_developed_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_developed_story_in_product.php @@ -30,6 +30,7 @@ class count_of_developed_story_in_product extends baseCalc ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) ->andWhere('t1.type')->eq('story') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->andWhere('t1.stage', true)->in('developed,testing,tested,verified,released') ->orWhere('t1.closedReason')->eq('done') ->markRight(1) diff --git a/module/metric/calc/product/scale/count_of_invalid_story_in_product.php b/module/metric/calc/product/scale/count_of_invalid_story_in_product.php index bfe081cb56..f8939f7828 100644 --- a/module/metric/calc/product/scale/count_of_invalid_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_invalid_story_in_product.php @@ -31,6 +31,7 @@ class count_of_invalid_story_in_product extends baseCalc ->andWhere('t1.type')->eq('story') ->andWhere('t2.shadow')->eq(0) ->andWhere('t1.closedReason')->in('duplicate,willnotdo,bydesign,cancel') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->groupBy('t1.product') ->query(); } diff --git a/module/metric/calc/product/scale/count_of_projected_story_in_product.php b/module/metric/calc/product/scale/count_of_projected_story_in_product.php index 542e6507aa..3476db986e 100644 --- a/module/metric/calc/product/scale/count_of_projected_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_projected_story_in_product.php @@ -30,6 +30,7 @@ class count_of_projected_story_in_product extends baseCalc ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id') ->where('t2.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->groupBy('t1.product'); } diff --git a/module/metric/calc/product/scale/count_of_projected_story_with_case_in_product.php b/module/metric/calc/product/scale/count_of_projected_story_with_case_in_product.php index a1d4167c09..62933fdded 100644 --- a/module/metric/calc/product/scale/count_of_projected_story_with_case_in_product.php +++ b/module/metric/calc/product/scale/count_of_projected_story_with_case_in_product.php @@ -31,6 +31,7 @@ class count_of_projected_story_with_case_in_product extends baseCalc ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id') ->where('t2.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->groupBy('t1.product'); } diff --git a/module/metric/calc/product/scale/count_of_valid_story_in_product.php b/module/metric/calc/product/scale/count_of_valid_story_in_product.php index 3e3219e264..c866be22d4 100644 --- a/module/metric/calc/product/scale/count_of_valid_story_in_product.php +++ b/module/metric/calc/product/scale/count_of_valid_story_in_product.php @@ -31,6 +31,7 @@ class count_of_valid_story_in_product extends baseCalc ->andWhere('t2.shadow')->eq(0) ->andWhere('t1.type')->eq('story') ->andWhere('t1.closedReason')->notin('duplicate,willnotdo,bydesign,cancel') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/project/hour/ac_of_all_in_waterfall.php b/module/metric/calc/project/hour/ac_of_all_in_waterfall.php index c84af32417..dd3ae26623 100644 --- a/module/metric/calc/project/hour/ac_of_all_in_waterfall.php +++ b/module/metric/calc/project/hour/ac_of_all_in_waterfall.php @@ -33,6 +33,7 @@ class ac_of_all_in_waterfall extends baseCalc ->where('t3.deleted')->eq('0') ->andWhere('t3.type')->eq('project') ->andWhere('t3.model')->eq('waterfall') + ->andWhere("NOT FIND_IN_SET('or', t3.vision)") ->groupBy('t3.id') ->query(); } diff --git a/module/metric/calc/project/hour/consume_of_all_in_project.php b/module/metric/calc/project/hour/consume_of_all_in_project.php index 95cbed22a8..ff5ddbbc78 100644 --- a/module/metric/calc/project/hour/consume_of_all_in_project.php +++ b/module/metric/calc/project/hour/consume_of_all_in_project.php @@ -32,6 +32,7 @@ class consume_of_all_in_project extends baseCalc ->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id') ->where('t3.deleted')->eq('0') ->andWhere('t3.type')->eq('project') + ->andWhere("NOT FIND_IN_SET('or', t3.vision)") ->groupBy('t3.id') ->query(); } diff --git a/module/metric/calc/project/hour/day_of_invested_in_project.php b/module/metric/calc/project/hour/day_of_invested_in_project.php index bfd9f918f6..52addc561c 100644 --- a/module/metric/calc/project/hour/day_of_invested_in_project.php +++ b/module/metric/calc/project/hour/day_of_invested_in_project.php @@ -39,6 +39,7 @@ class day_of_invested_in_project extends baseCalc ->leftJoin(TABLE_PROJECT)->alias('t3')->on('t2.project=t3.id') ->where('t3.deleted')->eq('0') ->andWhere('t3.type')->eq('project') + ->andWhere("NOT FIND_IN_SET('or', t3.vision)") ->groupBy('t3.id') ->query(); } diff --git a/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php b/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php index fbd8292f1a..5e70f95175 100644 --- a/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php +++ b/module/metric/calc/project/hour/ev_of_finished_task_in_waterfall.php @@ -30,6 +30,7 @@ class ev_of_finished_task_in_waterfall extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -42,6 +43,7 @@ class ev_of_finished_task_in_waterfall extends baseCalc ->where('t1.deleted')->eq('0') ->andWhere('t1.type')->eq('project') ->andWhere('t1.model')->eq('waterfall') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } 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 96a9f2aee1..64492b6a22 100644 --- a/module/metric/calc/project/hour/pv_of_task_in_waterfall.php +++ b/module/metric/calc/project/hour/pv_of_task_in_waterfall.php @@ -30,6 +30,7 @@ class pv_of_task_in_waterfall extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', 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 ->where('t1.deleted')->eq('0') ->andWhere('t1.type')->eq('project') ->andWhere('t1.model')->eq('waterfall') + ->andWhere("NOT FIND_IN_SET('or', 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 a6dc4f3722..5c61fd52b9 100644 --- a/module/metric/calc/project/rate/cv_in_waterfall.php +++ b/module/metric/calc/project/rate/cv_in_waterfall.php @@ -30,6 +30,7 @@ class cv_in_waterfall extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -40,6 +41,7 @@ class cv_in_waterfall extends baseCalc ->from(TABLE_EFFORT)->alias('t1') ->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)") ->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 4a6f8b302a..52fa45987e 100644 --- a/module/metric/calc/project/rate/sv_in_waterfall.php +++ b/module/metric/calc/project/rate/sv_in_waterfall.php @@ -30,6 +30,7 @@ class sv_in_waterfall extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->andWhere('status', true)->in('done,closed') ->orWhere('closedReason')->eq('done') ->markRight(1) @@ -42,6 +43,7 @@ class sv_in_waterfall extends baseCalc ->where('t1.deleted')->eq('0') ->andWhere('t1.type')->eq('project') ->andWhere('t1.model')->eq('waterfall') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/project/scale/count_of_user_in_project.php b/module/metric/calc/project/scale/count_of_user_in_project.php index 1bfd0ddf73..9f8d0f8699 100644 --- a/module/metric/calc/project/scale/count_of_user_in_project.php +++ b/module/metric/calc/project/scale/count_of_user_in_project.php @@ -33,6 +33,7 @@ class count_of_user_in_project extends baseCalc ->where('t1.type')->eq('execution') ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t3.vision)") ->groupBy('t3.id') ->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 af0064939d..728e4fd2b8 100644 --- a/module/metric/calc/system/hour/consume_of_annual_closed_project.php +++ b/module/metric/calc/system/hour/consume_of_annual_closed_project.php @@ -32,6 +32,7 @@ class consume_of_annual_closed_project extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->groupBy('project') ->get(); @@ -42,6 +43,7 @@ class consume_of_annual_closed_project extends baseCalc ->andWhere('t1.status')->eq('closed') ->andWhere('t1.deleted')->eq('0') ->andWhere('t1.closedDate')->notZeroDatetime() + ->andWhere("NOT FIND_IN_SET('or', 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 8ad659bc35..1ce18447f8 100644 --- a/module/metric/calc/system/hour/consume_of_monthly_closed_project.php +++ b/module/metric/calc/system/hour/consume_of_monthly_closed_project.php @@ -32,6 +32,7 @@ class consume_of_monthly_closed_project extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->groupBy('project') ->get(); @@ -43,6 +44,7 @@ class consume_of_monthly_closed_project extends baseCalc ->andWhere('t1.deleted')->eq('0') ->andWhere('t1.closedDate IS NOT NULL') ->andWhere('YEAR(t1.closedDate)')->ne('0000') + ->andWhere("NOT FIND_IN_SET('or', 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 fd31e86708..0b0dc5e1d6 100644 --- a/module/metric/calc/system/hour/day_of_annual_closed_project.php +++ b/module/metric/calc/system/hour/day_of_annual_closed_project.php @@ -32,6 +32,7 @@ class day_of_annual_closed_project extends baseCalc ->from(TABLE_TASK) ->where('deleted')->eq('0') ->andWhere('parent')->ne('-1') + ->andWhere("NOT FIND_IN_SET('or', vision)") ->groupBy('project') ->get(); @@ -42,6 +43,7 @@ class day_of_annual_closed_project extends baseCalc ->andWhere('t1.status')->eq('closed') ->andWhere('t1.deleted')->eq('0') ->andWhere('t1.closedDate')->notZeroDatetime() + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/system/scale/count_of_annual_created_bug.php b/module/metric/calc/system/scale/count_of_annual_created_bug.php index 424e23912d..29f39cefd6 100644 --- a/module/metric/calc/system/scale/count_of_annual_created_bug.php +++ b/module/metric/calc/system/scale/count_of_annual_created_bug.php @@ -1,17 +1,15 @@ diff --git a/module/metric/calc/system/scale/count_of_invalid_story.php b/module/metric/calc/system/scale/count_of_invalid_story.php index 34bcf2f789..3cd4d9b28e 100644 --- a/module/metric/calc/system/scale/count_of_invalid_story.php +++ b/module/metric/calc/system/scale/count_of_invalid_story.php @@ -31,6 +31,7 @@ class count_of_invalid_story extends baseCalc ->andWhere('t1.type')->eq('story') ->andWhere('t2.shadow')->eq(0) ->andWhere('t1.closedReason')->in('duplicate,willnotdo,bydesign') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/system/scale/count_of_valid_story.php b/module/metric/calc/system/scale/count_of_valid_story.php index e0b2610539..8825a57123 100644 --- a/module/metric/calc/system/scale/count_of_valid_story.php +++ b/module/metric/calc/system/scale/count_of_valid_story.php @@ -31,6 +31,7 @@ class count_of_valid_story extends baseCalc ->andWhere('t2.shadow')->eq(0) ->andWhere('t1.type')->eq('story') ->andWhere('t1.closedReason')->notin('duplicate,willnotdo,bydesign,cancel') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } diff --git a/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php b/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php index 7f1bf5884d..101a5ff3d0 100644 --- a/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php +++ b/module/metric/calc/user/scale/count_of_reviewing_story_in_user.php @@ -33,6 +33,7 @@ class count_of_reviewing_story_in_user extends baseCalc ->where('t2.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') ->andWhere('t2.status')->eq('reviewing') + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->query(); } diff --git a/module/metric/dataset.php b/module/metric/dataset.php index bd12ebb04f..e6ff247c36 100644 --- a/module/metric/dataset.php +++ b/module/metric/dataset.php @@ -35,6 +35,7 @@ class dataset ->from(TABLE_PROJECT)->alias('t1') ->where('type')->eq('program') ->andWhere('deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -53,6 +54,7 @@ class dataset ->where('type')->eq('program') ->andWhere('grade')->eq('1') ->andWhere('deleted')->eq('0') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -69,6 +71,7 @@ class dataset return $this->dao->select($fieldList)->from(TABLE_PROJECT)->alias('t1') ->where('deleted')->eq(0) ->andWhere('type')->eq('project') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -88,6 +91,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.type')->in('sprint,stage,kanban') ->andWhere('t2.type')->eq('project') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -107,6 +111,7 @@ class dataset ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id') ->where('t1.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->query(); } @@ -183,6 +188,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t3.vision)") ->query(); } @@ -219,6 +225,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -245,6 +252,7 @@ class dataset ->andWhere('t4.deleted')->eq(0) // 已删除的执行 ->andWhere('t4.type')->in('sprint,stage,kanban') ->andWhere('t5.deleted')->eq(0) // 已删除的项目 + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -269,6 +277,7 @@ class dataset ->andWhere('t2.shadow')->eq(0) ->andWhere('t4.deleted')->eq(0) ->andWhere('t4.type')->eq('project') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -289,6 +298,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.type')->eq('story') ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -308,6 +318,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.type')->eq('story') + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -326,6 +337,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->andWhere('t1.stage', true)->eq('released') ->orWhere('t1.closedReason')->eq('done') ->markRight(1) @@ -348,6 +360,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t2.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->query(); } @@ -365,6 +378,7 @@ class dataset ->from(TABLE_PRODUCT)->alias('t1') ->where('t1.deleted')->eq(0) ->andWhere('t1.shadow')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -384,6 +398,7 @@ class dataset ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('t3.deleted')->eq(0) + ->andWhere("NOT FIND_IN_SET('or', t1.vision)") ->query(); } @@ -403,6 +418,7 @@ class dataset ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.type')->eq('line') ->andWhere('t2.type')->eq('program') + ->andWhere("NOT FIND_IN_SET('or', t2.vision)") ->query(); } diff --git a/module/metric/zen.php b/module/metric/zen.php index 73d683db43..c820b2100e 100644 --- a/module/metric/zen.php +++ b/module/metric/zen.php @@ -398,7 +398,7 @@ class metricZen extends metric $row->scopeID = $record[$scope]; } $row->value = is_numeric($record['value']) ? round((float)$record['value'], 2) : $record['value']; - if(isset($record['date'])) $row->calcTime = date("Y-m-d H:m", strtotime($record['date'])); + if(isset($record['date'])) $row->calcTime = date("Y-m-d H:i", strtotime($record['date'])); $tableData[] = $row; }