From aa95bdb809af5d0b10de72074b35e67b241c4a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Fri, 24 May 2024 17:57:14 +0800 Subject: [PATCH] * Modify pivot sql. --- module/bi/config/pivots.php | 322 ++++++++++++++++++++---------------- 1 file changed, 178 insertions(+), 144 deletions(-) diff --git a/module/bi/config/pivots.php b/module/bi/config/pivots.php index f07fbdf45c..4db0d247b6 100644 --- a/module/bi/config/pivots.php +++ b/module/bi/config/pivots.php @@ -10,38 +10,37 @@ $config->bi->builtin->pivots[] = array 'group' => '86', 'sql' => << array ( @@ -56,23 +55,23 @@ EOT, array('field' => 'duration_deviation', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), array('field' => 'rate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow') ), - 'group3' => 'program1', - 'group6' => 'name', + 'group1' => 'program1', + 'group2' => 'name', 'lastStep' => '4' ), 'filters' => array(), 'fields' => array ( - 'name' => array('name' => '项目名称', 'object' => 'project', 'field' => 'name', 'type' => 'string'), - 'program1' => array('name' => 'program1', 'object' => 'project', 'field' => 'program1', 'type' => 'string'), - 'begin' => array('name' => '计划开始日期', 'object' => 'project', 'field' => 'begin', 'type' => 'date'), - 'end' => array('name' => '计划完成日期', 'object' => 'project', 'field' => 'end', 'type' => 'date'), - 'realBegan' => array('name' => '实际开始日期', 'object' => 'project', 'field' => 'realBegan', 'type' => 'date'), - 'realEnd' => array('name' => '实际完成日期', 'object' => 'project', 'field' => 'realEnd', 'type' => 'date'), - 'closedDate' => array('name' => '关闭日期', 'object' => 'project', 'field' => 'closedDate', 'type' => 'date'), - 'realduration' => array('name' => 'realduration', 'object' => 'project', 'field' => 'realduration', 'type' => 'number'), - 'duration_deviation' => array('name' => 'duration_deviation', 'object' => 'project', 'field' => 'duration_deviation', 'type' => 'number'), - 'rate' => array('name' => 'rate', 'object' => 'project', 'field' => 'rate', 'type' => 'number') + 'name' => array('object' => 'project', 'field' => 'name', 'type' => 'string'), + 'program1' => array('object' => 'project', 'field' => 'program1', 'type' => 'string'), + 'begin' => array('object' => 'project', 'field' => 'begin', 'type' => 'date'), + 'end' => array('object' => 'project', 'field' => 'end', 'type' => 'date'), + 'realBegan' => array('object' => 'project', 'field' => 'realBegan', 'type' => 'date'), + 'realEnd' => array('object' => 'project', 'field' => 'realEnd', 'type' => 'date'), + 'closedDate' => array('object' => 'project', 'field' => 'closedDate', 'type' => 'date'), + 'realduration' => array('object' => 'project', 'field' => 'realduration', 'type' => 'number'), + 'duration_deviation' => array('object' => 'project', 'field' => 'duration_deviation', 'type' => 'number'), + 'rate' => array('object' => 'project', 'field' => 'rate', 'type' => 'number') ), 'langs' => array ( @@ -100,84 +99,89 @@ $config->bi->builtin->pivots[] = array 'group' => '85', 'sql' => << array ( 'columns' => array ( - array('field' => '预计工时', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '消耗工时', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '工时偏差', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '工时偏差率', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '完成需求数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '完成需求规模数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '单位时间交付需求规模数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow') + array('field' => 'estimate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'consumed', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'deviation', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'deviationrate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'finishedstorys', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'finishedstorysmate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'demandsizesperunittime', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow') ), 'columnTotal' => 'noShow', - 'group1' => '一级项目集', - 'group2' => '项目名称', + 'group1' => 'topprogram', + 'group2' => 'projectname', 'lastStep' => '4' ), 'filters' => array ( array ( - 'field' => 'closedDate', + 'field' => 'closeddate', 'type' => 'date', 'name' => '关闭日期', 'default' => array('begin' => '', 'end' => '') @@ -185,16 +189,29 @@ EOT, ), 'fields' => array ( - '项目名称' => array('name' => '项目名称', 'object' => 'project', 'field' => '项目名称', 'type' => 'string'), - '一级项目集' => array('name' => '一级项目集', 'object' => 'project', 'field' => '一级项目集', 'type' => 'string'), - '预计工时' => array('name' => '预计工时', 'object' => 'project', 'field' => '预计工时', 'type' => 'number'), - '消耗工时' => array('name' => '消耗工时', 'object' => 'project', 'field' => '消耗工时', 'type' => 'number'), - '工时偏差' => array('name' => '工时偏差', 'object' => 'project', 'field' => '工时偏差', 'type' => 'number'), - '工时偏差率' => array('name' => '工时偏差率', 'object' => 'project', 'field' => '工时偏差率', 'type' => 'number'), - '完成需求数' => array('name' => '完成需求数', 'object' => 'project', 'field' => '完成需求数', 'type' => 'string'), - '完成需求规模数' => array('name' => '完成需求规模数', 'object' => 'project', 'field' => '完成需求规模数', 'type' => 'number'), - '单位时间交付需求规模数' => array('name' => '单位时间交付需求规模数', 'object' => 'project', 'field' => '单位时间交付需求规模数', 'type' => 'number'), - 'closedDate' => array('name' => '关闭日期', 'object' => 'project', 'field' => 'closedDate', 'type' => 'date') + 'projectname' => array('object' => 'project', 'field' => 'projectname', 'type' => 'string'), + 'topprogram' => array('object' => 'project', 'field' => 'topprogram', 'type' => 'string'), + 'estimate' => array('object' => 'project', 'field' => 'estimate', 'type' => 'number'), + 'consumed' => array('object' => 'project', 'field' => 'consumed', 'type' => 'number'), + 'deviation' => array('object' => 'project', 'field' => 'deviation', 'type' => 'number'), + 'deviationrate' => array('object' => 'project', 'field' => 'deviationrate', 'type' => 'number'), + 'finishedstorys' => array('object' => 'project', 'field' => 'deviationrate', 'type' => 'string'), + 'finishedstorysmate' => array('object' => 'project', 'field' => 'finishedstorysmate', 'type' => 'number'), + 'demandsizesperunittime' => array('object' => 'project', 'field' => 'demandsizesperunittime', 'type' => 'number'), + 'closeddate' => array('object' => 'project', 'field' => 'closeddate', 'type' => 'date') + ), + 'langs' => array + ( + 'projectname' => array('zh-cn' => '项目名称', 'zh-tw' => '项目名称', 'en' => 'projectname'), + 'topprogram' => array('zh-cn' => '一级项目集', 'zh-tw' => '一级项目集', 'en' => 'topprogram'), + 'estimate' => array('zh-cn' => '预计工时', 'zh-tw' => '预计工时', 'en' => 'estimate'), + 'consumed' => array('zh-cn' => '消耗工时', 'zh-tw' => '消耗工时', 'en' => 'consumed'), + 'deviation' => array('zh-cn' => '工时偏差', 'zh-tw' => '工时偏差', 'en' => 'deviation'), + 'deviationrate' => array('zh-cn' => '工时偏差率', 'zh-tw' => '工时偏差率', 'en' => 'deviationrate'), + 'finishedstorys' => array('zh-cn' => '完成需求数', 'zh-tw' => '完成需求数', 'en' => 'finishedstorys'), + 'finishedstorysmate' => array('zh-cn' => '完成需求规模数', 'zh-tw' => '完成需求规模数', 'en' => 'finishedstorysmate'), + 'demandsizesperunittime' => array('zh-cn' => '单位时间交付需求规模数', 'zh-tw' => '单位时间交付需求规模数', 'en' => 'demandsizesperunittime'), + 'closeddate' => array('zh-cn' => '关闭日期', 'zh-tw' => '关闭日期', 'en' => 'closeddate') ), 'stage' => 'published', 'builtin' => '1' @@ -279,41 +296,58 @@ EOT, ( 'columns' => array ( - array('field' => '研发完成需求数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '研发完成需求规模数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '需求用例数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '用例密度', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '用例覆盖率', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => 'Bug数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '有效Bug数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '优先级为1,2的Bug数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => 'Bug密度', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => '修复Bug数', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), - array('field' => 'Bug修复率', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow') + array('field' => 'exfixedstorys', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'exfixedstorysmate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'storycases', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'casedensity', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'casecoveragerate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'bugs', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'effectivebugs', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'pri12bugs', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'bugdensity', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'fixedbugs', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow'), + array('field' => 'fixedbugsrate', 'stat' => 'sum', 'slice' => 'noSlice', 'showMode' => 'default', 'monopolize' => '0', 'showTotal' => 'noShow') ), 'columnTotal' => 'noShow', - 'group1' => '一级项目集', - 'group3' => '产品线', - 'group2' => '产品', + 'group1' => 'topprogram', + 'group2' => 'productline', + 'group3' => 'product', 'lastStep' => '4' ), 'filters' => array(), 'fields' => array ( - 'product' => array('name' => '产品', 'object' => 'story', 'field' => '产品', 'type' => 'string'), - 'topprogram' => array('name' => '一级项目集', 'object' => 'story', 'field' => '一级项目集', 'type' => 'string'), - 'productline' => array('name' => '产品线', 'object' => 'story', 'field' => '产品线', 'type' => 'string'), - 'exfixedstorys' => array('name' => '研发完成需求数', 'object' => 'story', 'field' => '研发完成需求数', 'type' => 'string'), - 'exfixedstorysmate' => array('name' => '研发完成需求规模数', 'object' => 'story', 'field' => '研发完成需求规模数', 'type' => 'number'), - 'storycases' => array('name' => '需求用例数', 'object' => 'story', 'field' => '需求用例数', 'type' => 'string'), - 'casedensity' => array('name' => '用例密度', 'object' => 'story', 'field' => '用例密度', 'type' => 'number'), - 'casecoveragerate' => array('name' => '用例覆盖率', 'object' => 'story', 'field' => '用例覆盖率', 'type' => 'number'), - 'bugs' => array('name' => 'Bug数', 'object' => 'story', 'field' => 'Bug数', 'type' => 'string'), - 'effectviebugs' => array('name' => '有效Bug数', 'object' => 'story', 'field' => '有效Bug数', 'type' => 'number'), - 'pri12bugs' => array('name' => '优先级为1,2的Bug数', 'object' => 'story', 'field' => '优先级为1,2的Bug数', 'type' => 'number'), - 'bugdensity' => array('name' => 'Bug密度', 'object' => 'story', 'field' => 'Bug密度', 'type' => 'number'), - 'fixedbugs' => array('name' => '修复Bug数', 'object' => 'story', 'field' => '修复Bug数', 'type' => 'number'), - 'fixedbugsrate' => array('name' => 'Bug修复率', 'object' => 'story', 'field' => 'Bug修复率', 'type' => 'number') + 'product' => array('object' => 'story', 'field' => 'product', 'type' => 'string'), + 'topprogram' => array('object' => 'story', 'field' => 'topprogram', 'type' => 'string'), + 'productline' => array('object' => 'story', 'field' => 'productline', 'type' => 'string'), + 'exfixedstorys' => array('object' => 'story', 'field' => 'exfixedstorys', 'type' => 'string'), + 'exfixedstorysmate' => array('object' => 'story', 'field' => 'exfixedstorysmate', 'type' => 'number'), + 'storycases' => array('object' => 'story', 'field' => 'storycases', 'type' => 'string'), + 'casedensity' => array('object' => 'story', 'field' => 'casedensity', 'type' => 'number'), + 'casecoveragerate' => array('object' => 'story', 'field' => 'casecoveragerate', 'type' => 'number'), + 'bugs' => array('object' => 'story', 'field' => 'bugs', 'type' => 'string'), + 'effectivebugs' => array('object' => 'story', 'field' => 'effectviebugs', 'type' => 'number'), + 'pri12bugs' => array('object' => 'story', 'field' => 'pri12bugs', 'type' => 'number'), + 'bugdensity' => array('object' => 'story', 'field' => 'bugdensity', 'type' => 'number'), + 'fixedbugs' => array('object' => 'story', 'field' => 'fixedbugs', 'type' => 'number'), + 'fixedbugsrate' => array('object' => 'story', 'field' => 'fixedbugsrate', 'type' => 'number') + ), + 'langs' => array + ( + 'product' => array('zh-cn' => '产品', 'zh-tw' => '产品', 'en' => 'product'), + 'topprogram' => array('zh-cn' => '一级项目集', 'zh-tw' => '一级项目集', 'en' => 'topprogram'), + 'productline' => array('zh-cn' => '产品线', 'zh-tw' => '产品线', 'en' => 'productline'), + 'exfixedstorys' => array('zh-cn' => '研发完成需求数', 'zh-tw' => '研发完成需求数', 'en' => 'exfixedstorys'), + 'exfixedstorysmate' => array('zh-cn' => '研发完成需求规模数', 'zh-tw' => '研发完成需求规模数', 'en' => 'exfixedstorysmate'), + 'storycases' => array('zh-cn' => '需求用例数', 'zh-tw' => '需求用例数', 'en' => 'storycases'), + 'casedensity' => array('zh-cn' => '用例密度', 'zh-tw' => '用例密度', 'en' => 'casedensity'), + 'casecoveragerate' => array('zh-cn' => '用例覆盖率', 'zh-tw' => '用例覆盖率', 'en' => 'casecoveragerate'), + 'bugs' => array('zh-cn' => 'Bug数', 'zh-tw' => 'Bug数', 'en' => 'bugs'), + 'effectivebugs' => array('zh-cn' => '有效Bug数', 'zh-tw' => '有效Bug数', 'en' => 'effectviebugs'), + 'pri12bugs' => array('zh-cn' => '优先级为1,2的Bug数', 'zh-tw' => '优先级为1,2的Bug数', 'en' => 'pri12bugs'), + 'bugdensity' => array('zh-cn' => 'Bug密度', 'zh-tw' => 'Bug密度', 'en' => 'bugdensity'), + 'fixedbugs' => array('zh-cn' => '修复Bug数', 'zh-tw' => '修复Bug数', 'en' => 'fixedbugs'), + 'fixedbugsrate' => array('zh-cn' => 'Bug修复率', 'zh-tw' => 'Bug修复率', 'en' => 'fixedbugsrate') ), 'stage' => 'published', 'builtin' => '1'