IP : 18.191.67.117Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
../
var/
softaculous/
bagisto/
../
./
ampache/
../
pluxml/
../
./
zentao/
zentao.sql/
/
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */;
CREATE TABLE `zt_chart` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `code` varchar(255) NOT NULL DEFAULT '', `driver` enum('mysql','duckdb') NOT NULL DEFAULT 'mysql', `dimension` mediumint(8) unsigned NOT NULL DEFAULT '0', `type` varchar(30) NOT NULL DEFAULT '', `group` varchar(255) NOT NULL DEFAULT '', `dataset` varchar(30) NOT NULL DEFAULT '0', `desc` text, `settings` mediumtext, `filters` mediumtext, `step` tinyint(3) unsigned NOT NULL DEFAULT '0', `fields` mediumtext, `langs` text, `sql` mediumtext, `stage` enum('draft','published') NOT NULL DEFAULT 'draft', `builtin` tinyint(1) unsigned NOT NULL DEFAULT '0', `objects` mediumtext, `createdBy` char(30) NOT NULL DEFAULT '', `createdDate` datetime DEFAULT NULL, `editedBy` varchar(30) NOT NULL DEFAULT '', `editedDate` datetime DEFAULT NULL, `deleted` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20016 ;
-- -- Dumping data for table `zt_chart` --
INSERT INTO `zt_chart` VALUES (1001, '年度总结-登录次数', 'annualSummary_countLogin', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"login","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT sum(t2.login) AS login, `year`, account, realname\nFROM zt_user t1\nLEFT JOIN (SELECT count(1) as login, actor, YEAR(`date`) as ''year'' FROM zt_action GROUP BY actor, `year`) t2 on t1.account = t2.actor\nWHERE t1.deleted = ''0''\nGROUP BY `year`, account, realname', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1002, '年度总结-操作次数', 'annualSummary_countAction', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"allAction","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT sum(t2.allAction) as allAction, `year` , account, realname\nFROM zt_user t1\nLEFT JOIN (SELECT count(1) as allAction, actor, YEAR(`date`) as ''year'' FROM zt_action GROUP BY actor, `year`) t2 on t1.account = t2.actor\nWHERE t1.deleted = ''0''\nGROUP BY `year`, account, realname', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1003, '年度总结-消耗工时', 'annualSummary_consumed', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"consumed","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT ROUND(SUM(t2.consumed)) AS consumed, `year` , t1.account, realname\nFROM zt_user t1\nLEFT JOIN (SELECT sum(consumed) as consumed, account, YEAR(`date`) as ''year'' FROM zt_effort WHERE deleted = ''0'' GROUP BY account, `year` ) t2 on t1.account = t2.account\nWHERE t1.deleted = ''0''\nGROUP BY `year`, t1.account, realname', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1004, '年度总结-待办数', 'annualSummary_countTodo', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"todo","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT sum(t2.todo) AS todo,sum(t2.undone) AS undone,sum(t2.done) AS done,t2.`year`, t1.account, realname, dept\nFROM zt_user t1\nLEFT JOIN (SELECT count(1) AS ''todo'', sum(if((`status` != ''done''), 1, 0)) AS `undone`, sum(if((`status` = ''done''), 1, 0)) AS `done`, account, YEAR(`date`) AS ''year'' FROM zt_todo WHERE deleted = ''0'' GROUP BY account, `year`) t2 on t1.account = t2.account\nWHERE t1.deleted = ''0''\nGROUP BY t2.`year`, t1.account, realname, dept', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1005, '年度总结-贡献数', 'annualSummary_countContributions', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"num","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'select tt.year,tt.actor as account, count(1) as num from (\nSELECT YEAR(t1.date) as `year`, t1.actor, t1.objectType, t1.action\nfrom zt_action t1\nWHERE\n(\n(t1.objectType = ''bug'' AND t1.action in(''resolved'',''opened'',''closed'',''activated'') and (select deleted from zt_bug where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''task'' AND t1.action in(''finished'',''opened'',''closed'',''activated'',''assigned'') and (select deleted from zt_task where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''story'' AND t1.action in(''opened'',''reviewed'',''closed'') and (select deleted from zt_story where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''execution'' AND t1.action in(''opened'',''edited'',''started'',''closed'') and (select deleted from zt_project where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''product'' AND t1.action in(''opened'',''edited'',''closed'') and (select deleted from zt_product where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''case'' AND t1.action in(''opened'',''run'') and (select deleted from zt_case where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''testtask'' AND t1.action in(''opened'',''edited'') and (select deleted from zt_testtask where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''productplan'' AND t1.action in(''opened'') and (select deleted from zt_productplan where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''release'' AND t1.action in(''opened'') and (select deleted from zt_release where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''doc'' AND t1.action in(''created'',''edited'') and (select deleted from zt_doc where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''build'' AND t1.action in(''opened'') and (select deleted from zt_build where id = t1.objectID) = ''0'')\n)\nunion all\nSELECT YEAR(t1.date) as `year`, t1.actor, ''code'' as objectType, t1.action from zt_action t1\nwhere t1.action in (''gitcommited'', ''svncommited'') and t1.objectType = ''task''\n) tt group by actor', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1006, '年度总结-贡献数据', 'annualSummary_contributions', 'mysql', 1, 'bar', '', '0', NULL, '{"xaxis":[{"field":"objectType","name":"\\u5bf9\\u8c61\\u7c7b\\u578b"}],"yaxis":[{"type":"agg","field":"create","agg":"sum","name":"\\u521b\\u5efa","valOrAgg":"sum"},{"type":"value","field":"edit","agg":"sum","name":"\\u7f16\\u8f91","valOrAgg":"sum"}]}', NULL, 0, NULL, NULL, 'SELECT t2.year, t1.dept, t2.account, t2.objectType, t2.create, t2.edit\nFROM zt_user AS t1\nLEFT JOIN\n(SELECT\n YEAR(t1.date) AS `year`, t1.actor AS account, "产品" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_product AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''product'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "需求" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_story AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''story'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "计划" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_productplan AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''productplan'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "发布" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_release AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''release'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "执行" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_project AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''execution'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0'' AND t2.type IN (''sprint'', ''stage'', ''kanban'')\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "任务" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_task AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''task'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, ''Bug'' AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_bug AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''bug'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "版本" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_build AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''build'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "用例" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_case AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''case'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "测试单" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_testtask AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''testtask'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType\nUNION ALL\nSELECT\n YEAR(t1.date) AS `year`, t1.actor, "文档" AS objectType,\n SUM(IF(t1.action = ''opened'', 1, 0)) AS `create`,\n SUM(IF(t1.action = ''edited'', 1, 0)) AS `edit`\nFROM zt_action AS t1\nLEFT JOIN zt_doc AS t2 ON t1.objectID = t2.id\nWHERE t1.objectType = ''doc'' AND t1.action IN (''opened'', ''edited'') AND t2.deleted = ''0''\nGROUP BY `year`, actor, objectType) AS t2 ON t1.account = t2.account\nWHERE t2.account IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1007, '年度总结-能力雷达图', 'annualSummary_capabilityRadar', 'mysql', 1, 'radar', '', '0', NULL, '{"group":[{"field":"dimension","name":"\\u7ef4\\u5ea6"}],"metric":[{"type":"value","field":"num","agg":"value","name":"\\u4ea7\\u54c1\\u7ba1\\u7406","key":"product","valOrAgg":"value"},{"type":"value","field":"num","agg":"value","name":"\\u9879\\u76ee\\u7ba1\\u7406","key":"project","valOrAgg":"value"},{"type":"value","field":"num","agg":"value","name":"\\u7814\\u53d1","key":"dev","valOrAgg":"value"},{"type":"value","field":"num","agg":"value","name":"\\u6d4b\\u8bd5","key":"qa","valOrAgg":"value"},{"type":"value","field":"num","agg":"value","name":"\\u5176\\u4ed6","key":"other","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'select tt.year, tt.actor AS account,tt.dimension, count(1) as num from (\nSELECT YEAR(t1.date) as `year`, t1.actor, ''product'' as dimension\nfrom zt_action t1\nWHERE\n(\n(t1.objectType = ''product'' AND t1.action in(''opened'',''edited'') and (select deleted from zt_product where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''story'' AND t1.action in(''opened'',''reviewed'',''closed'') and (select deleted from zt_story where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''productplan'' AND t1.action in(''opened'') and (select deleted from zt_productplan where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''release'' AND t1.action in(''opened'') and (select deleted from zt_release where id = t1.objectID) = ''0'')\n)\nunion all\nSELECT YEAR(t1.date) as `year`, t1.actor, ''execution'' as dimension\nfrom zt_action t1\nWHERE\n(\n(t1.objectType = ''execution'' AND t1.action in(''opened'',''edited'',''started'',''closed'') and (select deleted from zt_project where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''build'' AND t1.action in(''opened'') and (select deleted from zt_build where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''task'' AND t1.action in(''opened'',''closed'',''activated'',''assigned'') and (select deleted from zt_task where id = t1.objectID) = ''0'')\n)\nunion all\nSELECT YEAR(t1.date) as `year`, t1.actor, ''devel'' as dimension\nfrom zt_action t1\nWHERE\n(\n(t1.objectType = ''execution'' AND t1.action in(''opened'',''edited'',''started'',''closed'') and (select deleted from zt_project where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''build'' AND t1.action in(''opened'') and (select deleted from zt_build where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''task'' AND t1.action in(''opened'',''closed'',''assigned'') and (select deleted from zt_task where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''task'' and t1.action in (''gitcommited'', ''svncommited''))\nOR (t1.objectType = ''bug'' AND t1.action in(''resolved'') and (select deleted from zt_bug where id = t1.objectID) = ''0'')\n)\nunion all\nSELECT YEAR(t1.date) as `year`, t1.actor, ''qa'' as dimension\nfrom zt_action t1\nWHERE\n(\n(t1.objectType = ''bug'' AND t1.action in(''opened'',''closed'',''activated'') and (select deleted from zt_bug where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''case'' AND t1.action in(''opened'',''run'') and (select deleted from zt_case where id = t1.objectID) = ''0'')\nOR (t1.objectType = ''testtask'' AND t1.action in(''opened'',''edited'') and (select deleted from zt_testtask where id = t1.objectID) = ''0'')\n)\n) tt WHERE tt.year != ''0000''\nGROUP BY tt.year, tt.dimension', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1008, '年度总结-迭代数据', 'annualSummary_executions', 'mysql', 1, 'table', '', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u8fed\\u4ee3\\u540d\\u79f0"},{"field":"finishedStory","valOrAgg":"value","name":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570"},{"field":"finishedTask","valOrAgg":"value","name":"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570"},{"field":"resolvedBug","valOrAgg":"value","name":"\\u89e3\\u51b3Bug\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\ntt.id,\ntt.name,\ntt.year,\ntt.account,\ntt.finishedStory,\ntt.finishedTask,\ncount(t3.id) as resolvedBug\nfrom (\nSELECT\ntt.id,\nt2.name,\ntt.year,\ntt.account,\nSUM(if((t1.story != 0), 1 , 0)) as finishedStory,\ncount(t1.id) as finishedTask\nfrom (\nSELECT\n*\nfrom (\nSELECT id, YEAR(begin) as year, openedBy as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(begin) != ''0000''\nunion all\nSELECT id, YEAR(begin) as year, PO as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(begin) != ''0000''\nunion all\nSELECT id, YEAR(begin) as year, PM as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(begin) != ''0000''\nunion all\nSELECT id, YEAR(begin) as year, QD as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(begin) != ''0000''\nunion all\nSELECT id, YEAR(begin) as year, RD as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(begin) != ''0000''\nunion all\nSELECT id, YEAR(end) as year, openedBy as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(end) != ''0000''\nunion all\nSELECT id, YEAR(end) as year, PO as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(end) != ''0000''\nunion all\nSELECT id, YEAR(end) as year, PM as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(end) != ''0000''\nunion all\nSELECT id, YEAR(end) as year, QD as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(end) != ''0000''\nunion all\nSELECT id, YEAR(end) as year, RD as account from zt_project\nWHERE deleted = ''0'' AND type = ''sprint'' and multiple = ''1'' and YEAR(end) != ''0000''\nunion all\nSELECT t1.root as id, YEAR(t1.`join`) as year, t1.account from zt_team t1\nRIGHT JOIN zt_project t2 on t2.id = t1.root and t2.deleted = ''0'' and t2.type = ''sprint''\nWHERE t1.type = ''execution'' and YEAR(t1.`join`) != ''0000''\nunion all\nSELECT t1.execution as id, YEAR(t1.finishedDate) as year, t1.finishedBy as account from zt_task t1\nRIGHT JOIN zt_project t2 on t2.id = t1.execution and t2.deleted = ''0'' and t2.type = ''sprint''\nWHERE t1.deleted = ''0'' and YEAR(t1.finishedDate) != ''0000''\n) tt\nwhere tt.account != ''''\nGROUP BY tt.id, tt.`year`, tt.account\n) tt\nLEFT JOIN zt_task t1 on t1.execution = tt.id and YEAR(t1.finishedDate) = tt.year and t1.deleted = ''0'' and t1.finishedBy = tt.account\nLEFT JOIN zt_project t2 on t2.id = tt.id\nGROUP BY tt.id, tt.`year`, tt.account\n) tt\nLEFT JOIN zt_bug t2 on t2.resolvedBy = tt.account and YEAR(t2.resolvedDate) = tt.year\nleft join zt_build t3 on t2.resolvedBuild = t3.id and t3.execution = tt.id\nWHERE t2.deleted = ''0''\nGROUP BY tt.account, tt.`year`, tt.id', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1009, '年度总结-产品数据', 'annualSummary_products', 'mysql', 1, 'table', '', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u4ea7\\u54c1\\u540d\\u79f0"},{"field":"plan","valOrAgg":"value","name":"\\u8ba1\\u5212\\u6570"},{"field":"requirement","valOrAgg":"value","name":"\\u521b\\u5efa\\u7528\\u6237\\u9700\\u6c42\\u6570"},{"field":"story","valOrAgg":"value","name":"\\u521b\\u5efa\\u9700\\u6c42\\u6570"},{"field":"closedStory","valOrAgg":"value","name":"\\u5173\\u95ed\\u9700\\u6c42\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'select * from (\nselect tt.id, t2.name, tt.year, tt.account, tt.plans, tt.requirement, tt.story, count(t1.id) as closedStory\nfrom(\n select tt.id, tt.year, tt.account, tt.plans,\nsum(if((type = ''requirement''), 1, 0)) as requirement,\nsum(if((type = ''story''), 1, 0)) as story\nfrom (\nselect tt.id, tt.year, tt.account,\ncount(t2.id) as plans\nfrom (\nselect * from (\nselect id, YEAR(createdDate) as `year`, createdBy as account from zt_product\nwhere deleted = ''0'' and shadow = ''0''\nunion all\nselect id, YEAR(createdDate) as `year`, PO as account from zt_product\nwhere deleted = ''0'' and shadow = ''0''\nunion all\nselect id, YEAR(createdDate) as `year`, QD as account from zt_product\nwhere deleted = ''0'' and shadow = ''0''\nunion all\nselect id, YEAR(createdDate) as `year`, RD as account from zt_product\nwhere deleted = ''0'' and shadow = ''0''\n) tt\nWHERE tt.account != '''' and tt.year != ''0000''\nGROUP BY tt.account, tt.year, tt.id\n) tt\nLEFT JOIN zt_productplan t1 on t1.product = tt.id\nLEFT JOIN zt_action t2 on t1.id = t2.objectID and YEAR(t2.date) = tt.year\nand t2.objectType = ''productplan''\nand t1.deleted = ''0''\nand t2.actor = tt.account\nand t2.action = ''opened''\nGROUP BY tt.account, tt.year, tt.id) tt\nLEFT JOIN zt_story t1 on t1.product = tt.id and YEAR(t1.openedDate) = tt.year and t1.openedBy = tt.account and t1.deleted = ''0''\nGROUP BY tt.account, tt.year, tt.id) tt\nLEFT JOIN zt_story t1 on t1.product = tt.id and YEAR(t1.closedDate) = tt.year and t1.closedBy = tt.account and t1.deleted = ''0''\nLEFT JOIN zt_product t2 on t2.id = tt.id\nGROUP BY tt.account, tt.year, tt.id) tt\nWHERE tt.account = ''zhangpeng''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1010, '年度总结-任务状态分布', 'annualSummary_taskStatus', 'mysql', 1, 'pie', '', '0', NULL, '{"group":[{"field":"status","name":"\\u72b6\\u6001"}],"metric":[{"type":"agg","field":"id","agg":"count","name":"\\u4efb\\u52a1\\u6570","valOrAgg":"count"}]}', NULL, 0, NULL, NULL, 'SELECT\nYEAR(t1.date) AS `year`,\nt3.account,\nt3.realname,\nCASE t2.status\nWHEN ''wait'' THEN "未开始"\nWHEN ''doing'' THEN "进行中"\nWHEN ''done'' THEN "已完成"\nWHEN ''closed'' THEN "已关闭"\nELSE "未设置" END status,\nt1.id\nFROM zt_action t1\nLEFT JOIN zt_task t2 on t1.objectID=t2.id RIGHT JOIN zt_user t3 on t1.actor=t3.account\nWHERE t1.objectType = ''task''\nand t2.deleted = ''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1011, '年度总结-每月任务操作情况', 'annualSummary_monthlyTaskAction', 'mysql', 1, 'bar', '', '0', NULL, '{"xaxis":[{"field":"actionDate","name":"\\u65e5\\u671f","group":"value"}],"yaxis":[{"type":"agg","field":"opened","agg":"sum","name":"\\u521b\\u5efa","valOrAgg":"sum"},{"type":"agg","field":"started","agg":"sum","name":"\\u5f00\\u59cb","valOrAgg":"sum"},{"type":"agg","field":"finished","agg":"sum","name":"\\u5b8c\\u6210","valOrAgg":"sum"},{"type":"agg","field":"paused","agg":"sum","name":"\\u6682\\u505c","valOrAgg":"sum"},{"type":"agg","field":"activated","agg":"sum","name":"\\u6fc0\\u6d3b","valOrAgg":"sum"},{"type":"agg","field":"canceled","agg":"sum","name":"\\u53d6\\u6d88","valOrAgg":"sum"},{"type":"agg","field":"closed","agg":"sum","name":"\\u5173\\u95ed","valOrAgg":"sum"}]}', NULL, 0, NULL, NULL, 'SELECT t2.opened,t2.started,t2.finished,t2.paused,t2.activated,t2.canceled,t2.closed,t1.account,t2.actionDate,YEAR(CONCAT(t2.actionDate, ''-01'')) AS `year`,realname,t3.`name` AS deptName FROM zt_user AS t1\nLEFT JOIN (\n SELECT t21.actor,LEFT(t21.`date`,7) AS actionDate,\n SUM(if(t21.action = ''opened'', 1, 0)) as opened,\n SUM(if(t21.action = ''started'', 1, 0)) as started,\n SUM(if(t21.action = ''finished'', 1, 0)) as finished,\n SUM(if(t21.action = ''paused'', 1, 0)) as paused,\n SUM(if(t21.action = ''activated'', 1, 0)) as activated,\n SUM(if(t21.action = ''canceled'', 1, 0)) as canceled,\n SUM(if(t21.action = ''closed'', 1, 0)) as closed FROM zt_action AS t21\n LEFT JOIN zt_story AS t22 ON t21.objectID=t22.id\n WHERE t21.objectType=''bug''\n AND t22.deleted=''0''\n GROUP BY t21.actor,actionDate\n) AS t2 ON t1.account=t2.actor\nLEFT JOIN zt_dept AS t3 ON t1.dept=t3.id\nWHERE t1.deleted=''0''\nAND t2.actor IS NOT NULL\nGROUP BY t2.actionDate,deptName,t1.account,realname\n', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1012, '年度总结-需求状态分布', 'annualSummary_storyStatus', 'mysql', 1, 'pie', '', '0', NULL, '{"group":[{"field":"status","name":"\\u72b6\\u6001"}],"metric":[{"type":"agg","field":"id","agg":"count","name":"\\u9700\\u6c42\\u6570","valOrAgg":"count"}]}', NULL, 0, NULL, NULL, 'SELECT\nYEAR(t1.date) AS `year`,\nt3.account,\nt3.realname,\nCASE t2.status\nWHEN ''wait'' THEN "未开始"\nWHEN ''doing'' THEN "进行中"\nWHEN ''done'' THEN "已完成"\nWHEN ''colsed'' THEN "已关闭"\nELSE "未设置"\nEND status,\nt1.id\nFROM zt_action t1\nLEFT JOIN zt_task t2 on t1.objectID=t2.id RIGHT JOIN zt_user t3 on t1.actor=t3.account\nWHERE t1.objectType = ''story''\nand t2.deleted = ''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1013, '年度总结-每月需求操作情况', 'annualSummary_monthlyStoryAction', 'mysql', 1, 'bar', '', '0', NULL, '{"xaxis":[{"field":"actionDate","name":"\\u65e5\\u671f","group":"value"}],"yaxis":[{"type":"value","field":"opened","agg":"value","name":"\\u521b\\u5efa","valOrAgg":"value"},{"type":"value","field":"activated","agg":"value","name":"\\u6fc0\\u6d3b","valOrAgg":"value"},{"type":"value","field":"changed","agg":"value","name":"\\u53d8\\u66f4","valOrAgg":"value"},{"type":"value","field":"closed","agg":"value","name":"\\u5173\\u95ed","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'SELECT t2.opened,t2.activated,t2.closed,t2.`changed`,t1.account,t2.actionDate,YEAR(CONCAT(t2.actionDate,''-01'')) AS `year`,realname,t3.`name` AS deptName FROM zt_user AS t1\nLEFT JOIN (\n SELECT t21.actor,LEFT(t21.`date`, 7) AS actionDate,\n SUM(IF(t21.action=''opened'',1,0)) AS opened,\n SUM(IF(t21.action=''activated'',1,0)) AS activated,\n SUM(IF(t21.action=''closed'',1,0)) AS closed,\n SUM(IF(t21.action=''changed'',1,0)) AS `changed` FROM zt_action AS t21\n LEFT JOIN zt_story AS t22 ON t21.objectID=t22.id\n WHERE t21.objectType=''story''\n AND t22.deleted=''0''\n GROUP BY t21.actor,actionDate\n) AS t2 ON t1.account=t2.actor\nLEFT JOIN zt_dept AS t3 ON t1.dept=t3.id\nWHERE t1.deleted=''0''\nAND t2.actor IS NOT NULL\nGROUP BY t2.actionDate,deptName,t1.account,realname\n', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1014, '年度总结-Bug状态分布', 'annualSummary_bugStatus', 'mysql', 1, 'pie', '', '0', NULL, '{"group":[{"field":"status","name":"\\u72b6\\u6001"}],"metric":[{"type":"agg","field":"id","agg":"count","name":"Bug\\u6570","valOrAgg":"count"}]}', NULL, 0, NULL, NULL, 'SELECT\nYEAR(t1.date) AS `year`, t3.account,\nt3.realname,\nCASE t2.status\nWHEN ''wait'' THEN "未开始"\nWHEN ''doing'' THEN "进行中"\nWHEN ''done'' THEN "已完成"\nWHEN ''closed'' THEN "已关闭"\nELSE "未设置"\nEND status,\nt1.id\nFROM zt_action t1\nLEFT JOIN zt_task t2 on t1.objectID=t2.id RIGHT JOIN zt_user t3 on t1.actor=t3.account\nWHERE t1.objectType = ''bug''\nand t2.deleted = ''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1015, '年度总结-每月Bug操作情况', 'annualSummary_monthlyBugAction', 'mysql', 1, 'bar', '', '0', NULL, '{"xaxis":[{"field":"actionDate","name":"\\u65e5\\u671f","group":"value"}],"yaxis":[{"type":"value","field":"opened","agg":"value","name":"\\u521b\\u5efa","valOrAgg":"value"},{"type":"value","field":"bugconfirmed","agg":"value","name":"\\u786e\\u8ba4","valOrAgg":"value"},{"type":"value","field":"activated","agg":"value","name":"\\u6fc0\\u6d3b","valOrAgg":"value"},{"type":"value","field":"resolved","agg":"value","name":"\\u89e3\\u51b3","valOrAgg":"value"},{"type":"value","field":"closed","agg":"value","name":"\\u5173\\u95ed","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'SELECT t2.opened,t2.bugconfirmed,t2.activated,t2.resolved,t2.closed,t1.account,t2.actionDate,YEAR(CONCAT(t2.actionDate, ''-01'')) AS\n`year`,realname,t3.`name` AS deptName FROM zt_user AS t1\nLEFT JOIN (\n SELECT t21.actor,LEFT(t21.`date`, 7) AS actionDate,\n SUM(IF(t21.action=''opened'',1,0)) AS opened,\n SUM(IF(t21.action=''bugconfirmed'',1,0)) AS bugconfirmed,\n SUM(IF(t21.action=''activated'',1,0)) AS activated,\n SUM(IF(t21.action=''resolved'',1,0)) AS resolved,\n SUM(IF(t21.action=''closed'',1,0)) AS closed FROM zt_action AS t21\n LEFT JOIN zt_story AS t22 ON t21.objectID=t22.id\n WHERE t21.objectType=''bug''\n AND t22.deleted=''0''\n GROUP BY t21.actor,actionDate\n) AS t2 ON t1.account=t2.actor\nLEFT JOIN zt_dept AS t3 ON t1.dept=t3.id\nWHERE t1.deleted=''0''\nAND t2.actor IS NOT NULL\nGROUP BY t2.actionDate,deptName,t1.account,realname', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1016, '年度总结-用例结果分布', 'annualSummary_caseResult', 'mysql', 1, 'pie', '', '0', NULL, '{"group":[{"field":"status","name":"\\u72b6\\u6001"}],"metric":[{"type":"agg","field":"id","agg":"count","name":"\\u4e2a\\u6570","valOrAgg":"count"}]}', NULL, 0, NULL, NULL, 'SELECT count ,t2.caseResult as status,t2.`year`, t1.account, realname, dept\nFROM zt_user t1\nLEFT JOIN (\n SELECT t21.lastRunner, YEAR(t21.`date`) as ''year'', t21.caseResult, count(distinct t21.`id`) as count\n FROM zt_testresult t21\n LEFT JOIN zt_case t22 on t21.case = t22.id\n WHERE t22.deleted = ''0''\n GROUP BY t21.lastRunner, `year`, t21.caseResult\n) t2 on t1.account = t2.lastRunner\nWHERE t1.deleted = ''0''\nGROUP BY t2.caseResult,t2.`year`, t1.account, realname, dept', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1017, '年度总结-每月用例操作情况', 'annualSummary_monthlyCaseAction', 'mysql', 1, 'bar', '', '0', NULL, '{"xaxis":[{"field":"actionDate","name":"\\u65e5\\u671f","group":"value"}],"yaxis":[{"type":"value","field":"createdCases","agg":"value","name":"\\u521b\\u5efa","valOrAgg":"value"},{"type":"value","field":"toBugCases","agg":"value","name":"\\u8f6cBug","valOrAgg":"value"},{"type":"value","field":"runCases","agg":"value","name":"\\u6267\\u884c","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'SELECT SUM(createdCases) AS createdCases, SUM(toBugCases) AS toBugCases, SUM(runCases) AS runCases, YEAR(CONCAT(t2.actionDate, ''-01'')) AS `year`, t1.account, realname, dept\nFROM zt_user t1\nLEFT JOIN (\n SELECT t21.actor, LEFT(t21.`date`, 7) as actionDate,\n SUM(IF((t22.id IS NOT NULL AND t23.id IS NULL), 1, 0)) AS createdCases,\n SUM(IF((t22.id IS NOT NULL AND t23.id IS NOT NULL), 1, 0)) AS toBugCases,\n SUM(IF((t24.lastRunner = t21.actor AND t21.action = ''run'' AND t21.`date` = t24.`date`), 1, 0)) AS runCases\n FROM zt_action t21\n LEFT JOIN zt_case t22 on t21.objectID = t22.id\n LEFT JOIN zt_bug t23 on t22.id = t23.case\n LEFT JOIN zt_testresult t24 on t22.id = t24.`case` AND t24.lastRunner = t21.actor AND t21.action = ''run'' AND t21.`date` = t24.`date`\n WHERE t21.objectType = ''case''\n AND t21.action in (''opened'', ''run'')\n AND t22.deleted = ''0''\n AND (t23.deleted = ''0'' OR t23.id IS NULL)\n GROUP BY t21.actor, actionDate\n) t2 on t1.account = t2.actor\nWHERE t1.deleted = ''0''\nAND t2.actor is not null\nGROUP BY t2.actionDate, t1.account, realname, dept', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1018, '宏观数据-一级项目集个数', 'macro_countTopProgram', 'mysql', 1, 'card', '45', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id,name FROM zt_project WHERE type=''program'' AND parent=0 AND deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1019, '宏观数据-项目个数', 'macro_countProject', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE type=''project'' AND deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1020, '宏观数据-产品个数', 'macro_countProduct', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_product WHERE deleted=''0'' AND shadow = ''0'' AND vision = ''rnd''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1021, '宏观数据-计划个数', 'macro_countPlan', 'mysql', 1, 'card', '48', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_productplan WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1022, '宏观数据-执行个数', 'macro_countExecution', 'mysql', 1, 'card', '40', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE type IN (''sprint'',''stage'',''kanban'') AND deleted=''0'' AND multiple = ''1''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1023, '宏观数据-发布个数', 'macro_countRelease', 'mysql', 1, 'card', '37', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_release WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1024, '宏观数据-需求个数', 'macro_countStory', 'mysql', 1, 'card', '36', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_story WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1025, '宏观数据-任务个数', 'macro_countTask', 'mysql', 1, 'card', '39', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_task WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1026, '宏观数据-缺陷个数', 'macro_countBug', 'mysql', 1, 'card', '44', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_bug WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1027, '宏观数据-文档个数', 'macro_countDoc', 'mysql', 1, 'card', '54', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_doc WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1028, '宏观数据-现有人员个数', 'macro_activeAccounts', 'mysql', 1, 'card', '41', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_user WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1029, '宏观数据-累计消耗工时', 'macro_consumed', 'mysql', 1, 'card', '41', '0', NULL, '{"value":{"type":"agg","field":"consumed","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT consumed FROM zt_effort WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1030, '宏观数据-禅道使用时长', 'macro_useZentao', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"value","field":"period","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, ' SELECT if(t2.`year` > 0, concat(t2.`year`, ''年'', t2.`day`, ''天''), concat(t2.`day`, ''天'')) as period from (\nSELECT TIMESTAMPDIFF(YEAR,t1.firstDay,t1.today) AS `year`,DATEDIFF(DATE_SUB(t1.today,INTERVAL TIMESTAMPDIFF(YEAR,t1.firstDay,t1.today) YEAR), t1.firstDay) AS `day`\nFROM (SELECT `value` AS firstDay, now() AS today FROM zt_config WHERE `owner` = ''system'' AND `key` = ''installedDate'') AS t1\n) t2', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1031, '宏观数据-需求完成率', 'macro_storyFinishedRate', 'mysql', 1, 'waterpolo', '36', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"bugstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"\\u7f16\\u53f7","object":"story","field":"id","type":"number"},"bugstatus":{"name":"bugstatus","object":"story","field":"bugstatus","type":"string"}}', '{"id":{"zh-cn":"\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"bugstatus":{"zh-cn":"Bug\\u72b6\\u6001","zh-tw":"","en":"bugstatus","de":"","fr":""}}', 'SELECT id, IF(closedReason=''done'', ''done'', ''undone'') AS bugstatus FROM zt_story WHERE deleted=''0'' AND (status != ''closed'' OR closedReason=''done'')', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1032, '宏观数据-Bug修复率', 'macro_bugFixedRate', 'mysql', 1, 'waterpolo', '44', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"bugstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"Bug\\u7f16\\u53f7","object":"bug","field":"id","type":"number"},"bugstatus":{"name":"bugstatus","object":"bug","field":"bugstatus","type":"string"}}', '{"id":{"zh-cn":"Bug\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"bugstatus":{"zh-cn":"Bug\\u72b6\\u6001","zh-tw":"","en":"bugstatus","de":"","fr":""}}', 'SELECT id, IF(`status`=''closed'' AND resolution=''fixed'', ''done'', ''undone'') AS bugstatus FROM zt_bug WHERE deleted=''0'' AND (status = ''active'' OR resolution in (''fixed'', ''postponed''))', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1033, '宏观数据-未完成的一级项目集个数', 'macro_countTopProgram_undone', 'mysql', 1, 'card', '45', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE type=''program'' AND `status`!=''closed'' AND deleted=''0'' AND grade=''1''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1034, '宏观数据-未完成的需求', 'macro_countStory_undone', 'mysql', 1, 'card', '36', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_story WHERE `status`!=''closed'' AND deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1035, '宏观数据-未完成的产品', 'macro_countProduct_undone', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_product WHERE `status`!=''closed'' AND deleted=''0'' AND shadow=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1036, '宏观数据-未完成的项目', 'macro_countProject_undone', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE type=''project'' AND `status`!=''closed'' AND deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1037, '宏观数据-未完成的计划', 'macro_countPlan_undone', 'mysql', 1, 'card', '48', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM (SELECT id,deleted FROM zt_productplan WHERE NOT ((`status`=''closed'' AND closedReason=''done'') OR `status`=''done'')) AS plan WHERE plan.deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1038, '宏观数据-未完成的执行', 'macro_countExecution_undone', 'mysql', 1, 'card', '40', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE type IN (''sprint'',''stage'',''kanban'') AND `status`!=''closed'' AND deleted=''0'' AND multiple = ''1''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1039, '宏观数据-未完成的缺陷', 'macro_countBug_undone', 'mysql', 1, 'card', '44', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_bug WHERE `status`!=''closed'' AND deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1040, '宏观数据-未完成的任务', 'macro_countTask_undone', 'mysql', 1, 'card', '39', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM (SELECT id,deleted FROM zt_task WHERE `status` NOT IN (''closed'',''cancel'',''done'')) AS task WHERE task.deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1041, '宏观数据-项目集数据概览', 'macro_programOverview', 'mysql', 1, 'table', '64', '0', NULL, '{"group":[],"column":[{"field":"topProgram","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"subProgram","valOrAgg":"value","name":"\\u5b50\\u9879\\u76ee\\u96c6\\u6570"},{"field":"product","valOrAgg":"value","name":"\\u4ea7\\u54c1\\u6570"},{"field":"story","valOrAgg":"value","name":"\\u7814\\u53d1\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"},{"field":"project","valOrAgg":"value","name":"\\u9879\\u76ee\\u6570"},{"field":"execution","valOrAgg":"value","name":"\\u6267\\u884c\\u6570"},{"field":"task","valOrAgg":"value","name":"\\u4efb\\u52a1\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.name AS topProgram,\n IFNULL(t2.subProgram, 0) AS subProgram,\n COUNT(DISTINCT t3.id) AS product,\n SUM(IFNULL(t4.story, 0)) AS story,\n SUM(IFNULL(t5.`release`, 0)) AS "release",\n SUM(IFNULL(t6.bug, 0)) AS bug,\n IFNULL(t7.project, 0) AS project,\n IFNULL(t7.execution, 0) AS execution,\n IFNULL(t7.task, 0) AS task\nFROM zt_project AS t1\nLEFT JOIN (SELECT SUBSTR(path, 2, POSITION('','' IN SUBSTR(path, 2)) -1) AS topProgram, COUNT(1) AS subProgram FROM zt_project WHERE deleted = ''0'' AND type = ''program'' AND grade > 1 GROUP BY topProgram) AS t2 ON t1.id = t2.topProgram\nLEFT JOIN zt_product AS t3 ON t1.id = t3.program AND t3.deleted = ''0'' AND t3.shadow = ''0'' AND t3.vision = ''rnd''\nLEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' GROUP BY product) AS t4 ON t3.id = t4.product\nLEFT JOIN (SELECT product, COUNT(1) AS "release" FROM zt_release WHERE deleted = ''0'' GROUP BY product) AS t5 ON t3.id = t5.product\nLEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' GROUP BY product) AS t6 ON t3.id = t6.product\nLEFT JOIN (\n SELECT t1.topProgram, COUNT(DISTINCT t1.project) AS project, SUM(t2.task) AS task, SUM(t3.execution) AS execution\n FROM (SELECT SUBSTR(path, 2, POSITION('','' IN SUBSTR(path, 2)) -1) AS topProgram, id AS project FROM zt_project WHERE deleted = ''0'' AND type = ''project'') AS t1\n LEFT JOIN (SELECT COUNT(1) AS task, project FROM zt_task WHERE deleted = ''0'' GROUP BY project) AS t2 ON t1.project = t2.project\n LEFT JOIN (SELECT COUNT(1) AS execution,project FROM zt_project WHERE deleted = ''0'' AND type IN (''sprint'', ''stage'', ''kanban'') GROUP BY project) AS t3 ON t1.project = t3.project\n GROUP BY t1.topProgram\n) AS t7 ON t1.id = t7.topProgram\nWHERE t1.deleted = ''0'' AND t1.type = ''program'' AND t1.grade = 1\nGROUP BY t1.name', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1042, '宏观数据-项目集需求完成率与Bug修复率', 'macro_programStoryFinishedRateAndBugFixedRate', 'mysql', 1, 'cluBarY', '45', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"topProgram","name":"topProgram","group":""}],"yaxis":[{"field":"storyDoneRate","name":"storyDoneRate","valOrAgg":"sum"},{"field":"bugSolvedRate","name":"bugSolvedRate","valOrAgg":"sum"}]}]', NULL, 0, '{"topProgram":{"name":"topProgram","object":"bug","field":"topProgram","type":"string"},"doneStory":{"name":"doneStory","object":"bug","field":"doneStory","type":"number"},"allStory":{"name":"allStory","object":"bug","field":"allStory","type":"number"},"storyDoneRate":{"name":"storyDoneRate","object":"bug","field":"storyDoneRate","type":"number"},"solvedBug":{"name":"solvedBug","object":"bug","field":"solvedBug","type":"number"},"allBug":{"name":"allBug","object":"bug","field":"allBug","type":"number"},"bugSolvedRate":{"name":"bugSolvedRate","object":"bug","field":"bugSolvedRate","type":"number"}}', '{"topProgram":{"zh-cn":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","zh-tw":"","en":"topProgram","de":"","fr":""},"doneStory":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"","en":"doneStory","de":"","fr":""},"allStory":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"","en":"allStory","de":"","fr":""},"storyDoneRate":{"zh-cn":"\\u9700\\u6c42\\u5b8c\\u6210\\u7387","zh-tw":"","en":"storyDoneRate","de":"","fr":""},"solvedBug":{"zh-cn":"\\u89e3\\u51b3bug\\u6570","zh-tw":"","en":"solvedBug","de":"","fr":""},"allBug":{"zh-cn":"bug\\u6570","zh-tw":"","en":"allBug","de":"","fr":""},"bugSolvedRate":{"zh-cn":"bug\\u4fee\\u590d\\u7387","zh-tw":"","en":"bugSolvedRate","de":"","fr":""}}', 'SELECT\n t1.name AS topProgram,\n SUM(IFNULL(t3.doneStory,0)) as doneStory,\n SUM(IFNULL(t4.allStory,0)) as allStory,\n CONVERT(IF(SUM(IFNULL(t4.allStory,0)) <= 0, 0, SUM(IFNULL(t3.doneStory,0)) / SUM(IFNULL(t4.allStory,0))*100), decimal(10,2)) as storyDoneRate,\n SUM(IFNULL(t5.solvedBug,0)) as solvedBug,\n SUM(IFNULL(t6.allBug,0)) as allBug,\n CONVERT(IF(SUM(IFNULL(t6.allBug,0)) <= 0, 0, SUM(IFNULL(t5.solvedBug,0)) / SUM(IFNULL(t6.allBug,0))*100), decimal(10,2)) as bugSolvedRate\nFROM zt_project AS t1\nLEFT JOIN zt_product AS t2 ON t1.id = t2.program\nLEFT JOIN (SELECT COUNT(1) as doneStory, product FROM zt_story WHERE deleted = ''0'' AND closedReason = ''done'' AND status = ''closed'' GROUP BY product) AS t3 ON t2.id = t3.product\nLEFT JOIN (SELECT COUNT(1) as allStory, product FROM zt_story WHERE deleted = ''0'' AND ((closedReason = ''done'' AND status = ''closed'') OR status != ''closed'') GROUP BY product) AS t4 ON t2.id = t4.product\nLEFT JOIN (SELECT COUNT(1) as solvedBug, product FROM zt_bug WHERE deleted = ''0'' AND resolution = ''fixed'' AND status = ''closed'' GROUP BY product) AS t5 ON t2.id = t5.product\nLEFT JOIN (SELECT COUNT(1) as allBug, product FROM zt_bug WHERE deleted = ''0'' AND (resolution in (''fixed'', ''postponed'') OR status = ''active'') GROUP BY product) AS t6 ON t2.id = t6.product\nWHERE t1.type = ''program'' AND t1.grade = 1 AND t1.deleted = ''0''\nAND t2.deleted = ''0''\nGROUP BY t1.name\nORDER BY t1.`order` DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1043, '宏观数据-公司项目集状态分布', 'macro_programStatus', 'mysql', 1, 'pie', '45', '0', NULL, '[{"type":"pie","group":[{"field":"status","name":"\\u72b6\\u6001","group":""}],"metric":[{"field":"id","name":"\\u9879\\u76eeID","valOrAgg":"count"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""}}', 'SELECT id, CASE `status` WHEN ''wait'' then ''未开始'' WHEN ''doing'' THEN ''进行中'' WHEN ''suspended'' THEN ''已挂起'' ELSE ''已关闭'' END status FROM zt_project WHERE type = ''program'' AND grade = 1 AND deleted = ''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1044, '宏观数据-公司项目状态分布', 'macro_projectStatus', 'mysql', 1, 'pie', '38', '0', NULL, '[{"type":"pie","group":[{"field":"status","name":"\\u72b6\\u6001","group":""}],"metric":[{"field":"id","name":"\\u9879\\u76eeID","valOrAgg":"count"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""}}', 'SELECT id, CASE `status` WHEN ''wait'' then ''未开始'' WHEN ''doing'' THEN ''进行中'' WHEN ''suspended'' THEN ''已挂起'' ELSE ''已关闭'' END status FROM zt_project WHERE type = ''project'' AND deleted = ''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1045, '宏观数据-产品数据概览', 'macro_productOverview', 'mysql', 1, 'table', '63', '0', NULL, '{"group":[],"column":[{"field":"program","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"productLine","valOrAgg":"value","name":"\\u4ea7\\u54c1\\u7ebf"},{"field":"product","valOrAgg":"value","name":"\\u4ea7\\u54c1"},{"field":"story","valOrAgg":"value","name":"\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"},{"field":"plan","valOrAgg":"value","name":"\\u8ba1\\u5212\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.name AS product,\n IFNULL(t2.name, ''/'') AS program,\n IFNULL(t3.name, ''/'') AS productLine,\n IFNULL(t4.plan, 0) AS plan,\n IFNULL(t5.release, 0) AS `release`,\n IFNULL(t6.story, 0) AS story,\n IFNULL(t7.bug, 0) AS bug\nFROM\n zt_product AS t1\n LEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = ''program'' AND t2.grade = 1\n LEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = ''line''\n LEFT JOIN (SELECT product, COUNT(1) AS plan FROM zt_productplan WHERE deleted = ''0'' GROUP BY product) AS t4 ON t1.id = t4.product\n LEFT JOIN (SELECT product, COUNT(1) AS `release` FROM zt_release WHERE deleted = ''0'' GROUP BY product) AS t5 ON t1.id = t5.product\n LEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' GROUP BY product) AS t6 ON t1.id = t6.product\n LEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' GROUP BY product) AS t7 ON t1.id = t7.product\nWHERE t1.deleted = ''0'' AND t1.status != ''closed'' AND t1.shadow = ''0''AND t1.vision = ''rnd''\nORDER BY t1.order', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0); INSERT INTO `zt_chart` VALUES (1046, '宏观数据-产品需求完成率', 'macro_productStoryFinishedRate', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"\\u6240\\u5c5e\\u4ea7\\u54c1","group":""}],"yaxis":[{"field":"closedRate","name":"closedRate","valOrAgg":"sum"}]}]', NULL, 0, '{"product":{"name":"\\u6240\\u5c5e\\u4ea7\\u54c1","object":"story","field":"product","type":"string"},"program":{"name":"program","object":"story","field":"program","type":"string"},"productLine":{"name":"productLine","object":"story","field":"productLine","type":"string"},"closedStory":{"name":"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002","object":"story","field":"closedStory","type":"string"},"totalStory":{"name":"totalStory","object":"story","field":"totalStory","type":"string"},"closedRate":{"name":"closedRate","object":"story","field":"closedRate","type":"number"}}', '{"product":{"zh-cn":"\\u6240\\u5c5e\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6","zh-tw":"","en":"program","de":"","fr":""},"productLine":{"zh-cn":"\\u4ea7\\u54c1\\u7ebf","zh-tw":"","en":"productLine","de":"","fr":""},"closedStory":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"","en":"closedStory","de":"","fr":""},"totalStory":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"","en":"totalStory","de":"","fr":""},"closedRate":{"zh-cn":"\\u9700\\u6c42\\u5b8c\\u6210\\u7387","zh-tw":"","en":"closedRate","de":"","fr":""}}', 'SELECT\n t1.name AS product,\n IFNULL(t2.name, ''/'') AS program,\n IFNULL(t3.name, ''/'') AS productLine,\n IFNULL(t4.story, 0) AS closedStory,\n t5.story AS totalStory,\n ROUND(IFNULL(t4.story, 0) / t5.story * 100, 2) AS closedRate\nFROM zt_product AS t1\nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = ''program'' AND t2.grade = 1\nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = ''line''\nLEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' AND closedReason = ''done'' GROUP BY product) AS t4 ON t1.id = t4.product\nLEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' AND ( closedReason = ''done'' OR status != ''closed'') GROUP BY product) AS t5 ON t1.id = t5.product\nWHERE t1.deleted = ''0'' AND t1.status != ''closed'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t5.story IS NOT NULL\nORDER BY t1.order DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1047, '宏观数据-产品Bug修复率', 'macro_productBugFixedRate', 'mysql', 1, 'cluBarY', '44', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"\\u6240\\u5c5e\\u4ea7\\u54c1","group":""}],"yaxis":[{"field":"fixedRate","name":"\\u4fee\\u590d\\u7387","valOrAgg":"sum"}]}]', NULL, 0, '{"product":{"name":"\\u6240\\u5c5e\\u4ea7\\u54c1","object":"bug","field":"product","type":"string"},"program":{"name":"program","object":"bug","field":"program","type":"string"},"productLine":{"name":"productLine","object":"bug","field":"productLine","type":"string"},"fixedBug":{"name":"fixedBug","object":"bug","field":"fixedBug","type":"string"},"totalBug":{"name":"totalBug","object":"bug","field":"totalBug","type":"string"},"fixedRate":{"name":"\\u4fee\\u590d\\u7387","object":"bug","field":"fixedRate","type":"number"}}', '{"product":{"zh-cn":"\\u6240\\u5c5e\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6","zh-tw":"","en":"program","de":"","fr":""},"productLine":{"zh-cn":"\\u4ea7\\u54c1\\u7ebf","zh-tw":"","en":"productLine","de":"","fr":""},"fixedBug":{"zh-cn":"\\u4fee\\u590dbug\\u6570","zh-tw":"","en":"fixedBug","de":"","fr":""},"totalBug":{"zh-cn":"bug\\u6570","zh-tw":"","en":"totalBug","de":"","fr":""},"fixedRate":{"zh-cn":"bug\\u4fee\\u590d\\u7387","zh-tw":"","en":"fixedRate","de":"","fr":""}}', 'SELECT\n t1.name AS product,\n IFNULL(t2.name, ''/'') AS program,\n IFNULL(t3.name, ''/'') AS productLine,\n IFNULL(t4.bug, 0) AS fixedBug,\n t5.bug AS totalBug,\n ROUND(IFNULL(t4.bug, 0) / t5.bug * 100, 2) AS fixedRate\nFROM zt_product AS t1\nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = ''program'' AND t2.grade = 1\nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = ''line''\nLEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' AND resolution = ''fixed'' AND status = ''closed'' GROUP BY product) AS t4 ON t1.id = t4.product\nLEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' AND (resolution = ''fixed'' OR resolution = ''postponed'' OR status = ''active'') GROUP BY product) AS t5 ON t1.id = t5.product\nWHERE t1.deleted = ''0'' AND t1.status != ''closed'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t5.bug IS NOT NULL\nORDER BY t1.order DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1049, '宏观数据-部门人员分布图', 'macro_deptAccountStatus', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"deptName","name":"deptName","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', NULL, 0, '{"deptName":{"name":"deptName","object":"false","field":"deptName","type":"object"},"count":{"name":"count","object":"false","field":"count","type":"object"},"deptOrder":{"name":"deptOrder","object":"false","field":"deptOrder","type":"object"}}', '{"deptName":{"zh-cn":"\\u90e8\\u95e8","zh-tw":"","en":"deptName","de":"","fr":""},"count":{"zh-cn":"\\u4eba\\u6570","zh-tw":"","en":"count","de":"","fr":""},"deptOrder":{"zh-cn":"\\u987a\\u5e8f","zh-tw":"","en":"deptOrder","de":"","fr":""}}', 'SELECT IF(t3.id IS NOT NULL, t3.`name`, "空") AS deptName,count(1) as count,\nIF(t3.id IS NOT NULL, t3.`order`, 9999) AS deptOrder\nFROM zt_user AS t1\nLEFT JOIN zt_dept AS t2 ON t1.dept = t2.id\nLEFT JOIN zt_dept AS t3 ON FIND_IN_SET(TRIM('','' FROM t3.path), TRIM('','' FROM t2.path)) AND t3.grade = ''1''\nWHERE t1.deleted = ''0''\nGROUP BY deptName, deptOrder\nORDER BY deptOrder ASC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1050, '宏观数据-公司角色分布图', 'macro_roleStatus', 'mysql', 1, 'pie', '56', '0', NULL, '[{"type":"pie","group":[{"field":"role","name":"\\u804c\\u4f4d","group":""}],"metric":[{"field":"account","name":"\\u7528\\u6237\\u540d","valOrAgg":"count"}]}]', NULL, 0, '{"account":{"name":"\\u7528\\u6237\\u540d","object":"user","field":"account","type":"string"},"role":{"name":"\\u804c\\u4f4d","object":"user","field":"role","type":"string"}}', '{"account":{"zh-cn":"\\u7528\\u6237\\u540d","zh-tw":"","en":"account","de":"","fr":""},"role":{"zh-cn":"\\u804c\\u4f4d","zh-tw":"","en":"role","de":"","fr":""}}', 'SELECT\n account,\nCASE\n ROLE\n WHEN ''dev'' THEN\n "研发"\n WHEN ''qa'' THEN\n "测试"\n WHEN ''pm'' THEN\n "项目经理"\n WHEN ''others'' THEN\n "其他"\n WHEN ''td'' THEN\n "研发主管"\n WHEN ''pd'' THEN\n "产品主管"\n WHEN ''po'' THEN\n "产品经理"\n WHEN ''qd'' THEN\n "测试主管"\n WHEN ''top'' THEN\n "高层管理" ELSE "未知"\n END role\nFROM\n zt_user\nWHERE\n deleted = ''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1051, '宏观数据-人员工龄分布图', 'macro_workingStatus', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"joinDate","name":"joinDate","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', NULL, 0, '{"count":{"name":"count","object":"user","field":"count","type":"string"},"joinDate":{"name":"joinDate","object":"user","field":"joinDate","type":"string"}}', '{"count":{"zh-cn":"\\u4eba\\u6570","zh-tw":"","en":"count","de":"","fr":""},"joinDate":{"zh-cn":"\\u5de5\\u9f84","zh-tw":"","en":"joinDate","de":"","fr":""}}', 'SELECT count(1) as count, "0-1年" as joinDate FROM zt_user WHERE deleted = ''0'' AND `join` > DATE_SUB(NOW(), INTERVAL 1 YEAR)\nunion\nSELECT count(1) as count, "1-3年" as joinDate FROM zt_user WHERE deleted = ''0'' AND `join` > DATE_SUB(NOW(), INTERVAL 3 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 1 YEAR)\nunion\nSELECT count(1) as count, "3-5年" as joinDate FROM zt_user WHERE deleted = ''0'' AND `join` > DATE_SUB(NOW(), INTERVAL 5 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 3 YEAR)\nunion\nSELECT count(1) as count, "5-10年" as joinDate FROM zt_user WHERE deleted = ''0'' AND `join` > DATE_SUB(NOW(), INTERVAL 10 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 5 YEAR)\nunion\nSELECT count(1) as count, "10年以上" as joinDate FROM zt_user WHERE deleted = ''0'' AND `join` < DATE_SUB(NOW(), INTERVAL 10 YEAR) AND LEFT(`join`, 4) != ''0000''\nunion\nSELECT count(1) as count, "未知" as joinDate FROM zt_user WHERE deleted = ''0'' AND LEFT(`join`, 4) = ''0000''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1055, '年度新增-一级项目集个数', 'annualCreated_countTopProgram', 'mysql', 1, 'card', '45', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, name,\n YEAR ( openedDate ) AS `year`\n FROM\n zt_project\n WHERE\n `type` = ''program''\n AND deleted = ''0''\n AND grade = ''1''\n ) t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1056, '年度新增-产品个数', 'annualCreated_countProduct', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, name,\n YEAR ( createdDate ) AS `year`\n FROM\n zt_product\n WHERE\n deleted = ''0''\n AND shadow = ''0''\n ) t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1057, '年度新增-需求个数', 'annualCreated_countStory', 'mysql', 1, 'card', '36', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, title, YEAR ( openedDate ) AS `year` FROM zt_story WHERE deleted = ''0'' ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1058, '年度新增-Bug个数', 'annualCreated_countBug', 'mysql', 1, 'card', '44', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, title, YEAR ( openedDate ) AS `year` FROM zt_bug WHERE deleted = ''0'' ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1059, '年度新增-计划个数', 'annualCreated_countPlan', 'mysql', 1, 'card', '48', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, title, YEAR ( createdDate ) AS `year` FROM zt_productplan WHERE deleted = ''0'') AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1060, '年度新增-项目个数', 'annualCreated_countProject', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, name,\n YEAR ( openedDate ) AS `year`\n FROM\n zt_project\n WHERE\n `type` = ''project''\n AND deleted = ''0''\n ) t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1061, '年度新增-执行个数', 'annualCreated_countExecution', 'mysql', 1, 'card', '40', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.`year`, t2.id, t2.name\nFROM (SELECT DISTINCT YEAR(`date`) AS "year" FROM zt_action) AS t1\nLEFT JOIN (SELECT id,name, YEAR(openedDate) AS `year` FROM zt_project WHERE `type` IN ( ''sprint'', ''stage'', ''kanban'' ) AND deleted = ''0'' AND multiple = ''1'') AS t2 ON t1.`year` = t2.`year`\nWHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1062, '年度新增-任务数', 'annualCreated_countTask', 'mysql', 1, 'card', '39', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, name, YEAR ( openedDate ) AS `year` FROM zt_task WHERE deleted = ''0'') AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1063, '年度新增-文档个数', 'annualCreated_countDoc', 'mysql', 1, 'card', '54', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, title, YEAR ( addedDate ) AS `year` FROM zt_doc WHERE deleted = ''0'') AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1064, '年度新增-发布个数', 'annualCreated_countRelease', 'mysql', 1, 'card', '37', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, name, YEAR ( `date` ) AS `year` FROM zt_release WHERE deleted = ''0'') AS t2 ON t1.`year` = t2.`year`\nWHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1065, '年度新增-人员个数', 'annualCreated_countAccount', 'mysql', 1, 'card', '56', '0', NULL, '{"value":{"type":"agg","field":"account","agg":"count"},"title":{"type":"text","realname":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.account,\n t2.realname\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n account, realname,\n YEAR ( t112.`date` ) AS ''year''\n FROM\n zt_user AS t111\n LEFT JOIN zt_action t112 ON t111.id = t112.objectID\n AND t112.objectType = ''user''\n WHERE\n t111.deleted = ''0''\n AND t112.action = ''created''\n ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.account IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1066, '年度新增-完成项目数', 'annualCreated_countPorject_finished', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\nt1.`year`,\nt2.id,\nt2.name\nFROM\n( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\nLEFT JOIN (\nSELECT\nid, name,\nYEAR ( closedDate ) AS `year`\nFROM\nzt_project\nWHERE\n`type` = ''project''\nAND deleted = ''0''\n) t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1067, '年度新增-完成执行数', 'annualCreated_countExecution_finished', 'mysql', 1, 'card', '40', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.`year`, t2.id, t2.name\nFROM (SELECT DISTINCT YEAR(date) AS "year" FROM zt_action) AS t1\nLEFT JOIN (SELECT id, name, YEAR(closedDate) AS `year` FROM zt_project WHERE `type` IN ( ''sprint'', ''stage'', ''kanban'' ) AND deleted = ''0'' AND multiple = ''1'' AND status = ''closed'') AS t2 ON t1.`year` = t2.`year`\nWHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1068, '年度新增-完成发布数', 'annualCreated_countRelease_finished', 'mysql', 1, 'card', '37', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT id, name, YEAR ( `date` ) AS `year` FROM zt_release WHERE deleted = ''0'') AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1069, '年度新增-完成需求数', 'annualCreated_countStory_finished', 'mysql', 1, 'card', '36', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, title,\n YEAR ( closedDate ) AS `year`\n FROM\n zt_story\n WHERE\n deleted = ''0''\n AND closedReason = ''done''\n AND STATUS = ''closed''\n ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1070, '年度新增-解决Bug数', 'annualCreated_countBug_fixed', 'mysql', 1, 'card', '44', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.title\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, title,\n YEAR ( closedDate ) AS `year`\n FROM\n zt_bug\n WHERE\n deleted = ''0''\n AND resolution = ''fixed''\n AND STATUS = ''closed''\n ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1071, '年度新增-完成任务数', 'annualCreated_countTask_finished', 'mysql', 1, 'card', '39', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n t2.id,\n t2.name\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN (\n SELECT\n id, name,\n YEAR ( finishedDate ) AS `year`\n FROM\n zt_task\n WHERE\n deleted = ''0''\n AND STATUS = ''closed''\n AND closedReason = ''done''\n ) AS t2 ON t1.`year` = t2.`year`\n WHERE t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1072, '年度新增-投入工时数', 'annualCreated_consumed', 'mysql', 1, 'card', '57', '0', NULL, '{"value":{"type":"value","field":"consumed","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT\n t1.`year`,\n IFNULL( t2.consumed, 0 ) AS consumed\nFROM\n ( SELECT DISTINCT YEAR ( `date` ) AS "year" FROM zt_action ) AS t1\n LEFT JOIN ( SELECT ROUND( SUM( consumed )) AS consumed, YEAR ( `date` ) AS "year" FROM zt_effort WHERE deleted = ''0'' GROUP BY `year`) AS t2 ON t1.`year` = t2.`year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1073, '年度新增-项目集年度新增数据汇总表', 'annualCreated_programOverview_created', 'mysql', 1, 'table', '64', '0', NULL, '{"group":[],"column":[{"field":"topProgram","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"product","valOrAgg":"value","name":"\\u4ea7\\u54c1\\u6570"},{"field":"plan","valOrAgg":"value","name":"\\u8ba1\\u5212\\u6570"},{"field":"story","valOrAgg":"value","name":"\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"},{"field":"doc","valOrAgg":"value","name":"\\u6587\\u6863\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'select tt.topProgram,tt.programID as id,tt.`year`,sum(tt.product) as product,sum(tt.plan) as plan,sum(tt.`release`) as `release`,sum(tt.story) as story,sum(tt.bug) as bug,sum(tt.doc) as doc\nfrom (\nselect t2.name as topProgram,t2.id as programID,t0.`year`,count(1) as product,0 as plan,0 as story,0 as bug,0 as `release`, 0 as doc\nfrom zt_product t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.createdDate) = t0.`year`\nleft join zt_project t2 on t1.program = t2.id\nwhere t1.deleted = ''0'' and t1.shadow = ''0''\nand t2.type = ''program'' and t2.grade = 1 and t2.deleted = ''0''\ngroup by t2.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,count(1) as plan,0 as story,0 as bug,0 as `release`, 0 as doc\nfrom zt_productplan t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.createdDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,0 as bug,0 as `release`, count(1) as doc\nfrom zt_doc t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.addedDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,0 as bug,0 as `release`, count(distinct t1.id) as doc\nfrom zt_doc t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.addedDate) = t0.`year`\nleft join zt_projectproduct t4 on t1.project = t4.project\nleft join zt_product t2 on t2.id = t4.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,0 as bug,count(1) as `release`, 0 as doc\nfrom zt_release t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.date) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,count(1) as story,0 as bug,0 as `release`, 0 as doc\nfrom zt_story t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.openedDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,count(1) as bug,0 as `release`, 0 as doc\nfrom zt_bug t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.openedDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\n) tt\ngroup by tt.programID, tt.`year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1074, '年度新增-项目集年度完成数据概览', 'annualCreated_programOverview_finished', 'mysql', 1, 'table', '64', '0', NULL, '{"group":[],"column":[{"field":"topProgram","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"projectA","valOrAgg":"value","name":"\\u9879\\u76ee\\u6570"},{"field":"executionA","valOrAgg":"value","name":"\\u6267\\u884c\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"},{"field":"story","valOrAgg":"value","name":"\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'select tt.topProgram,tt.programID as id,tt.`year`,sum(tt.projectA) as projectA,sum(tt.executionA) as executionA,sum(tt.releaseA) as `release`,sum(tt.storyA) as story,sum(tt.bugA) as bug\nfrom (\nselect t2.name as topProgram,t2.id as programID,t0.`year`,count(1) as projectA,0 as executionA,0 as releaseA,0 as storyA,0 as bugA\nfrom zt_project t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\nleft join zt_project t2 on FIND_IN_SET(t2.id, t1.path)\nwhere t1.type = ''project'' and t1.deleted = ''0''\nand t2.type = ''program'' and t2.grade = 1 and t2.deleted = ''0''\nand t1.`status` = ''closed''\ngroup by t2.id, t0.`year`\nunion all\nselect t3.name as topProgram, t3.id as programID,t0.`year`,0 as projectA,count(1) as executionA,0 as releaseA,0 as storyA,0 as bugA\nfrom zt_project t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\nleft join zt_project t2 on t1.parent = t2.id\nleft join zt_project t3 on FIND_IN_SET(t3.id, t2.path)\nwhere t1.type in (''sprint'', ''stage'', ''kanban'') and t1.deleted = ''0''\nand t2.type = ''project'' and t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\nand t1.`status` = ''closed''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,count(1) as releaseA,0 as storyA,0 as bugA\nfrom zt_release t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.date) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,0 as releaseA,count(1) as storyA,0 as bugA\nfrom zt_story t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0'' and t1.closedReason = ''done'' and t1.status = ''closed''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\nunion all\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,0 as releaseA,0 as storyA,count(1) as bugA\nfrom zt_bug t1\nleft join (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) t0 on YEAR(t1.resolvedDate) = t0.`year`\nleft join zt_product t2 on t2.id = t1.product\nleft join zt_project t3 on t2.program = t3.id\nwhere t1.deleted = ''0'' and t1.resolution = ''fixed'' and t1.status = ''closed''\nand t2.deleted = ''0''\nand t3.type = ''program'' and t3.grade = 1 and t3.deleted = ''0''\ngroup by t3.id, t0.`year`\n) tt\ngroup by tt.programID, tt.`year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1075, '年度新增-产品年度新增数据汇总表', 'annualCreated_productOverview_created', 'mysql', 1, 'table', '63', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u4ea7\\u54c1"},{"field":"story","valOrAgg":"value","name":"\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"},{"field":"plan","valOrAgg":"value","name":"\\u8ba1\\u5212\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.name,t1.id,t2.`year`,IF(YEAR(t1.createdDate) = t2.`year`, 1, 0) as newProduct,\n SUM(IFNULL(t3.story, 0)) AS story,\n SUM(IFNULL(t4.bug, 0)) AS bug,\n SUM(IFNULL(t5.`plan`, 0)) AS ''plan'',\n SUM(IFNULL(t6.`release`, 0)) AS ''release''\nFROM zt_product AS t1\nLEFT JOIN (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) as t2 ON 1 = 1\nLEFT JOIN (SELECT COUNT(1) as ''story'', product, YEAR(openedDate) as `year` FROM zt_story WHERE deleted = ''0'' GROUP BY product, `year`) AS t3 on t1.id = t3.product AND t3.`year` = t2.`year`\nLEFT JOIN (SELECT COUNT(1) as ''bug'', product, YEAR(openedDate) as `year` FROM zt_bug WHERE deleted = ''0'' GROUP BY product, `year`) AS t4 on t1.id = t4.product AND t4.`year` = t2.`year`\nLEFT JOIN (SELECT COUNT(1) as ''plan'', product, YEAR(createdDate) AS ''year'' FROM zt_productplan WHERE deleted = ''0'' GROUP BY product,`year`) AS t5 on t1.id = t5.product AND t5.`year` = t2.`year`\nLEFT JOIN (SELECT COUNT(1) as ''release'', product, YEAR(`date`) as `year` FROM zt_release WHERE deleted = ''0'' GROUP BY product, `year`) AS t6 ON t1.id = t6.product AND t6.`year` = t2.`year`\nWHERE t1.deleted = ''0'' AND t1.status != ''closed'' AND t1.shadow = ''0''\nGROUP BY t1.name,t1.id,t2.`year`,newProduct', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1076, '年度新增-产品年度完成数据汇总表', 'annualCreated_productOverview_finished', 'mysql', 1, 'table', '63', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u4ea7\\u54c1"},{"field":"story","valOrAgg":"value","name":"\\u9700\\u6c42\\u6570"},{"field":"bug","valOrAgg":"value","name":"Bug\\u6570"},{"field":"plan","valOrAgg":"value","name":"\\u8ba1\\u5212\\u6570"},{"field":"release","valOrAgg":"value","name":"\\u53d1\\u5e03\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.name,t1.id,t2.`year`,IF(YEAR(t1.createdDate) = t2.`year`, 1, 0) as newProduct,\n SUM(IFNULL(t3.story, 0)) AS story,\n SUM(IFNULL(t4.bug, 0)) AS bug,\n SUM(IFNULL(t5.`plan`, 0)) AS ''plan'',\n SUM(IFNULL(t6.`release`, 0)) AS ''release''\nFROM zt_product AS t1\nLEFT JOIN (SELECT DISTINCT YEAR(`date`) as "year" FROM zt_action) as t2 ON 1 = 1\nLEFT JOIN (SELECT COUNT(1) as ''story'', product, YEAR(closedDate) as `year` FROM zt_story WHERE deleted = ''0'' AND closedReason = ''done'' AND status = ''closed'' GROUP BY product, `year`) AS t3 on t1.id = t3.product AND t3.`year` = t2.`year`\nLEFT JOIN (SELECT COUNT(1) as ''bug'', product, YEAR(resolvedDate) as `year` FROM zt_bug WHERE deleted = ''0'' AND resolution = ''fixed'' AND status = ''closed'' GROUP BY product, `year`) AS t4 on t1.id = t4.product AND t4.`year` = t2.`year`\nLEFT JOIN (\n SELECT COUNT(DISTINCT t51.id) as ''plan'', t51.product, YEAR(t52.`date`) AS "year"\n FROM zt_productplan AS t51\n LEFT JOIN (SELECT objectID,objectType,action,MAX(`date`) as ''date'' FROM zt_action GROUP BY objectID,objectType, action) AS t52 ON t51.id = t52.objectID AND t52.objectType = ''productplan''\n WHERE t51.deleted = ''0'' AND t51.closedReason = ''done'' AND t51.status = ''closed''\n AND t52.action = ''closed''\n GROUP BY t51.product,`year`\n) AS t5 on t1.id = t5.product AND t5.`year` = t2.`year`\nLEFT JOIN (SELECT COUNT(1) as ''release'', product, YEAR(`date`) as `year` FROM zt_release WHERE deleted = ''0'' GROUP BY product, `year`) AS t6 ON t1.id = t6.product AND t6.`year` = t2.`year`\nWHERE t1.deleted = ''0'' AND t1.status != ''closed'' AND t1.shadow = ''0''\nGROUP BY t1.name,t1.id,t2.`year`,newProduct', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1077, '年度新增-需求年度新增和完成趋势图', 'annualCreated_storyTendency', 'mysql', 1, 'line', '36', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"newStory","name":"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"},{"field":"closedStory","name":"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002","valOrAgg":"sum"}],"rotateX":"notuse"}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"story","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"story","field":"year","type":"number"},"month":{"name":"month","object":"story","field":"month","type":"number"},"newStory":{"name":"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"newStory","type":"string"},"closedStory":{"name":"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002","object":"story","field":"closedStory","type":"string"}}', '{"YEARMONTH":{"zh-cn":"YEARMONTH","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"newStory":{"zh-cn":"\\u65b0\\u589e\\u9700\\u6c42\\u6570","zh-tw":"","en":"","de":"","fr":""},"closedStory":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT t1.YEARMONTH, t1.year, t1.month AS `month`, IFNULL(t2.story, 0) AS newStory, IFNULL(t3.story, 0) AS closedStory\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = ''0'' AND closedReason = ''done'' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1078, '年度新增-Bug年度新增和解决趋势图', 'annualCreated_bugTendency', 'mysql', 1, 'line', '44', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"newBug","name":"newBug","valOrAgg":"sum"},{"field":"fixedBug","name":"fixedBug","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"bug","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"bug","field":"year","type":"number"},"month":{"name":"month","object":"bug","field":"month","type":"number"},"newBug":{"name":"newBug","object":"bug","field":"newBug","type":"string"},"fixedBug":{"name":"fixedBug","object":"bug","field":"fixedBug","type":"string"}}', '{"YEARMONTH":{"zh-cn":"","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"newBug":{"zh-cn":"\\u65b0\\u589eBug\\u6570","zh-tw":"","en":"","de":"","fr":""},"fixedBug":{"zh-cn":"\\u89e3\\u51b3Bug\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT YEARMONTH, t1.year, t1.month AS `month`, IFNULL(t2.bug, 0) AS newBug, IFNULL(t3.bug, 0) AS fixedBug\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = ''0'' AND resolution = ''fixed'' AND status = ''closed'' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1079, '年度新增-任务年度新增和完成趋势图', 'annualCreated_taskTendency', 'mysql', 1, 'line', '39', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"newTask","name":"newTask","valOrAgg":"sum"},{"field":"closedTask","name":"closedTask","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"task","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"task","field":"year","type":"number"},"month":{"name":"month","object":"task","field":"month","type":"string"},"newTask":{"name":"newTask","object":"task","field":"newTask","type":"string"},"closedTask":{"name":"closedTask","object":"task","field":"closedTask","type":"string"}}', '{"YEARMONTH":{"zh-cn":"YEARMONTH","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"newTask":{"zh-cn":"\\u65b0\\u589e\\u4efb\\u52a1\\u6570","zh-tw":"","en":"","de":"","fr":""},"closedTask":{"zh-cn":"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, "月") AS `month`, IFNULL(t2.task, 0) AS newTask, IFNULL(t3.task, 0) AS closedTask\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = ''0'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = ''0'' AND status = ''closed'' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1080, '年度新增-项目年度新增和完成趋势图', 'annualCreated_projectTendency', 'mysql', 1, 'line', '38', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"newProject","name":"newProject","valOrAgg":"sum"},{"field":"closedProject","name":"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"project","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"number"},"month":{"name":"month","object":"project","field":"month","type":"string"},"newProject":{"name":"newProject","object":"project","field":"newProject","type":"string"},"closedProject":{"name":"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee","object":"project","field":"closedProject","type":"string"}}', '{"YEARMONTH":{"zh-cn":"YEARMONTH","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"newProject":{"zh-cn":"\\u65b0\\u589e\\u9879\\u76ee\\u6570","zh-tw":"","en":"","de":"","fr":""},"closedProject":{"zh-cn":"\\u5b8c\\u6210\\u9879\\u76ee\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, "月") AS `month`, IFNULL(t2.project, 0) AS newProject, IFNULL(t3.project, 0) AS closedProject\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = ''0'' AND type = ''project'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = ''0'' AND type = ''project'' AND status = ''closed'' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1081, '年度新增-执行年度新增和完成趋势图', 'annualCreated_executionTendency', 'mysql', 1, 'line', '40', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"newExecution","name":"newExecution","valOrAgg":"sum"},{"field":"closedExecution","name":"closedExecution","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"project","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"number"},"month":{"name":"month","object":"project","field":"month","type":"string"},"newExecution":{"name":"newExecution","object":"project","field":"newExecution","type":"string"},"closedExecution":{"name":"closedExecution","object":"project","field":"closedExecution","type":"string"}}', '{"YEARMONTH":{"zh-cn":"YEARMONTH","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"newExecution":{"zh-cn":"\\u65b0\\u589e\\u6267\\u884c\\u6570","zh-tw":"","en":"","de":"","fr":""},"closedExecution":{"zh-cn":"\\u5b8c\\u6210\\u6267\\u884c\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, "月") AS `month`, IFNULL(t2.execution, 0) AS newExecution, IFNULL(t3.execution, 0) AS closedExecution\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH,YEAR(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = ''0'' AND type IN (''sprint'', ''stage'', ''kanban'') AND multiple = ''1'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = ''0'' AND type IN (''sprint'', ''stage'', ''kanban'') AND status = ''closed'' AND multiple = ''1'' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1082, '年度新增-产品发布次数年度趋势图', 'annualCreated_releaseTendency', 'mysql', 1, 'line', '37', '0', NULL, '[{"type":"line","xaxis":[{"field":"YEARMONTH","name":"YEARMONTH","group":""}],"yaxis":[{"field":"release","name":"release","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u5ea6"}]', 0, '{"YEARMONTH":{"name":"YEARMONTH","object":"release","field":"YEARMONTH","type":"string"},"year":{"name":"year","object":"release","field":"year","type":"number"},"month":{"name":"month","object":"release","field":"month","type":"string"},"release":{"name":"release","object":"release","field":"release","type":"string"}}', '{"YEARMONTH":{"zh-cn":"YEARMONTH","zh-tw":"","en":"","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u5ea6","zh-tw":"","en":"","de":"","fr":""},"month":{"zh-cn":"\\u6708\\u4efd","zh-tw":"","en":"","de":"","fr":""},"release":{"zh-cn":"\\u53d1\\u5e03\\u6b21\\u6570","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, "月") AS `month`, IFNULL(t2.release, 0) AS `release`\nFROM (SELECT DISTINCT DATE_FORMAT(date, ''%Y-%m'') YEARMONTH,Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(createdDate) AS `year`, MONTH(createdDate) AS `month`, COUNT(1) AS `release` FROM zt_release WHERE deleted = ''0'' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nORDER BY `year`, t1.month', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1083, '年度新增-年度投入产出比', 'annualCreated_IORatio', 'mysql', 1, 'line', '45', '0', NULL, '{"xaxis":[{"field":"month","name":"\\u6708\\u4efd","group":"value"}],"yaxis":[{"type":"value","field":"ratio","agg":"value","name":"\\u6295\\u5165\\u4ea7\\u51fa\\u6bd4","valOrAgg":"value"},{"type":"value","field":"story","agg":"value","name":"\\u9700\\u6c42\\u4ea4\\u4ed8","valOrAgg":"value"},{"type":"value","field":"consumed","agg":"value","name":"\\u5de5\\u65f6\\u6d88\\u8017","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'SELECT t1.`year`, CONCAT(t1.`month`, "月") AS `month`, IFNULL(t2.story, 0) AS story, IFNULL(t3.consumed, 0) AS consumed, ROUND(IF(IFNULL(t3.consumed, 0) = 0, 0, IFNULL(t2.story, 0) / IFNULL(t3.consumed, 0)), 2) AS ratio\nFROM (SELECT YEAR(`date`) AS ''year'', MONTH(`date`) AS ''month'' FROM zt_action GROUP BY `year`,`month`) AS t1\nLEFT JOIN (SELECT ROUND(SUM(estimate)) AS story, YEAR(`closedDate`) AS ''year'', MONTH(`closedDate`) AS ''month'' FROM zt_story WHERE deleted = ''0'' AND closedReason = ''done'' AND status = ''closed'' GROUP BY `year`,`month`) AS t2 ON t1.`year` = t2.`year` AND t1.`month` = t2.`month`\nLEFT JOIN (SELECT ROUND(SUM(consumed)) as consumed, YEAR(`date`) as ''year'', MONTH(`date`) AS ''month'' FROM zt_effort WHERE deleted = ''0'' GROUP BY `year`,`month`) AS t3 ON t1.`year` = t3.`year` AND t1.`month` = t3.`month`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (1085, '年度排行-项目集-预算投入榜', 'annualRank_programBudget', 'mysql', 1, 'cluBarY', '41', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"budget","name":"\\u9884\\u7b97","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"project","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"budget":{"name":"\\u9884\\u7b97","object":"project","field":"budget","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"budget":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u9884\\u7b97","zh-tw":"","en":"budget","de":"","fr":""}}', 'SELECT\n YEAR(t2.openedDate) AS `year`,\n t1.id,\n t1.name AS program,\n ROUND(\n SUM(\n IFNULL(t2.budget, 0)\n ) / 10000,\n 2\n ) AS budget\nFROM\n zt_project AS t1\n LEFT JOIN zt_project AS t2 ON FIND_IN_SET(t1.id, t2.path)\n AND t2.deleted = ''0''\n AND t2.type = ''project''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n budget DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1086, '年度排行-项目集-人员投入榜', 'annualRank_programPersonnel', 'mysql', 1, 'cluBarY', '41', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"setName","name":"setName","group":""}],"yaxis":[{"field":"number","name":"number","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"user","field":"year","type":"number"},"number":{"name":"number","object":"user","field":"number","type":"string"},"setName":{"name":"setName","object":"user","field":"setName","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"number":{"zh-cn":"\\u4eba\\u5458\\u6570\\u91cf","zh-tw":"","en":"number","de":"","fr":""},"setName":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"setName","de":"","fr":""}}', 'SELECT tt.join as `year`, count(1) as number, tt.setName from (\nselect\nYEAR(t1.join) as `join`, t4.name as setName\nfrom zt_team t1\nRIGHT JOIN zt_project t2 on t2.id = t1.root\nLEFT JOIN zt_project t4 on FIND_IN_SET(t4.id,t2.path) and t4.grade = 1\nRIGHT JOIN zt_user t3 on t3.account = t1.account\nWHERE t1.type = ''project''\nAND t2.deleted = ''0''\nAND t3.deleted = ''0''\n) tt\nGROUP BY tt.setName, tt.join\nORDER BY tt.join, number desc, tt.setName', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0); INSERT INTO `zt_chart` VALUES (1087, '年度排行-项目集-工时消耗榜', 'annualRank_programConsumed', 'mysql', 1, 'cluBarY', '41', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"consumed","name":"\\u603b\\u8ba1\\u6d88\\u8017","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"effort","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"consumed":{"name":"\\u603b\\u8ba1\\u6d88\\u8017","object":"task","field":"consumed","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"consumed":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u603b\\u8ba1\\u6d88\\u8017","zh-tw":"","en":"program","de":"","fr":""}}', 'SELECT\n YEAR(t5.date) AS `year`,\n t1.id,\n t1.name AS program,\n ROUND(\n SUM(t5.consumed),\n 2\n ) AS consumed\nFROM\n zt_project AS t1\n LEFT JOIN zt_project AS t2 ON FIND_IN_SET(t1.id, t2.path)\n AND t2.deleted = ''0''\n AND t2.type = ''project''\n LEFT JOIN zt_project AS t3 ON t2.id = t3.parent\n AND t3.deleted = ''0''\n AND t3.type IN (''sprint'', ''stage'', ''kanban'')\n LEFT JOIN zt_task AS t4 ON t3.id = t4.execution\n AND t4.deleted = ''0''\n AND t4.status != ''cancel''\n LEFT JOIN zt_effort AS t5 ON t4.id = t5.objectID\n AND t5.deleted = ''0''\n AND t5.objectType = ''task''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t5.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n consumed DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1088, '年度排行-项目集-新增需求条目榜', 'annualRank_programStoryCount_created', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"story":{"zh-cn":"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT\n YEAR(t3.openedDate) AS `year`,\n t1.id,\n t1.name AS program,\n COUNT(1) AS story\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_story AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1089, '年度排行-项目集-新增需求规模榜', 'annualRank_programStoryEstimate_created', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"story":{"zh-cn":"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u89c4\\u6a21","zh-tw":"","en":"","de":"","fr":""}}', 'SELECT\n YEAR(t3.openedDate) AS `year`,\n t1.id,\n t1.name AS program,\n ROUND(\n SUM(t3.estimate),\n 2\n ) AS story\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_story AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1090, '年度排行-项目集-新增Bug条目榜', 'annualRank_programBug_created', 'mysql', 1, 'cluBarY', '44', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"bug","name":"Bug\\u5217\\u8868","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"bug":{"name":"Bug\\u5217\\u8868","object":"project","field":"bug","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"bug":{"zh-cn":"\\u65b0\\u589eBug\\u8ba1\\u6570","zh-tw":"","en":"bug","de":"","fr":""}}', 'SELECT\n YEAR(t3.openedDate) AS `year`,\n t1.id,\n t1.name AS program,\n COUNT(1) AS bug\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_bug AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n bug DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1091, '年度排行-项目集-完成需求条目榜', 'annualRank_programStoryCount_finished', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"story":{"zh-cn":"\\u5b8c\\u6210\\u7814\\u53d1\\u9700\\u6c42\\u6c42\\u548c","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT\n YEAR(t3.closedDate) AS `year`,\n t1.id,\n t1.name AS program,\n COUNT(1) AS story\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_story AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\n AND t3.closedReason = ''done''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1092, '年度排行-项目集-完成需求规模榜', 'annualRank_programStoryEstimate_finished', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"story":{"zh-cn":"\\u7814\\u53d1\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6\\u6c42\\u548c","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT\n YEAR(t3.closedDate) AS `year`,\n t1.id,\n t1.name AS program,\n ROUND(\n SUM(t3.estimate),\n 2\n ) AS story\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_story AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\n AND t3.closedReason = ''done''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1093, '年度排行-项目集-修复Bug条目榜', 'annualRank_programBug_fixed', 'mysql', 1, 'cluBarY', '44', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"program","name":"program","group":""}],"yaxis":[{"field":"bug","name":"Bug\\u5217\\u8868","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"program":{"name":"program","object":"zt_project","field":"program","type":"string"},"bug":{"name":"Bug\\u5217\\u8868","object":"project","field":"bug","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"program":{"zh-cn":"\\u9879\\u76ee\\u96c6\\u540d\\u79f0","zh-tw":"","en":"program","de":"","fr":""},"bug":{"zh-cn":"Bug\\u8ba1\\u6570","zh-tw":"","en":"bug","de":"","fr":""}}', 'SELECT\n YEAR(t3.closedDate) AS `year`,\n t1.id,\n t1.name AS program,\n COUNT(1) AS bug\nFROM\n zt_project AS t1\n LEFT JOIN zt_product AS t2 ON t1.id = t2.program\n AND t2.deleted = ''0''\n LEFT JOIN zt_bug AS t3 ON t2.id = t3.product\n AND t3.deleted = ''0''\n AND t3.resolution = ''fixed''\n AND t3.status = ''closed''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''program''\n AND t1.grade = 1\n AND t3.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n program\nORDER BY\n `year`,\n bug DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1094, '年度排行-项目-工期榜', 'annualRank_projectDuration', 'mysql', 1, 'cluBarY', '42', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"\\u9879\\u76ee\\u540d\\u79f0","group":""}],"yaxis":[{"field":"duration","name":"duration","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"project","field":"year","type":"number"},"id":{"name":"\\u7f16\\u53f7","object":"project","field":"id","type":"number"},"name":{"name":"\\u9879\\u76ee\\u540d\\u79f0","object":"project","field":"name","type":"string"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"},"realBegan":{"name":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f","object":"project","field":"realBegan","type":"date"},"realEnd":{"name":"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f","object":"project","field":"realEnd","type":"date"},"duration":{"name":"duration","object":"project","field":"duration","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""},"realBegan":{"zh-cn":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f","zh-tw":"","en":"realBegan","de":"","fr":""},"realEnd":{"zh-cn":"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f","zh-tw":"","en":"realEnd","de":"","fr":""},"duration":{"zh-cn":"\\u5de5\\u671f","zh-tw":"","en":"duration","de":"","fr":""}}', 'SELECT `year`, id,name,status,realBegan,realEnd,IF(status = ''closed'', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) as duration\nFROM (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) AS t1\nLEFT JOIN zt_project AS t2 ON 1 = 1 WHERE deleted = ''0'' AND type = ''project'' AND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != ''0000'' AND (status =''doing'' OR (status = ''suspended'' AND YEAR(suspendedDate) >= `year`) OR (status = ''closed'' AND YEAR(realEnd) >= `year`)) HAVING 1=1 ORDER BY `year`, duration desc', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1096, '年度排行-项目-工期偏差榜', 'annualRank_projectDurationDeviation', 'mysql', 1, 'cluBarY', '42', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"\\u9879\\u76ee\\u540d\\u79f0","group":""}],"yaxis":[{"field":"duration","name":"duration","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"project","field":"year","type":"number"},"id":{"name":"\\u7f16\\u53f7","object":"action","field":"id","type":"number"},"name":{"name":"\\u9879\\u76ee\\u540d\\u79f0","object":"project","field":"name","type":"string"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"},"begin":{"name":"\\u8ba1\\u5212\\u5f00\\u59cb","object":"project","field":"begin","type":"date"},"end":{"name":"\\u8ba1\\u5212\\u5b8c\\u6210","object":"project","field":"end","type":"date"},"realBegan":{"name":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f","object":"project","field":"realBegan","type":"date"},"realEnd":{"name":"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f","object":"project","field":"realEnd","type":"date"},"duration":{"name":"duration","object":"project","field":"duration","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""},"begin":{"zh-cn":"\\u8ba1\\u5212\\u5f00\\u59cb","zh-tw":"","en":"begin","de":"","fr":""},"end":{"zh-cn":"\\u8ba1\\u5212\\u5b8c\\u6210","zh-tw":"","en":"end","de":"","fr":""},"realBegan":{"zh-cn":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f","zh-tw":"","en":"realBegan","de":"","fr":""},"realEnd":{"zh-cn":"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f","zh-tw":"","en":"realEnd","de":"","fr":""},"duration":{"zh-cn":"\\u5de5\\u671f\\u504f\\u5dee","zh-tw":"","en":"duration","de":"","fr":""}}', 'SELECT `year`, id,name,status,`begin`,`end`,realBegan,realEnd,\nROUND((IF(LEFT(realEnd,4) != ''0000'', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) - DATEDIFF(`end`, `begin`)) / DATEDIFF(`end`,`begin`) * 100) as duration\nFROM (SELECT DISTINCT YEAR(`date`) as ''year'' FROM zt_action) AS t1\nLEFT JOIN zt_project AS t2 ON 1 = 1\nWHERE deleted = ''0'' AND type = ''project''\nAND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != ''0000''\nAND (YEAR(realEnd) >= `year` OR LEFT(realEnd, 4) = ''0000'') AND YEAR(`end`) != ''2059''\nHAVING 1=1\nORDER BY duration ASC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1097, '年度排行-项目-人员投入榜', 'annualRank_projectPersonnel', 'mysql', 1, 'cluBarY', '41', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"\\u9879\\u76ee\\u540d\\u79f0","group":""}],"yaxis":[{"field":"number","name":"number","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"user","field":"year","type":"number"},"number":{"name":"number","object":"user","field":"number","type":"string"},"name":{"name":"\\u9879\\u76ee\\u540d\\u79f0","object":"project","field":"name","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"number":{"zh-cn":"\\u4eba\\u5458\\u4e2a\\u6570","zh-tw":"","en":"number","de":"","fr":""},"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""}}', 'SELECT tt.join as `year`, count(1) as number, tt.name from (\nselect\nt2.name, YEAR(t1.join) as `join`\nfrom zt_team t1\nRIGHT JOIN zt_project t2 on t2.id = t1.root\nRIGHT JOIN zt_user t3 on t3.account = t1.account\nWHERE t1.type = ''project''\nAND t2.deleted = ''0''\n) tt\nGROUP BY tt.`name`, tt.join\nORDER BY tt.join, number desc, tt.name', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1098, '年度排行-项目-工时消耗榜', 'annualRank_projectConsumed', 'mysql', 1, 'cluBarY', '41', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"project","name":"project","group":""}],"yaxis":[{"field":"consumed","name":"\\u603b\\u8ba1\\u6d88\\u8017","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"effort","field":"year","type":"number"},"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"project":{"name":"project","object":"zt_project","field":"project","type":"string"},"consumed":{"name":"\\u603b\\u8ba1\\u6d88\\u8017","object":"task","field":"consumed","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee","zh-tw":"","en":"project","de":"","fr":""},"consumed":{"zh-cn":"\\u4efb\\u52a1\\u603b\\u8ba1\\u6d88\\u8017","zh-tw":"","en":"consumed","de":"","fr":""}}', 'SELECT\n YEAR(t4.date) AS `year`,\n t1.id,\n t1.name AS project,\n ROUND(\n SUM(t4.consumed),\n 2\n ) AS consumed\nFROM\n zt_project AS t1\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent\n AND t2.deleted = ''0''\n AND t2.type IN (''sprint'', ''stage'', ''kanban'')\n LEFT JOIN zt_task AS t3 ON t2.id = t3.execution\n AND t3.deleted = ''0''\n AND t3.status != ''cancel''\n LEFT JOIN zt_effort AS t4 ON t3.id = t4.objectID\n AND t4.deleted = ''0''\n AND t4.objectType = ''task''\nWHERE\n t1.deleted = ''0''\n AND t1.type = ''project''\n AND t4.id IS NOT NULL\nGROUP BY\n `year`,\n id,\n project\nORDER BY\n `year`,\n consumed DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1099, '年度排行-项目-完成需求条目榜', 'annualRank_projectStoryCount_finished', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"project","name":"\\u6240\\u5c5e\\u9879\\u76ee","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"project":{"name":"\\u6240\\u5c5e\\u9879\\u76ee","object":"project","field":"project","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868","object":"projectstory","field":"story","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"project":{"zh-cn":"\\u6240\\u5c5e\\u9879\\u76ee","zh-tw":"","en":"project","de":"","fr":""},"story":{"zh-cn":"\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT\n YEAR(t1.closedDate) AS `year`,\n t1.id,\n t1.project,\n COUNT(1) AS story\nFROM\n (\n SELECT\n DISTINCT t1.id,\n t1.name AS project,\n t4.id AS story,\n t4.closedDate\n FROM\n zt_project AS t1\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent\n AND t2.deleted = ''0''\n AND t2.type IN (''sprint'', ''stage'', ''kanban'')\n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project\n LEFT JOIN zt_story AS t4 ON t3.story = t4.id\n AND t4.deleted = ''0''\n AND t4.closedReason = ''done''\n WHERE\n t1.deleted = ''0''\n AND t1.type = ''project''\n AND t4.id IS NOT NULL\n ) AS t1\nGROUP BY\n `year`,\n id,\n project\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1100, '年度排行-项目-完成需求规模榜', 'annualRank_projectStoryEstimate_finished', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"project","name":"\\u6240\\u5c5e\\u9879\\u76ee","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"project":{"name":"\\u6240\\u5c5e\\u9879\\u76ee","object":"project","field":"project","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868","object":"projectstory","field":"story","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"project":{"zh-cn":"\\u6240\\u5c5e\\u9879\\u76ee","zh-tw":"","en":"project","de":"","fr":""},"story":{"zh-cn":"\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT\n YEAR(t1.closedDate) AS `year`,\n t1.id,\n t1.project,\n ROUND(\n SUM(t1.estimate),\n 2\n ) AS story\nFROM\n (\n SELECT\n DISTINCT t1.id,\n t1.name AS project,\n t4.id AS story,\n t4.estimate,\n t4.closedDate\n FROM\n zt_project AS t1\n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent\n AND t2.deleted = ''0''\n AND t2.type IN (''sprint'', ''stage'', ''kanban'')\n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project\n LEFT JOIN zt_story AS t4 ON t3.story = t4.id\n AND t4.deleted = ''0''\n AND t4.closedReason = ''done''\n WHERE\n t1.deleted = ''0''\n AND t1.type = ''project''\n AND t4.id IS NOT NULL\n ) AS t1\nGROUP BY\n `year`,\n id,\n project\nORDER BY\n `year`,\n story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1101, '年度排行-产品-新增需求条目榜', 'annualRank_productStoryCount_created', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"product","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_product","field":"id","type":"number"},"product":{"name":"product","object":"zt_product","field":"product","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u4ea7\\u54c1\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"product":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"story":{"zh-cn":"\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT YEAR(t2.openedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS story\nFROM zt_product AS t1\nLEFT JOIN zt_story AS t2 ON t1.id = t2.product AND t2.deleted = ''0''\nWHERE t1.deleted = ''0'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1102, '年度排行-产品-完成需求规模榜', 'annualRank_productStoryEstimate_finished', 'mysql', 1, 'cluBarY', '36', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"product","group":""}],"yaxis":[{"field":"story","name":"\\u7814\\u53d1\\u9700\\u6c42","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"id":{"name":"id","object":"zt_product","field":"id","type":"number"},"product":{"name":"product","object":"zt_product","field":"product","type":"string"},"story":{"name":"\\u7814\\u53d1\\u9700\\u6c42","object":"story","field":"story","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u4ea7\\u54c1\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"product":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"story":{"zh-cn":"\\u7814\\u53d1\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6\\u6c42\\u548c","zh-tw":"","en":"story","de":"","fr":""}}', 'SELECT YEAR(t2.closedDate) AS `year`, t1.id, t1.name AS product, ROUND(SUM(t2.estimate), 1) AS story\nFROM zt_product AS t1\nLEFT JOIN zt_story AS t2 ON t1.id = t2.product AND t2.deleted = ''0'' AND t2.closedReason = ''done''\nWHERE t1.deleted = ''0'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, story DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1103, '年度排行-产品-新增Bug条目榜', 'annualRank_productBug_created', 'mysql', 1, 'cluBarY', '44', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"product","group":""}],"yaxis":[{"field":"bug","name":"bug","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"id":{"name":"id","object":"zt_product","field":"id","type":"number"},"product":{"name":"product","object":"zt_product","field":"product","type":"string"},"bug":{"name":"bug","object":"bug","field":"bug","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u4ea7\\u54c1\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"product":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"bug":{"zh-cn":"Bug\\u8ba1\\u6570","zh-tw":"","en":"bug","de":"","fr":""}}', 'SELECT YEAR(t2.openedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS bug\nFROM zt_product AS t1\nLEFT JOIN zt_bug AS t2 ON t1.id = t2.product AND t2.deleted = ''0''\nWHERE t1.deleted = ''0'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, bug DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1104, '年度排行-产品-修复Bug条目榜', 'annualRank_productBug_fixed', 'mysql', 1, 'cluBarY', '44', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"product","name":"product","group":""}],"yaxis":[{"field":"bug","name":"bug","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"id":{"name":"id","object":"zt_product","field":"id","type":"number"},"product":{"name":"product","object":"zt_product","field":"product","type":"string"},"bug":{"name":"bug","object":"bug","field":"bug","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"id":{"zh-cn":"\\u4ea7\\u54c1\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"product":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"","en":"product","de":"","fr":""},"bug":{"zh-cn":"Bug\\u8ba1\\u6570","zh-tw":"","en":"bug","de":"","fr":""}}', 'SELECT YEAR(t2.closedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS bug\nFROM zt_product AS t1\nLEFT JOIN zt_bug AS t2 ON t1.id = t2.product AND t2.deleted = ''0'' AND t2.resolution = ''fixed'' AND t2.status = ''closed''\nWHERE t1.deleted = ''0'' AND t1.shadow = ''0'' AND t1.vision = ''rnd'' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, bug DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1105, '年度排行-个人-创建需求条目榜', 'annualRank_personalStoryCount_created', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_user","field":"realname","type":"string"},"count":{"name":"count","object":"story","field":"count","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"count":{"zh-cn":"\\u8ba1\\u6570","zh-tw":"","en":"count","de":"","fr":""}}', 'SELECT\nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_story AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=''story'' AND t1.action=''opened'' AND t3.deleted=''0''\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1106, '年度排行-个人-创建用例条目榜', 'annualRank_personalCaseCount_created', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"testcase","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_user","field":"realname","type":"string"},"count":{"name":"count","object":"testcase","field":"count","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"count":{"zh-cn":"\\u8ba1\\u6570","zh-tw":"","en":"count","de":"","fr":""}}', 'SELECT\nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_case AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=''case'' AND t1.action=''opened'' AND t3.deleted=''0''\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1107, '年度排行-个人-创建Bug条目榜', 'annualRank_personalBug_created', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_user","field":"realname","type":"string"},"count":{"name":"count","object":"bug","field":"count","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"count":{"zh-cn":"\\u8ba1\\u6570","zh-tw":"","en":"count","de":"","fr":""}}', 'SELECT\nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_bug AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=''bug'' AND t1.action=''opened'' AND t3.deleted=''0''\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1108, '年度排行-个人-修复Bug条目榜', 'annualRank_personalBug_Fixed', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_user","field":"realname","type":"string"},"count":{"name":"count","object":"bug","field":"count","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"count":{"zh-cn":"\\u8ba1\\u6570","zh-tw":"","en":"count","de":"","fr":""}}', 'SELECT\nYEAR(t3.openedDate) AS `year`,t2.realname,count(DISTINCT t3.id) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_bug AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=''bug'' AND t1.action=''resolved'' AND t3.deleted=''0''\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1109, '年度排行-个人-工时消耗榜', 'annualRank_personalConsumed', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"consumed","name":"\\u8017\\u65f6","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"user","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_user","field":"realname","type":"string"},"consumed":{"name":"\\u8017\\u65f6","object":"effort","field":"consumed","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"consumed":{"zh-cn":"\\u8017\\u65f6","zh-tw":"","en":"consumed","de":"","fr":""}}', 'SELECT YEAR(t1.date) AS `year`, t2.realname, ROUND(SUM(t1.consumed),1) AS consumed\nFROM zt_effort AS t1 LEFT JOIN zt_user AS t2 ON t1.account = t2.account\nWHERE t1.deleted = ''0'' AND t2.deleted = ''0''\nGROUP BY `year`, realname\nORDER BY `year`, consumed DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (1110, '年度排行-个人-禅道操作次数榜', 'annualRank_personalAction', 'mysql', 1, 'cluBarY', '56', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"realname","name":"realname","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"user","field":"year","type":"number"},"realname":{"name":"realname","object":"zt_action","field":"realname","type":"string"},"count":{"name":"count","object":"user","field":"count","type":"string"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""},"realname":{"zh-cn":"\\u59d3\\u540d","zh-tw":"","en":"realname","de":"","fr":""},"count":{"zh-cn":"\\u8ba1\\u6570","zh-tw":"","en":"count","de":"","fr":""}}', 'SELECT YEAR(t1.date) AS `year`,IFNULL(t2.realname,t1.actor) AS realname,count(1) AS count FROM zt_action t1 LEFT JOIN zt_user AS t2 ON t1.actor=t2.account where t1.actor is not null and t1.actor not in('''', ''system'') GROUP BY `year`,t1.actor ORDER BY `year`, `count` DESC', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10000, '年度完成项目-完成项目数', 'annualFinishedProject_countProject', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_project WHERE type=''project'' AND status=''closed'' AND deleted=''0'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10001, '年度完成项目-按时完成项目数', 'annualFinishedProject_countProject_finished_ontime', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) as ''year'' FROM (SELECT id, begin, end, IF(left(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd,closedDate FROM zt_project WHERE deleted=''0'' AND type=''project'' AND status=''closed'') t1 WHERE t1.realEnd<=end GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10002, '年度完成项目-延期完成项目数', 'annualFinishedProject_countProject_finished_delay', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM (SELECT id, begin, end, IF(left(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd,closedDate FROM zt_project WHERE deleted=''0'' AND type=''project'' AND status=''closed'') t1 WHERE t1.realEnd>end GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10003, '年度完成项目-完成需求条目数', 'annualFinishedProject_storyCount_finished', 'mysql', 2, 'card', '75', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_story WHERE deleted=''0'' AND status=''closed'' AND closedReason=''done'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10004, '年度完成项目-完成需求规模数', 'annualFinishedProject_storyEstimate_finished', 'mysql', 2, 'card', '75', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT ROUND(SUM(estimate),2) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_story WHERE deleted=''0'' AND status=''closed'' AND closedReason=''done'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10005, '年度完成项目-完成发布数', 'annualFinishedProject_release_finished', 'mysql', 2, 'card', '74', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`date`) AS ''year'' FROM zt_release WHERE deleted=''0'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10006, '年度完成项目-解决bug数', 'annualFinishedProject_bug_fixed', 'mysql', 2, 'card', '77', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT SUM(CASE WHEN resolution=''fixed'' THEN 1 ELSE 0 END) AS number,YEAR(`resolvedDate`) AS ''year'' FROM zt_bug WHERE deleted=''0'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10007, '年度完成项目-完成执行数', 'annualFinishedProject_execution_finished', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_project WHERE type=''sprint'' AND status=''closed'' AND deleted=''0'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10008, '年度完成项目-按时完成执行数', 'annualFinishedProject_execution_finished_ontime', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM (SELECT id, begin, end, IF(LEFT(realEnd,4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd,closedDate FROM zt_project WHERE deleted=''0'' AND type=''sprint'' AND status=''closed'') t1 WHERE t1.realEnd<=end GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10009, '年度完成项目-延期完成执行数', 'annualFinishedProject_execution_finished_delay', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM (SELECT id, begin, end, IF(LEFT(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' AND type=''sprint'' AND status=''closed'') t1 WHERE t1.realEnd>end GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10010, '年度完成项目-完成任务条目数', 'annualFinishedProject_taskCount_finished', 'mysql', 2, 'card', '76', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(1) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_task WHERE deleted=''0'' AND status=''closed'' AND closedReason=''done'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10011, '年度完成项目-完成任务预计工时数', 'annualFinishedProject_taskEstimate_finished', 'mysql', 2, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT ROUND(SUM(estimate),2) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_task WHERE deleted=''0'' AND status=''closed'' AND closedReason=''done'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10012, '年度完成项目-完成任务消耗工时数', 'annualFinishedProject_taskConsumed_finished', 'mysql', 2, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT ROUND(SUM(consumed),2) AS number,YEAR(`closedDate`) AS ''year'' FROM zt_task WHERE deleted=''0'' AND status=''closed'' AND closedReason=''done'' GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10013, '年度完成项目-投入的总人天', 'annualFinishedProject_workingDayConsumed', 'mysql', 2, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT SUM(t2.people*DATEDIFF(t1.realEnd,t1.realBegan)) AS number,YEAR(`closedDate`) AS ''year'' FROM (SELECT id, realBegan, IF(LEFT(realEnd, 4) = ''0000'', closedDate, realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' AND status=''closed'' AND type=''project'' AND realBegan != ''0000-00-00'') t1 LEFT JOIN (SELECT root, COUNT(id) people FROM zt_team WHERE type=''project'' GROUP BY `root`) t2 ON t1.id=t2.root GROUP BY `year`', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10014, '年度完成项目-项目按期完成率', 'annualFinishedProject_projectFinishedRatio', 'mysql', 2, 'waterpolo', '71', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"projectstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"projectstatus":{"name":"projectstatus","object":"project","field":"projectstatus","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"string"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"projectstatus":{"zh-cn":"\\u9879\\u76ee\\u72b6\\u6001","zh-tw":"","en":"projectstatus","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""}}', 'SELECT t1.id,IF(t1.realEnd<=t1.end,''done'',''undone'') AS ''projectstatus'', YEAR(`closedDate`) AS ''year'' FROM(SELECT id, begin, end, IF(LEFT(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' AND type=''project'' AND status=''closed'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10015, '年度完成项目-执行按期完成率', 'annualFinishedProject_executionFinishedRatio', 'mysql', 2, 'waterpolo', '71', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"projectstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"projectstatus":{"name":"projectstatus","object":"project","field":"projectstatus","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"string"}}', '{"id":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"id","de":"","fr":""},"projectstatus":{"zh-cn":"\\u6267\\u884c\\u72b6\\u6001","zh-tw":"","en":"projectstatus","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""}}', 'SELECT t1.id,IF(t1.realEnd<=t1.end,''done'',''undone'') AS ''projectstatus'', YEAR(`closedDate`) AS ''year'' FROM (SELECT id, begin, end, IF(LEFT(realEnd,4)=''0000'',LEFT(closedDate,10), realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' and type=''sprint'' and status=''closed'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10016, '年度完成项目-项目延期率', 'annualFinishedProject_projectDelayRatio', 'mysql', 2, 'waterpolo', '71', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"projectstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"projectstatus":{"name":"projectstatus","object":"project","field":"projectstatus","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"string"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"projectstatus":{"zh-cn":"\\u9879\\u76ee\\u72b6\\u6001","zh-tw":"","en":"projectstatus","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""}}', 'SELECT t1.id,IF(t1.realEnd>t1.end ,''done'',''undone'') AS ''projectstatus'', YEAR(`closedDate`) AS ''year'' FROM (SELECT id, begin, end, IF(LEFT(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' AND type=''project'' AND status=''closed'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10017, '年度完成项目-执行延期率', 'annualFinishedProject_executionDelayRatio', 'mysql', 2, 'waterpolo', '71', '0', NULL, '[{"type":"waterpolo","calc":"count","goal":"id","conditions":[{"field":"projectstatus","condition":"eq","value":"done"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"projectstatus":{"name":"projectstatus","object":"project","field":"projectstatus","type":"string"},"year":{"name":"year","object":"project","field":"year","type":"string"}}', '{"id":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"id","de":"","fr":""},"projectstatus":{"zh-cn":"\\u6267\\u884c\\u72b6\\u6001","zh-tw":"","en":"projectstatus","de":"","fr":""},"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"year","de":"","fr":""}}', 'SELECT t1.id,IF(t1.realEnd>t1.end,''done'',''undone'') AS ''projectstatus'', YEAR(`closedDate`) AS ''year'' FROM(SELECT id, begin, end, IF(LEFT(realEnd, 4) = ''0000'', LEFT(closedDate,10), realEnd) AS realEnd, closedDate FROM zt_project WHERE deleted=''0'' and type=''sprint'' and status=''closed'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10018, '年度完成项目-完成项目工期偏差条形图', 'annualFinishedProject_projectFinishedDurationDeviation', 'mysql', 2, 'cluBarY', '71', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"\\u9879\\u76ee\\u540d\\u79f0","group":""}],"yaxis":[{"field":"daterate","name":"daterate","valOrAgg":"max"}]}]', '[{"field":"closedDate","type":"date","name":"\\u5173\\u95ed\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"name":{"name":"\\u9879\\u76ee\\u540d\\u79f0","object":"project","field":"name","type":"string"},"closedDate":{"name":"\\u5173\\u95ed\\u65e5\\u671f","object":"project","field":"closedDate","type":"date"},"daterate":{"name":"daterate","object":"project","field":"daterate","type":"number"}}', '{"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"closedDate":{"zh-cn":"\\u5173\\u95ed\\u65e5\\u671f","zh-tw":"","en":"closedDate","de":"","fr":""},"daterate":{"zh-cn":"\\u5de5\\u671f\\u504f\\u5dee\\u7387","zh-tw":"","en":"daterate","de":"","fr":""}}', 'select\nt1.name,\nt1.closedDate,\nround(t1.realduration-t1.planduration)/t1.planduration as daterate\nfrom(\nselect\nname,\nid,\nclosedDate,\nbegin,\nend,\ndatediff(`end`,`begin`) planduration,\nrealBegan,\nrealEnd,\nifnull(if(left(realEnd,4) != ''0000'',datediff(`realEnd`,`realBegan`),datediff(`closedDate`,`realBegan`)),0) realduration\nfrom\nzt_project\nwhere deleted=''0''\nand status=''closed''\nand type=''project''\n) t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0); INSERT INTO `zt_chart` VALUES (10019, '年度完成项目-单位工时交付需求规模数对比图', 'annualFinishedProject_storyEstimatePerHour', 'mysql', 2, 'pie', '71', '0', NULL, '[{"type":"cluBarX","xaxis":[{"field":"project","name":"\\u6240\\u5c5e\\u9879\\u76ee","group":""}],"yaxis":[{"field":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","name":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","valOrAgg":"sum"}]}]', '[{"field":"project","type":"input","name":"\\u6240\\u5c5e\\u9879\\u76ee","default":""}]', 0, '{"project":{"name":"\\u6240\\u5c5e\\u9879\\u76ee","object":"project","field":"project","type":"string"},"\\u6545\\u4e8b\\u70b9":{"name":"\\u6545\\u4e8b\\u70b9","object":"project","field":"\\u6545\\u4e8b\\u70b9","type":"number"},"\\u5de5\\u65f6":{"name":"\\u5de5\\u65f6","object":"project","field":"\\u5de5\\u65f6","type":"number"},"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570":{"name":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","object":"project","field":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","type":"number"}}', NULL, 'select tt.*,\ntt.`故事点` / tt.`工时` as "单位时间交付需求规模数"\nfrom (\nselect\nt1.name as project,\n(\n select round(sum(t3.estimate), 1) from zt_projectstory t2\n left join zt_story t3 on t3.id= t2.story and t3.status=''closed'' and t3.closedReason = ''done''\n where t2.project = t1.id\n) as "故事点",\n(\n select round(sum(t5.consumed), 1) from zt_project t4\n left join zt_task t5 on t5.execution = t4.id and t5.deleted = ''0'' and t5.parent in (0, -1)\n where t4.project = t1.id and t4.type = ''sprint''\n) as "工时"\nfrom zt_project t1\nwhere t1.status = ''closed''\nand t1.deleted = ''0''\nand t1.type = ''project''\ngroup by t1.id) tt', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10020, '年度完成项目-项目完成分布图', 'annualFinishedProject_projectStatus_finished', 'mysql', 2, 'pie', '71', '0', NULL, '[{"type":"pie","group":[{"field":"completeStatus","name":"completeStatus","group":""}],"metric":[{"field":"id","name":"\\u9879\\u76eeID","valOrAgg":"count"}]}]', '[{"field":"closedDate","type":"date","name":"\\u5173\\u95ed\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"completeStatus":{"name":"completeStatus","object":"project","field":"completeStatus","type":"string"},"closedDate":{"name":"\\u5173\\u95ed\\u65e5\\u671f","object":"project","field":"closedDate","type":"date"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"completeStatus":{"zh-cn":"\\u9879\\u76ee\\u5b8c\\u6210\\u60c5\\u51b5","zh-tw":"","en":"completeStatus","de":"","fr":""},"closedDate":{"zh-cn":"\\u5173\\u95ed\\u65e5\\u671f","zh-tw":"","en":"closedDate","de":"","fr":""}}', 'select\nt1.id,\n(case when t1.realEnd<t1.end then "提前完成项目" when t1.realEnd=t1.end then "正常完成项目" else "延期完成项目" end) "completeStatus",\nt1.closedDate\nfrom(\nselect\nid,\nclosedDate,\nend,\nif(left(realEnd, 4) = ''0000'', closedDate, realEnd) as realEnd\nfrom\nzt_project\nwhere deleted=''0''\nand status=''closed''\nand type=''project'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10021, '年度完成项目-执行完成分布图', 'annualFinishedProject_executionStatus_finished', 'mysql', 2, 'pie', '71', '0', NULL, '[{"type":"pie","group":[{"field":"completeStatus","name":"completeStatus","group":""}],"metric":[{"field":"id","name":"\\u9879\\u76eeID","valOrAgg":"count"}]}]', '[{"field":"closedDate","type":"date","name":"\\u5173\\u95ed\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"completeStatus":{"name":"completeStatus","object":"project","field":"completeStatus","type":"string"},"closedDate":{"name":"\\u5173\\u95ed\\u65e5\\u671f","object":"project","field":"closedDate","type":"date"}}', '{"id":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"id","de":"","fr":""},"completeStatus":{"zh-cn":"\\u5b8c\\u6210\\u60c5\\u51b5","zh-tw":"","en":"completeStatus","de":"","fr":""},"closedDate":{"zh-cn":"\\u5173\\u95ed\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""}}', 'select\nt1.id,\n(case when t1.realEnd<t1.end then "提前完成执行" when t1.realEnd=t1.end then "正常完成执行" else "延期完成执行" end) "completeStatus",\nt1.closedDate\nfrom(\nselect\nid,\nclosedDate,\nend,\nif(left(realEnd, 4) = ''0000'', closedDate, realEnd) as realEnd\nfrom\nzt_project\nwhere deleted=''0''\nand status=''closed''\nand type=''sprint'') t1', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10022, '年度完成项目-完成项目工时偏差条形图', 'annualFinishedProject_projectHourDeviation_finished', 'mysql', 2, 'cluBarY', '70', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"\\u4efb\\u52a1\\u540d\\u79f0","group":""}],"yaxis":[{"field":"rate","name":"rate","valOrAgg":"sum"}]}]', '[{"field":"closedDate","type":"date","name":"\\u5173\\u95ed\\u65f6\\u95f4","default":{"begin":"","end":""}}]', 0, '{"name":{"name":"\\u4efb\\u52a1\\u540d\\u79f0","object":"project","field":"name","type":"string"},"id":{"name":"\\u7f16\\u53f7","object":"project","field":"id","type":"number"},"closedDate":{"name":"\\u5173\\u95ed\\u65f6\\u95f4","object":"task","field":"closedDate","type":"date"},"estimate":{"name":"\\u6700\\u521d\\u9884\\u8ba1","object":"task","field":"estimate","type":"string"},"consumed":{"name":"\\u603b\\u8ba1\\u6d88\\u8017","object":"task","field":"consumed","type":"string"},"left":{"name":"\\u9884\\u8ba1\\u5269\\u4f59","object":"task","field":"left","type":"string"},"deviation":{"name":"deviation","object":"task","field":"deviation","type":"number"},"rate":{"name":"rate","object":"task","field":"rate","type":"number"}}', '{"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76ee\\u7f16\\u53f7","zh-tw":"","en":"id","de":"","fr":""},"closedDate":{"zh-cn":"\\u5173\\u95ed\\u65f6\\u95f4","zh-tw":"","en":"closedDate","de":"","fr":""},"estimate":{"zh-cn":"\\u6700\\u521d\\u9884\\u8ba1","zh-tw":"","en":"estimate","de":"","fr":""},"consumed":{"zh-cn":"\\u603b\\u8ba1\\u6d88\\u8017","zh-tw":"","en":"consumed","de":"","fr":""},"left":{"zh-cn":"\\u9884\\u8ba1\\u5269\\u4f59","zh-tw":"","en":"left","de":"","fr":""},"deviation":{"zh-cn":"\\u504f\\u5dee","zh-tw":"","en":"deviation","de":"","fr":""},"rate":{"zh-cn":"\\u504f\\u5dee\\u6bd4\\u7387","zh-tw":"","en":"rate","de":"","fr":""}}', 'select\n*,\nround(tt.deviation/tt.estimate,3) rate\nfrom(\nselect\nt1.name,\nt1.id,\nt1.closedDate,\nt2.estimate estimate,\nt2.consumed consumed,\nt2.`left`,\nt2.consumed-t2.estimate deviation\nfrom\nzt_project t1\nleft join\n(select\nproject,\nsum(estimate) estimate,\nsum(consumed) consumed,\nsum(`left`) `left`\nfrom\nzt_task\ngroup by project) t2\non t1.id=t2.project\nwhere t1.deleted=''0''\nand t1.status=''closed''\nand t1.type=''project'') tt', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10101, '年度进行中项目-进行中的项目数', 'annualDoingProject_countProject', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id FROM zt_project WHERE deleted = ''0'' AND status = ''doing'' AND type = ''project''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10102, '年度进行中项目-进行中的迭代数', 'annualDoingProject_countExecution', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id,type FROM zt_project WHERE deleted = ''0'' AND status = ''doing'' AND type IN (''sprint'', ''stage'', ''kanban'') AND multiple = ''1''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10103, '年度进行中项目-进展顺利项目数', 'annualDoingProject_countProject_good', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.name, IFNULL(prograss, 0) AS prograss, ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,LEFT(t1.`end`, 4) AS endYear\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))), 0) * 100, 2) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type IN (''sprint'', ''kanban'')\n AND t22.deleted = ''0'' AND t22.parent < 1\n GROUP BY t22.project\n UNION\n SELECT t.project, ROUND(SUM(t.prograss * (t.percent / 100)), 2) as prograss\n FROM (\n SELECT t21.id,t21.percent, t22.project,\n IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, ROUND(SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))) * 1000 / 1000 * 100, 2), 0) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type = ''stage''\n AND t22.deleted = ''0'' AND t22.parent < 1\n AND t22.id IS NOT NULL\n GROUP BY t21.id, t21.percent, t22.project\n ) t\n GROUP BY t.project\n) AS t2 ON t1.id = t2.project\nWHERE t1.deleted = ''0''\nAND t1.status = ''doing''\nAND t1.type = ''project''\nAND ((IFNULL(prograss, 0) >= (DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100) AND LEFT(t1.`end`, 4) != ''2059'' AND DATEDIFF(`end`, NOW()) >= 0) OR LEFT(t1.`end`, 4) = ''2059'' )', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10104, '年度进行中项目-进展顺利迭代数', 'annualDoingProject_countExecution_good', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id, prograss, planPrograss, `end`\nFROM (\nSELECT t1.id,ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,t1.`end`,\nROUND(IF(SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0)) > 0, SUM(t2.consumed) / (SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0))), 0) * 100, 2) AS prograss\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nWHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\nAND t2.deleted = ''0'' AND t2.parent < 1\nGROUP BY t1.id\n) AS t\nWHERE prograss >= planPrograss AND DATEDIFF(`end`, NOW()) >= 0', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10105, '年度进行中项目-进度滞后项目数', 'annualDoingProject_countProject_bad', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.name, IFNULL(prograss, 0) AS prograss, ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss\n, LEFT(t1.`end`, 4) AS endYear\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))), 0) * 100, 2) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type IN (''sprint'', ''kanban'')\n AND t22.deleted = ''0'' AND t22.parent < 1\n GROUP BY t22.project\n UNION\n SELECT t.project, ROUND(SUM(t.prograss * (t.percent / 100)), 2) as prograss\n FROM (\n SELECT t21.id,t21.percent, t22.project,\n IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, ROUND(SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))) * 1000 / 1000 * 100, 2), 0) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type = ''stage''\n AND t22.deleted = ''0'' AND t22.parent < 1\n AND t22.id IS NOT NULL\n GROUP BY t21.id, t21.percent, t22.project\n ) t\n GROUP BY t.project\n) AS t2 ON t1.id = t2.project\nWHERE t1.deleted = ''0''\nAND t1.status = ''doing''\nAND t1.type = ''project''\nAND LEFT(t1.`end`, 4) != ''2059''\nAND IFNULL(prograss, 0) < (DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100) AND DATEDIFF(`end`, NOW()) >= 0', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10106, '年度进行中项目-进度滞后迭代数', 'annualDoingProject_countExecution_bad', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id, prograss, planPrograss\nFROM (\nSELECT t1.id,ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,\nROUND(IF(SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0)) > 0, SUM(t2.consumed) / (SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0))), 0) * 100, 2) AS prograss\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nWHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1'' AND DATEDIFF(t1.`end`, NOW()) >= 0\nAND t2.deleted = ''0'' AND t2.parent < 1\nGROUP BY t1.id\n) AS t\nWHERE prograss < planPrograss', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10107, '年度进行中项目-已延期项目数', 'annualDoingProject_countPorject_delay', 'mysql', 2, 'card', '72', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id, name FROM zt_project WHERE deleted = ''0'' AND status = ''doing'' AND type = ''project'' AND LEFT(`end`, 4) != ''2059'' AND DATEDIFF(`end`, NOW()) < 0', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10108, '年度进行中项目-已延期迭代数', 'annualDoingProject_countExecution_delay', 'mysql', 2, 'card', '73', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT id, name FROM zt_project WHERE deleted = ''0'' AND status = ''doing'' AND type IN (''sprint'', ''stage'', ''kanban'') AND DATEDIFF(`end`, NOW()) < 0 AND multiple = ''1''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10109, '年度进行中项目-未完成需求条目数', 'annualDoingProject_storyCount_undone', 'mysql', 2, 'card', '75', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT t3.id, t3.estimate\nFROM zt_project AS t1\nLEFT JOIN zt_projectstory AS t2 ON t1.id = t2.project\nLEFT JOIN zt_story AS t3 ON t2.story = t3.id\nWHERE t1.deleted = ''0'' AND t1.status = ''doing'' AND t1.type = ''project''\nAND t3.deleted = ''0'' AND t3.stage NOT IN (''verified'', ''released'', ''closed'')', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10110, '年度进行中项目-未完成任务数', 'annualDoingProject_countTask_undone', 'mysql', 2, 'card', '76', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT t2.id\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nWHERE t1.deleted = ''0'' AND t1.status = ''doing'' AND t1.type IN (''sprint'', ''stage'', ''kanban'')\nAND t2.deleted = ''0'' AND t2.status IN (''wait'', ''doing'', ''pause'') AND t2.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10111, '年度进行中项目-未完成需求规模数', 'annualDoingProject_storyEstimate_undone', 'mysql', 2, 'card', '75', '0', NULL, '{"value":{"type":"agg","field":"estimate","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT t3.id, t3.estimate\nFROM zt_project AS t1\nLEFT JOIN zt_projectstory AS t2 ON t1.id = t2.project\nLEFT JOIN zt_story AS t3 ON t2.story = t3.id\nWHERE t1.deleted = ''0'' AND t1.status = ''doing'' AND t1.type = ''project''\nAND t3.deleted = ''0'' AND t3.stage NOT IN (''verified'', ''released'', ''closed'')', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10112, '年度进行中项目-剩余工时数', 'annualDoingProject_leftEffort', 'mysql', 2, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"taskleft","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.name, `taskleft`\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)), 2) AS `taskleft`\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type IN (''sprint'', ''stage'', ''kanban'')\n AND t22.deleted = ''0'' AND t22.parent < 1\n GROUP BY t22.project\n) AS t2 ON t1.id = t2.project\nWHERE t1.deleted = ''0''\nAND t1.status = ''doing''\nAND t1.type = ''project''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10113, '年度进行中项目-投入总人次', 'annualDoingProject_investedPeople', 'mysql', 2, 'card', '', '0', NULL, '{"value":{"type":"agg","field":"id","agg":"count"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT t1.id,t1.type,t1.account\nFROM zt_team AS t1\nLEFT JOIN zt_user AS t2 on t1.account = t2.account\nWHERE t1.type = ''project'' AND t2.deleted = ''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10114, '年度进行中项目-项目进度分布图', 'annualDoingProject_projectProgressChart', 'mysql', 2, 'pie', '69', '0', NULL, '[{"type":"pie","group":[{"field":"status","name":"\\u72b6\\u6001","group":""}],"metric":[{"field":"id","name":"id","valOrAgg":"count"}]}]', NULL, 0, '{"id":{"name":"id","object":"zt_project","field":"id","type":"number"},"name":{"name":"name","object":"zt_project","field":"name","type":"string"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"},"prograss":{"name":"prograss","object":"task","field":"prograss","type":"number"},"planPrograss":{"name":"planPrograss","object":"task","field":"planPrograss","type":"number"},"endYear":{"name":"endYear","object":"task","field":"endYear","type":"string"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""},"prograss":{"zh-cn":"\\u9879\\u76ee\\u8fdb\\u5ea6","zh-tw":"","en":"prograss","de":"","fr":""},"planPrograss":{"zh-cn":"\\u8ba1\\u5212\\u8fdb\\u5ea6","zh-tw":"","en":"planPrograss","de":"","fr":""},"endYear":{"zh-cn":"\\u7ed3\\u675f\\u5e74\\u4efd","zh-tw":"","en":"endYear","de":"","fr":""}}', 'SELECT t1.id, t1.name,\nIF(\n DATEDIFF(t1.`end`, NOW()) < 0,\n "延期",\n (IF(\n (IFNULL(prograss, 0) >= (DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100) AND LEFT(t1.`end`, 4) != ''2059'')\n OR LEFT(t1.`end`, 4) = ''2059'' ,\n "顺利",\n "滞后"\n ))) AS ''status'',\nIFNULL(prograss, 0) AS prograss, ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,LEFT(t1.`end`, 4) AS endYear\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))), 0) * 100, 2) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type IN (''sprint'', ''kanban'')\n AND t22.deleted = ''0'' AND t22.parent < 1\n GROUP BY t22.project\n UNION\n SELECT t.project, ROUND(SUM(t.prograss * (t.percent / 100)), 2) as prograss\n FROM (\n SELECT t21.id,t21.percent, t22.project,\n IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, ROUND(SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))) * 1000 / 1000 * 100, 2), 0) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type = ''stage''\n AND t22.deleted = ''0'' AND t22.parent < 1\n AND t22.id IS NOT NULL\n GROUP BY t21.id, t21.percent, t22.project\n ) t\n GROUP BY t.project\n) AS t2 ON t1.id = t2.project\nWHERE t1.deleted = ''0''\nAND t1.status = ''doing''\nAND t1.type = ''project''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10115, '年度进行中项目-迭代进度分布图', 'annualDoingProject_executionProgressChart', 'mysql', 2, 'pie', '69', '0', NULL, '[{"type":"pie","group":[{"field":"status","name":"\\u72b6\\u6001","group":""}],"metric":[{"field":"id","name":"\\u9879\\u76eeID","valOrAgg":"count"}]}]', NULL, 0, '{"id":{"name":"\\u9879\\u76eeID","object":"project","field":"id","type":"number"},"name":{"name":"\\u9879\\u76ee\\u540d\\u79f0","object":"project","field":"name","type":"string"},"status":{"name":"\\u72b6\\u6001","object":"project","field":"status","type":"option"},"prograss":{"name":"prograss","object":"task","field":"prograss","type":"number"},"planPrograss":{"name":"planPrograss","object":"task","field":"planPrograss","type":"number"},"end":{"name":"\\u8ba1\\u5212\\u5b8c\\u6210","object":"project","field":"end","type":"date"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"id","de":"","fr":""},"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"name","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"status","de":"","fr":""},"prograss":{"zh-cn":"\\u9879\\u76ee\\u8fdb\\u5ea6","zh-tw":"","en":"prograss","de":"","fr":""},"planPrograss":{"zh-cn":"\\u8ba1\\u5212\\u8fdb\\u5ea6","zh-tw":"","en":"planPrograss","de":"","fr":""},"end":{"zh-cn":"\\u8ba1\\u5212\\u5b8c\\u6210","zh-tw":"","en":"end","de":"","fr":""}}', 'SELECT id, name,IF(\n DATEDIFF(`end`, NOW()) < 0,\n "延期",\n (IF(\n prograss >= planPrograss,\n "顺利",\n "滞后"\n ))\n) AS status,\nprograss, planPrograss, `end`\nFROM (\nSELECT t1.id,t1.name,ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,t1.`end`,\nROUND(IF(SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0)) > 0, SUM(t2.consumed) / (SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0))), 0) * 100, 2) AS prograss\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nWHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\nAND ((t2.deleted = ''0'' AND t2.parent < 1) OR t2.id IS NULL)\nGROUP BY t1.id\n) AS t', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10116, '年度进行中项目-项目进度透视表', 'annualDoingProject_projectProgressPivot', 'mysql', 2, 'table', '84', '0', NULL, '{"group":[],"column":[{"field":"program","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"name","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"begin","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5f00\\u59cb\\u65e5\\u671f"},{"field":"end","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5b8c\\u6210\\u65e5\\u671f"},{"field":"planDuration","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5de5\\u671f"},{"field":"realBegan","valOrAgg":"value","name":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f"},{"field":"realDuration","valOrAgg":"value","name":"\\u5269\\u4f59\\u5de5\\u671f\\u5929\\u6570"},{"field":"prograss","valOrAgg":"value","name":"\\u5de5\\u671f\\u8fdb\\u5ea6"},{"field":"status","valOrAgg":"value","name":"\\u8fdb\\u5ea6\\u72b6\\u6001"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.name, IFNULL(t3.name, ''/'') AS program,t1.`begin`, IF(YEAR(t1.`end`) = ''2059'', "长期", t1.`end`) AS `end`, IF(YEAR(t1.`end`) = ''2059'', "长期", DATEDIFF(t1.`end`, t1.`begin`) + 1) AS planDuration,\nIF(LEFT(t1.realBegan, 4) = ''0000'', ''/'', t1.realBegan) AS realBegan, IF(YEAR(t1.`end`) = ''2059'', "长期", IF(DATEDIFF(t1.`end`, NOW()) >= 0, DATEDIFF(t1.`end`, NOW()) + 1, 0)) AS realDuration,\nIF(\n DATEDIFF(t1.`end`, NOW()) < 0,\n "延期",\n (IF(\n (IFNULL(prograss, 0) >= (DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100) AND LEFT(t1.`end`, 4) != ''2059'')\n OR LEFT(t1.`end`, 4) = ''2059'' ,\n "顺利",\n "滞后"\n ))) AS ''status'',\nCONCAT(IFNULL(prograss, 0), ''%'') AS prograss\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))), 0) * 100, 2) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type IN (''sprint'', ''kanban'')\n AND t22.deleted = ''0'' AND t22.parent < 1\n GROUP BY t22.project\n UNION\n SELECT t.project, ROUND(SUM(t.prograss * (t.percent / 100)), 2) as prograss\n FROM (\n SELECT t21.id,t21.percent, t22.project,\n IF(SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0)) > 0, ROUND(SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != ''closed'' && t22.status != ''cancel'', t22.`left`, 0))) * 1000 / 1000 * 100, 2), 0) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = ''0'' AND t21.type = ''stage''\n AND t22.deleted = ''0'' AND t22.parent < 1\n AND t22.id IS NOT NULL\n GROUP BY t21.id, t21.percent, t22.project\n ) t\n GROUP BY t.project\n) AS t2 ON t1.id = t2.project\nLEFT JOIN zt_project AS t3 ON SUBSTR(t1.path, 2, POSITION('','' IN SUBSTR(t1.path, 2)) -1) = t3.id AND t3.type = ''program'' AND t3.deleted = ''0''\nWHERE t1.deleted = ''0''\nAND t1.status = ''doing''\nAND t1.type = ''project''\nAND FIND_IN_SET(''rnd'', t1.vision)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10117, '年度进行中项目-迭代进度透视表', 'annualDoingProject_executionProgressPivot', 'mysql', 2, 'table', '84', '0', NULL, '{"group":[],"column":[{"field":"project","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"name","valOrAgg":"value","name":"\\u8fed\\u4ee3"},{"field":"begin","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5f00\\u59cb\\u65e5\\u671f"},{"field":"end","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5b8c\\u6210\\u65e5\\u671f"},{"field":"planDuration","valOrAgg":"value","name":"\\u8ba1\\u5212\\u5de5\\u671f"},{"field":"realBegan","valOrAgg":"value","name":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f"},{"field":"realDuration","valOrAgg":"value","name":"\\u5269\\u4f59\\u5de5\\u671f\\u5929\\u6570"},{"field":"prograss","valOrAgg":"value","name":"\\u5de5\\u671f\\u8fdb\\u5ea6"},{"field":"status","valOrAgg":"value","name":"\\u8fdb\\u5ea6\\u72b6\\u6001"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT id, name,project,`begin`, `end`, planDuration, IF(LEFT(realBegan, 4) = ''0000'', ''/'', realBegan) as realBegan, realDuration, CONCAT(prograss, ''%'') as prograss,\nIF(\n DATEDIFF(`end`, NOW()) < 0,\n "延期",\n (IF(\n prograss >= planPrograss,\n "顺利",\n "滞后"\n ))\n) AS status\nFROM (\nSELECT t1.id,t1.name,t1.`begin`,t1.`end`,t1.`realBegan`,IFNULL(t3.name, ''/'') AS project,t3.id AS projectID,\nDATEDIFF(t1.`end`, t1.`begin`) + 1 AS planDuration, IF(DATEDIFF(t1.`end`, NOW()) >= 0, DATEDIFF(t1.`end`, NOW()) + 1, 0) AS realDuration,\nROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,\nROUND(IF(SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0)) > 0, SUM(t2.consumed) / (SUM(t2.consumed) + SUM(IF(t2.status != ''closed'' && t2.status != ''cancel'', t2.`left`, 0))), 0) * 100, 2) AS prograss\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nLEFT JOIN zt_project AS t3 on t1.project = t3.id AND t3.type = ''project'' AND t3.deleted = ''0''\nWHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\nAND t2.deleted = ''0'' AND t2.parent < 1\nGROUP BY t1.id\n) AS t\nORDER BY projectID ASC, id ASC', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10118, '年度进行中项目-项目剩余工作量透视表', 'annualDoingProject_porjectLeftPivot', 'mysql', 2, 'table', '83', '0', NULL, '{"group":[],"column":[{"field":"program","valOrAgg":"value","name":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6"},{"field":"project","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"story","valOrAgg":"value","name":"\\u5269\\u4f59\\u9700\\u6c42\\u6570"},{"field":"estimate","valOrAgg":"value","name":"\\u5269\\u4f59\\u9700\\u6c42\\u89c4\\u6a21\\u6570"},{"field":"execution","valOrAgg":"value","name":"\\u5269\\u4f59\\u6267\\u884c\\u6570"},{"field":"workhour","valOrAgg":"value","name":"\\u5269\\u4f59\\u5de5\\u65f6"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.NAME AS project, IFNULL( t2.NAME, ''/'') AS program, IFNULL( t3.story, 0 ) AS story, IFNULL( t3.estimate, 0 ) AS estimate, IFNULL( t4.execution, 0 ) AS execution, IFNULL( t5.workhour, 0 ) AS workhour FROM zt_project AS t1 LEFT JOIN zt_project AS t2 ON FIND_IN_SET( t2.id, t1.path ) AND t2.deleted = ''0'' AND t2.type = ''program'' AND t2.grade = 1 LEFT JOIN( SELECT t1.parent AS project, COUNT( 1 ) AS story, ROUND( SUM( t1.estimate ), 1 ) AS estimate FROM ( SELECT DISTINCT t1.parent, t3.id, t3.estimate FROM zt_project AS t1 LEFT JOIN zt_projectstory AS t2 ON t1.id = t2.project LEFT JOIN zt_story AS t3 ON t2.story = t3.id AND t3.deleted = ''0'' AND t3.stage NOT IN ( ''verified'', ''released'', ''closed'' ) WHERE t1.deleted = ''0'' AND t1.type IN ( ''sprint'', ''stage'', ''kanban'' ) AND t3.id IS NOT NULL ) AS t1 GROUP BY project ) AS t3 ON t1.id = t3.project LEFT JOIN ( SELECT parent AS project, COUNT( 1 ) AS execution FROM zt_project WHERE deleted = ''0'' AND type IN ( ''sprint'', ''stage'', ''kanban'' ) AND multiple = ''1'' AND STATUS NOT IN ( ''done'', ''closed'' ) GROUP BY project ) AS t4 ON t1.id = t4.project LEFT JOIN ( SELECT t1.parent AS project, ROUND( SUM( t2.LEFT ), 1 ) AS workhour FROM zt_project AS t1 LEFT JOIN zt_task AS t2 ON t1.id = t2.execution AND t2.deleted = ''0'' AND t2.parent < 1 WHERE t1.deleted = ''0'' AND t1.type IN ( ''sprint'', ''stage'', ''kanban'' ) AND t1.STATUS NOT IN ( ''done'', ''closed'' ) AND t2.id IS NOT NULL GROUP BY project ) AS t5 ON t1.id = t5.project WHERE t1.deleted = ''0'' AND t1.type = ''project'' AND t1.STATUS = ''doing''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10119, '年度进行中项目-迭代剩余工作量透视表', 'annualDoingProject_executionLeftPivot', 'mysql', 2, 'table', '83', '0', NULL, '{"group":[],"column":[{"field":"project","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"execution","valOrAgg":"value","name":"\\u8fed\\u4ee3"},{"field":"story","valOrAgg":"value","name":"\\u5269\\u4f59\\u9700\\u6c42\\u6570"},{"field":"estimate","valOrAgg":"value","name":"\\u5269\\u4f59\\u9700\\u6c42\\u89c4\\u6a21\\u6570"},{"field":"task","valOrAgg":"value","name":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570"},{"field":"workhour","valOrAgg":"value","name":"\\u5269\\u4f59\\u5de5\\u65f6"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.id,\n t1.name AS execution,\n IFNULL(t2.name, ''/'') AS project,\n IFNULL(t3.story, 0) AS story,\n IFNULL(t3.estimate, 0) AS estimate,\n IFNULL(t4.task, 0) AS task,\n IFNULL(t4.workhour, 0) AS workhour\nFROM zt_project AS t1\nLEFT JOIN zt_project AS t2 ON t1.project = t2.id AND t2.type = ''project''\nLEFT JOIN (\n SELECT t1.id AS execution, COUNT(1) AS story, ROUND(SUM(t3.estimate), 1) AS estimate\n FROM zt_project AS t1\n LEFT JOIN zt_projectstory AS t2 ON t1.id = t2.project\n LEFT JOIN zt_story AS t3 ON t2.story = t3.id AND t3.deleted = ''0'' AND t3.stage NOT IN (''verified'', ''released'', ''closed'')\n WHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\n GROUP BY execution\n) AS t3 ON t1.id = t3.execution\nLEFT JOIN (\n SELECT t1.id AS execution, SUM(IF(t2.status IN (''wait'', ''doing''), 1, 0)) AS task, ROUND(SUM(IF(t2.status IN (''wait'', ''doing'', ''pause''), t2.left, 0)), 1) AS workhour\n FROM zt_project AS t1\n LEFT JOIN zt_task AS t2 ON t1.id = t2.execution AND t2.deleted = ''0'' AND t2.parent < 1\n WHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\n GROUP BY execution\n) AS t4 ON t1.id = t4.execution\nWHERE t1.deleted = ''0'' AND t1.type IN (''sprint'', ''stage'', ''kanban'') AND t1.status = ''doing'' AND t1.multiple = ''1''\nORDER BY t2.id ASC, t1.id ASC', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10201, '质量数据-研发完成需求数', 'quality_storyCount_finished', 'mysql', 3, 'card', '93', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(id) AS number FROM zt_story WHERE deleted=''0'' AND (stage IN (''developed'',''testing'',''verfied'',''released'') OR (status=''closed'' AND closedReason=''done''))', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10202, '质量数据-研发完成需求规模数', 'quality_storyEstimate_finished', 'mysql', 3, 'card', '93', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT ROUND(SUM(estimate),2) AS number FROM zt_story WHERE deleted=''0'' AND (stage IN (''developed'',''testing'',''verfied'',''released'') OR (status=''closed'' AND closedReason=''done''))', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10203, '质量数据-研发完成需求用例数', 'quality_storyCaseCount_finished', 'mysql', 3, 'card', '92', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT SUM(t2.cases) AS number FROM (SELECT t1.story story, COUNT(t1.id) cases FROM (SELECT story,id FROM zt_case WHERE deleted=''0'') t1 GROUP BY t1.story) t2 LEFT JOIN (SELECT id,stage,status,closedReason,deleted FROM zt_story) t3 ON t2.story=t3.id WHERE t3.deleted=''0'' AND (t3.stage IN (''developed'',''testing'',''verfied'',''released'') OR (t3.status=''closed'' AND t3.closedReason=''done''))', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10204, '质量数据-Bug总数', 'quality_bugCount', 'mysql', 3, 'card', '91', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(id) AS number FROM zt_bug WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10205, '质量数据-有效Bug数', 'quality_bugCount_valid', 'mysql', 3, 'card', '91', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT SUM(CASE WHEN resolution IN (''fixed'',''postponed'') OR status=''active'' THEN 1 ELSE 0 END) AS number FROM zt_bug WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10206, '质量数据-修复Bug数', 'quality_bugCount_fixed', 'mysql', 3, 'card', '91', '0', NULL, '{"value":{"type":"agg","field":"number","agg":"sum"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT SUM(CASE WHEN resolution=''fixed'' THEN 1 ELSE 0 END) AS number FROM zt_bug WHERE deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10207, '质量数据-研发完成需求用例覆盖率', 'quality_storyCaseCoverage_finished', 'mysql', 3, 'waterpolo', '92', '0', NULL, '[{"type":"waterpolo","calc":"sum","goal":"fixpercent","conditions":[{"field":"havecase","condition":"eq","value":"havecase"}]}]', NULL, 0, '{"fixpercent":{"name":"fixpercent","object":"testcase","field":"fixpercent","type":"number"},"havecase":{"name":"havecase","object":"testcase","field":"havecase","type":"string"}}', '{"fixpercent":{"zh-cn":"\\u7528\\u4f8b\\u8986\\u76d6\\u7387","zh-tw":"","en":"fixpercent","de":"","fr":""},"havecase":{"zh-cn":"\\u662f\\u5426\\u6709\\u7528\\u4f8b","zh-tw":"","en":"havecase","de":"","fr":""}}', 'SELECT ROUND(SUM(t3.havecasefixstory)/COUNT(t3.fixstory),4) AS fixpercent, ''havecase'' as havecase FROM (SELECT t2.storyid ''fixstory'', (CASE WHEN t2.cases=0 THEN 0 ELSE 1 END) havecasefixstory FROM (SELECT t1.storyid, SUM(t1.iscase) cases FROM (SELECT zt_story.id storyid, (CASE WHEN zt_case.id is null THEN 0 ELSE 1 END) iscase FROM zt_story LEFT JOIN zt_case ON zt_story.id=zt_case.story WHERE zt_story.deleted=''0'' AND (zt_story.stage IN (''developed'',''testing'',''verfied'',''released'') OR (zt_story.status=''closed'' AND zt_story.closedReason=''done''))) t1 GROUP BY t1.storyid ORDER BY cases DESC) t2) t3\nunion\nSELECT ROUND(1-SUM(t3.havecasefixstory)/COUNT(t3.fixstory),4) AS fixpercent, ''nocase'' as havecase FROM (SELECT t2.storyid ''fixstory'', (CASE WHEN t2.cases=0 THEN 0 ELSE 1 END) havecasefixstory FROM (SELECT t1.storyid, SUM(t1.iscase) cases FROM (SELECT zt_story.id storyid, (CASE WHEN zt_case.id is null THEN 0 ELSE 1 END) iscase FROM zt_story LEFT JOIN zt_case ON zt_story.id=zt_case.story WHERE zt_story.deleted=''0'' AND (zt_story.stage IN (''developed'',''testing'',''verfied'',''released'') OR (zt_story.status=''closed'' AND zt_story.closedReason=''done''))) t1 GROUP BY t1.storyid ORDER BY cases DESC) t2) t3', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10208, '质量数据-研发完成需求用例密度', 'quality_storyCaseDensity_finished', 'mysql', 3, 'waterpolo', '92', '0', NULL, '[{"type":"waterpolo","calc":"sum","goal":"casedensity","conditions":[{"field":"havecase","condition":"eq","value":"havecase"}]}]', NULL, 0, '{"casedensity":{"name":"casedensity","object":"testcase","field":"casedensity","type":"number"},"havecase":{"name":"havecase","object":"testcase","field":"havecase","type":"string"}}', '{"casedensity":{"zh-cn":"\\u7528\\u4f8b\\u5bc6\\u5ea6","zh-tw":"","en":"casedensity","de":"","fr":""},"havecase":{"zh-cn":"\\u662f\\u5426\\u6709\\u7528\\u4f8b","zh-tw":"","en":"havecase","de":"","fr":""}}', 'SELECT ROUND(SUM(t2.cases)/SUM(t2.estimate),4) AS casedensity, ''havecase'' as havecase FROM (SELECT t1.storyid, t1.estimate, SUM(t1.iscase) cases FROM (SELECT zt_story.id storyid, zt_story.estimate, (CASE WHEN zt_case.id is null THEN 0 ELSE 1 END) iscase FROM zt_story LEFT JOIN zt_case ON zt_story.id=zt_case.story WHERE zt_story.deleted=''0'' AND (zt_story.stage IN (''developed'',''testing'',''verfied'',''released'') OR (zt_story.status=''closed'' AND zt_story.closedReason=''done''))) t1 GROUP BY t1.storyid, t1.estimate ORDER BY cases DESC) t2\nunion\nSELECT ROUND(1-SUM(t2.cases)/SUM(t2.estimate),4) AS casedensity, ''nocase'' as havecase FROM (SELECT t1.storyid, t1.estimate, SUM(t1.iscase) cases FROM (SELECT zt_story.id storyid, zt_story.estimate, (CASE WHEN zt_case.id is null THEN 0 ELSE 1 END) iscase FROM zt_story LEFT JOIN zt_case ON zt_story.id=zt_case.story WHERE zt_story.deleted=''0'' AND (zt_story.stage IN (''developed'',''testing'',''verfied'',''released'') OR (zt_story.status=''closed'' AND zt_story.closedReason=''done''))) t1 GROUP BY t1.storyid, t1.estimate ORDER BY cases DESC) t2', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10209, '质量数据-Bug密度', 'quality_bugDensity', 'mysql', 3, 'waterpolo', '91', '0', NULL, '[{"type":"waterpolo","calc":"sum","goal":"bugdensity","conditions":[{"field":"havebug","condition":"eq","value":"havebug"}]}]', NULL, 0, '{"bugdensity":{"name":"bugdensity","object":"bug","field":"bugdensity","type":"number"},"havebug":{"name":"havebug","object":"bug","field":"havebug","type":"string"}}', '{"bugdensity":{"zh-cn":"Bug\\u5bc6\\u5ea6","zh-tw":"","en":"bugdensity","de":"","fr":""},"havebug":{"zh-cn":"\\u662f\\u5426\\u6709Bug","zh-tw":"","en":"havebug","de":"","fr":""}}', 'SELECT ROUND(SUM(t3.bug)/SUM(t3.estimate), 4) AS bugdensity, ''havebug'' as havebug FROM (SELECT t1.product product, IFNULL(t1.estimate,0) estimate, IFNULL(t2.bug,0) bug FROM (SELECT product, ROUND(SUM(estimate),2) estimate FROM zt_story WHERE deleted=''0'' AND (stage IN (''developed'',''testing'',''verfied'',''released'') OR (status=''closed'' AND closedReason=''done'')) GROUP BY product) t1 LEFT JOIN (SELECT product, COUNT(id) bug FROM zt_bug WHERE deleted=''0'' GROUP BY product) t2 ON t1.product=t2.product) t3\nunion\nSELECT ROUND(1-SUM(t3.bug)/SUM(t3.estimate), 4) AS bugdensity, ''nobug'' as havebug FROM (SELECT t1.product product, IFNULL(t1.estimate,0) estimate, IFNULL(t2.bug,0) bug FROM (SELECT product, ROUND(SUM(estimate),2) estimate FROM zt_story WHERE deleted=''0'' AND (stage IN (''developed'',''testing'',''verfied'',''released'') OR (status=''closed'' AND closedReason=''done'')) GROUP BY product) t1 LEFT JOIN (SELECT product, COUNT(id) bug FROM zt_bug WHERE deleted=''0'' GROUP BY product) t2 ON t1.product=t2.product) t3', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10210, '质量数据-Bug修复率', 'quality_bugFixedRatio', 'mysql', 3, 'waterpolo', '91', '0', NULL, '[{"type":"waterpolo","calc":"sum","goal":"fixpercent","conditions":[{"field":"havebug","condition":"eq","value":"havebug"}]}]', NULL, 0, '{"fixpercent":{"name":"fixpercent","object":"bug","field":"fixpercent","type":"number"},"havebug":{"name":"havebug","object":"bug","field":"havebug","type":"string"}}', '{"fixpercent":{"zh-cn":"Bug\\u4fee\\u590d\\u7387","zh-tw":"","en":"fixpercent","de":"","fr":""},"havebug":{"zh-cn":"\\u662f\\u5426\\u6709Bug","zh-tw":"","en":"havebug","de":"","fr":""}}', 'SELECT ROUND(SUM(CASE WHEN resolution=''fixed'' THEN 1 ELSE 0 END)/COUNT(id),4) AS fixpercent, ''havebug'' as havebug FROM zt_bug WHERE deleted = ''0''\nunion\nSELECT ROUND(1-SUM(CASE WHEN resolution=''fixed'' THEN 1 ELSE 0 END)/COUNT(id),4) AS fixpercent, ''nobug'' as havebug FROM zt_bug WHERE deleted = ''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10211, '质量数据-Bug总数、有效Bug与解决Bug数近30天统计柱形图', 'quality_bugDailyChart', 'mysql', 3, 'cluBarX', '91', '0', NULL, '[{"type":"cluBarX","xaxis":[{"field":"\\u65e5\\u671f","name":"\\u65e5\\u671f","group":"day"}],"yaxis":[{"field":"Bug\\u603b\\u6570","name":"Bug\\u603b\\u6570","valOrAgg":"count"},{"field":"\\u6709\\u6548Bug","name":"\\u6709\\u6548Bug","valOrAgg":"sum"},{"field":"\\u5df2\\u89e3\\u51b3Bug","name":"\\u5df2\\u89e3\\u51b3Bug","valOrAgg":"sum"}]}]', NULL, 0, '{"Bug\\u603b\\u6570":{"name":"Bug\\u603b\\u6570","object":"bug","field":"Bug\\u603b\\u6570","type":"number"},"\\u6709\\u6548Bug":{"name":"\\u6709\\u6548Bug","object":"bug","field":"\\u6709\\u6548Bug","type":"string"},"\\u5df2\\u89e3\\u51b3Bug":{"name":"\\u5df2\\u89e3\\u51b3Bug","object":"bug","field":"\\u5df2\\u89e3\\u51b3Bug","type":"string"},"\\u65e5\\u671f":{"name":"\\u65e5\\u671f","object":"bug","field":"\\u65e5\\u671f","type":"date"}}', NULL, 'select\nid "Bug总数",\n(case when resolution in (''fixed'',''postponed'') or status=''active'' then 1 else 0 end) "有效Bug",\n(case when resolution=''fixed'' then 1 else 0 end) "已解决Bug",\nopenedDate "日期"\nfrom zt_bug\nwhere left(openedDate,10) > (select DATE_sub(MAX(NOW()), INTERVAL ''30'' DAY))\nand left(openedDate,10) < NOW()\nand deleted=''0''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10212, '质量数据-有效Bug率年度趋势图', 'quality_validBugTendency', 'mysql', 3, 'line', '91', '0', NULL, '[{"type":"line","xaxis":[{"field":"year","name":"year","group":""}],"yaxis":[{"field":"effectiveBugRate","name":"effectiveBugRate","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"bug","field":"year","type":"string"},"totalBugCount":{"name":"totalBugCount","object":"bug","field":"totalBugCount","type":"string"},"effectiveBugCount":{"name":"effectiveBugCount","object":"bug","field":"effectiveBugCount","type":"number"},"effectiveBugRate":{"name":"effectiveBugRate","object":"bug","field":"effectiveBugRate","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"Year","de":"","fr":""},"totalBugCount":{"zh-cn":"Bug\\u603b\\u6570","zh-tw":"","en":"Total Bug Count","de":"","fr":""},"effectiveBugCount":{"zh-cn":"\\u6709\\u6548Bug\\u6570","zh-tw":"","en":"Effective Bug Count","de":"","fr":""},"effectiveBugRate":{"zh-cn":"\\u6709\\u6548Bug\\u7387","zh-tw":"","en":"Effective Bug Rate","de":"","fr":""}}', 'select\nyear,\ncount(a.id) as totalBugCount,\nsum(a.effectivebug) as effectiveBugCount,\nsum(a.effectivebug)/count(a.id) effectiveBugRate\nfrom(\nselect\nleft(openedDate,4) year,\nid,\n(case when resolution in (''fixed'',''postponed'') or status=''active'' then 1 else 0 end) effectivebug,\n(case when resolution=''fixed'' then 1 else 0 end) fixedBug\nfrom zt_bug\nwhere zt_bug.deleted=''0''\n) a\ngroup by a.year\norder by a.year', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10213, '质量数据-Bug密度年度趋势图', 'quality_bugDensityTendency', 'mysql', 3, 'line', '91', '0', NULL, '[{"type":"line","xaxis":[{"field":"year","name":"year","group":""}],"yaxis":[{"field":"bugCount","name":"Bug\\u6570","valOrAgg":"sum"}]}]', '[{"field":"year","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"year":{"name":"year","object":"story","field":"year","type":"string"},"createdBugs":{"name":"createdBugs","object":"story","field":"createdBugs","type":"string"},"exfixedstoryestimate":{"name":"exfixedstoryestimate","object":"story","field":"exfixedstoryestimate","type":"number"},"bugCount":{"name":"Bug\\u6570","object":"story","field":"bugCount","type":"number"}}', '{"year":{"zh-cn":"\\u5e74\\u4efd","zh-tw":"","en":"Year","de":"","fr":""},"createdBugs":{"zh-cn":"\\u4ea7\\u751fBug","zh-tw":"","en":"Created Bug","de":"","fr":""},"exfixedstoryestimate":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"","en":"Finished Story","de":"","fr":""},"bugCount":{"zh-cn":"\\u5355\\u4f4d\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u4ea7\\u751f\\u7684Bug\\u6570","zh-tw":"","en":"Bug Density","de":"","fr":""}}', 'select\nbug.year as year,\ncreatedBugs,\nexfixedstoryestimate,\nround(createdBugs/exfixedstoryestimate,2) as bugCount\nfrom\n(select\nleft(openedDate,4) year,\ncount(id) createdBugs\nfrom zt_bug\nwhere zt_bug.deleted=''0''\ngroup by year\n) bug\nleft join\n(select\nsum(estimate) exfixedstoryestimate,\nleft(closedDate,4) year\nfrom\nzt_story\nwhere zt_story.deleted=''0'' and zt_story.status=''closed'' and zt_story.closedReason=''done''\ngroup by year\n) story\non story.year=bug.year\norder by bug.year', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0); INSERT INTO `zt_chart` VALUES (10214, '质量数据-Bug严重程度年度堆积柱状图', 'quality_bugAnnualSeverityChart', 'mysql', 3, 'stackedBar', '91', '0', NULL, '[{"type":"stackedBar","xaxis":[{"field":"\\u5e74\\u4efd","name":"\\u5e74\\u4efd","group":""}],"yaxis":[{"field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a1\\u7ea7\\u7684Bug","name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a1\\u7ea7\\u7684Bug","valOrAgg":"sum"},{"field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a2\\u7ea7\\u7684Bug","name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a2\\u7ea7\\u7684Bug","valOrAgg":"sum"},{"field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4f4e\\u4e8e2\\u7ea7\\u7684Bug","name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4f4e\\u4e8e2\\u7ea7\\u7684Bug","valOrAgg":"sum"}]}]', '[{"field":"\\u5e74\\u4efd","type":"select","name":"\\u5e74\\u4efd"}]', 0, '{"\\u6240\\u6709Bug\\u6570":{"name":"\\u6240\\u6709Bug\\u6570","object":"bug","field":"\\u6240\\u6709Bug\\u6570","type":"string"},"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a1\\u7ea7\\u7684Bug":{"name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a1\\u7ea7\\u7684Bug","object":"bug","field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a1\\u7ea7\\u7684Bug","type":"number"},"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a2\\u7ea7\\u7684Bug":{"name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a2\\u7ea7\\u7684Bug","object":"bug","field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e3a2\\u7ea7\\u7684Bug","type":"number"},"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4f4e\\u4e8e2\\u7ea7\\u7684Bug":{"name":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4f4e\\u4e8e2\\u7ea7\\u7684Bug","object":"bug","field":"\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4f4e\\u4e8e2\\u7ea7\\u7684Bug","type":"number"},"\\u5e74\\u4efd":{"name":"\\u5e74\\u4efd","object":"bug","field":"\\u5e74\\u4efd","type":"string"}}', NULL, 'select\ncount(id) "所有Bug数",\nsum(case when severity=1 then 1 else 0 end) "严重程度为1级的Bug",\nsum(case when severity=2 then 1 else 0 end) "严重程度为2级的Bug",\nsum(case when severity not in (1,2) then 1 else 0 end) "严重程度低于2级的Bug",\nleft(openedDate,4) "年份"\nfrom\nzt_bug\nwhere deleted=''0''\ngroup by left(openedDate,4)\norder by left(openedDate,4)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (10215, '质量数据-产品用例数量统计条形图', 'quality_productCaseCountChart', 'mysql', 3, 'cluBarY', '91', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"name","group":""}],"yaxis":[{"field":"count","name":"count","valOrAgg":"sum"}]}]', '[{"field":"name","type":"select","name":"\\u4ea7\\u54c1"}]', 0, '{"name":{"name":"name","object":"product","field":"name","type":"string"},"count":{"name":"count","object":"testcase","field":"id","type":"string"}}', '{"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"Product","de":"","fr":""},"count":{"zh-cn":"\\u7528\\u4f8b\\u8ba1\\u6570","zh-tw":"","en":"Case Count","de":"","fr":""}}', 'select\nt1.name,\nifnull(t2.cases,0) as count\nfrom\nzt_product t1\nleft join\n(\nselect\nproduct,\ncount(id) cases\nfrom\nzt_case\nwhere deleted=''0''\ngroup by product )\nt2 on t1.id=t2.product', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10216, '质量数据-产品Bug数量统计条形图', 'quality_productBugCountChart', 'mysql', 3, 'cluBarY', '91', '0', NULL, '[{"type":"cluBarY","xaxis":[{"field":"name","name":"name","group":""}],"yaxis":[{"field":"bug","name":"bug","valOrAgg":"sum"}],"rotateX":"notuse"}]', '[{"field":"name","type":"select","name":"\\u4ea7\\u54c1"}]', 0, '{"name":{"name":"name","object":"product","field":"name","type":"string"},"bug":{"name":"bug","object":"bug","field":"id","type":"string"}}', '{"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"Product","de":"","fr":""},"bug":{"zh-cn":"Bug\\u8ba1\\u6570","zh-tw":"","en":"Bug Count","de":"","fr":""}}', 'select\nt1.name,\nifnull(t2.bugs,0) bug\nfrom\nzt_product t1\nleft join\n(\nselect\nproduct,\ncount(id) bugs\nfrom\nzt_bug\nwhere zt_bug.deleted=''0''\ngroup by product )\nt2 on t1.id=t2.product', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10217, '质量数据-Bug状态分布图', 'quality_bugStatus', 'mysql', 3, 'pie', '91', '0', NULL, '[{"type":"pie","group":[{"field":"status","name":"Bug\\u72b6\\u6001","group":""}],"metric":[{"field":"id","name":"Bug\\u7f16\\u53f7","valOrAgg":"count"}]}]', '[{"field":"openedDate","type":"date","name":"\\u521b\\u5efa\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"Bug\\u7f16\\u53f7","object":"bug","field":"id","type":"number"},"status":{"name":"Bug\\u72b6\\u6001","object":"bug","field":"status","type":"option"},"openedDate":{"name":"\\u521b\\u5efa\\u65e5\\u671f","object":"bug","field":"openedDate","type":"date"}}', '{"id":{"zh-cn":"Bug\\u7f16\\u53f7","zh-tw":"","en":"Bug ID","de":"","fr":""},"status":{"zh-cn":"Bug\\u72b6\\u6001","zh-tw":"","en":"Status","de":"","fr":""},"openedDate":{"zh-cn":"\\u521b\\u5efa\\u65e5\\u671f","zh-tw":"","en":"Opened Date","de":"","fr":""}}', 'select\nid,status,openedDate\nfrom zt_bug\nwhere deleted=''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10218, '质量数据-Bug类型分布', 'quality_bugType', 'mysql', 3, 'pie', '91', '0', NULL, '[{"type":"pie","group":[{"field":"type","name":"Bug\\u7c7b\\u578b","group":""}],"metric":[{"field":"id","name":"Bug\\u7f16\\u53f7","valOrAgg":"count"}]}]', '[{"field":"openedDate","type":"date","name":"\\u521b\\u5efa\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"Bug\\u7f16\\u53f7","object":"bug","field":"id","type":"number"},"type":{"name":"Bug\\u7c7b\\u578b","object":"bug","field":"type","type":"option"},"openedDate":{"name":"\\u521b\\u5efa\\u65e5\\u671f","object":"bug","field":"openedDate","type":"date"}}', '{"id":{"zh-cn":"Bug\\u7f16\\u53f7","zh-tw":"","en":"Bug ID","de":"","fr":""},"type":{"zh-cn":"Bug\\u7c7b\\u578b","zh-tw":"","en":"Type","de":"","fr":""},"openedDate":{"zh-cn":"\\u521b\\u5efa\\u65e5\\u671f","zh-tw":"","en":"Opened Date","de":"","fr":""}}', 'select\nid,type,openedDate\nfrom\nzt_bug\nwhere deleted=''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10219, '质量数据-Bug严重程度分布', 'quality_bugSeverity', 'mysql', 3, 'pie', '91', '0', NULL, '[{"type":"pie","group":[{"field":"severity","name":"\\u4e25\\u91cd\\u7a0b\\u5ea6","group":""}],"metric":[{"field":"id","name":"Bug\\u7f16\\u53f7","valOrAgg":"count"}]}]', '[{"field":"openedDate","type":"date","name":"\\u521b\\u5efa\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"Bug\\u7f16\\u53f7","object":"bug","field":"id","type":"number"},"severity":{"name":"\\u4e25\\u91cd\\u7a0b\\u5ea6","object":"bug","field":"severity","type":"option"},"openedDate":{"name":"\\u521b\\u5efa\\u65e5\\u671f","object":"bug","field":"openedDate","type":"date"}}', '{"id":{"zh-cn":"Bug\\u7f16\\u53f7","zh-tw":"","en":"Bug ID","de":"","fr":""},"severity":{"zh-cn":"\\u4e25\\u91cd\\u7a0b\\u5ea6","zh-tw":"","en":"Severity","de":"","fr":""},"openedDate":{"zh-cn":"\\u521b\\u5efa\\u65e5\\u671f","zh-tw":"","en":"Opened Date","de":"","fr":""}}', 'select\nid,severity,openedDate\nfrom\nzt_bug\nwhere deleted=''0''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (10220, '质量数据-Bug解决方案分布', 'quality_bugResolution', 'mysql', 3, 'pie', '91', '0', NULL, '[{"type":"pie","group":[{"field":"resolution","name":"\\u89e3\\u51b3\\u65b9\\u6848","group":""}],"metric":[{"field":"id","name":"Bug\\u7f16\\u53f7","valOrAgg":"count"}]}]', '[{"field":"resolvedDate","type":"date","name":"\\u89e3\\u51b3\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, '{"id":{"name":"Bug\\u7f16\\u53f7","object":"bug","field":"id","type":"number"},"resolution":{"name":"\\u89e3\\u51b3\\u65b9\\u6848","object":"bug","field":"resolution","type":"option"},"resolvedDate":{"name":"\\u89e3\\u51b3\\u65e5\\u671f","object":"bug","field":"resolvedDate","type":"date"}}', '{"id":{"zh-cn":"Bug\\u7f16\\u53f7","zh-tw":"","en":"Bug ID","de":"","fr":""},"resolution":{"zh-cn":"\\u89e3\\u51b3\\u65b9\\u6848","zh-tw":"","en":"Resolution","de":"","fr":""},"resolvedDate":{"zh-cn":"\\u89e3\\u51b3\\u65e5\\u671f","zh-tw":"","en":"Resolved Date","de":"","fr":""}}', 'select id,resolution,resolvedDate from zt_bug\nwhere deleted=''0'' and resolution!='' ''', 'published', 0, NULL, 'system', '[[regtime]]', '', NULL, 0), (20002, '活跃账号情况-活跃账号数项目间对比', 'activeAccount_projectCompare', 'mysql', 1, 'table', '62', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"activeAccount","valOrAgg":"value","name":"\\u6d3b\\u8dc3\\u8d26\\u53f7\\u6570"},{"field":"totalAccount","valOrAgg":"value","name":"\\u56e2\\u961f\\u8d26\\u53f7\\u6570"},{"field":"ratio","valOrAgg":"value","name":"\\u6d3b\\u8dc3\\u8d26\\u53f7\\u6bd4"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT t1.id, t1.name, t1.year, t1.month, t1.totalAccount, ifnull(t2.activeAccount,0) as activeAccount, ifnull(concat(truncate(t2.activeAccount/t1.totalAccount*100,2),''%''), 0) as ratio\nFROM (\nselect t1.id, t1.name, t3.year, t3.month, count(distinct t2.`account`) as totalAccount\nfrom zt_project as t1\nleft join zt_team as t2 on t1.id = t2.root\nleft join (\n SELECT DISTINCT YEAR(`date`) AS `year`, MONTH(`date`) AS `month`, cast(`date` as DATE) as date\n FROM zt_action\n) as t3 on t2.`join` <= t3.date\nleft join zt_user as t4 on t2.account = t4.account\nwhere t1.type = ''project''\nand t4.deleted = ''0''\ngroup by t1.id, t3.year, t3.month\n) AS t1 LEFT JOIN (\nSELECT t1.id, t1.name, t4.year,t4.month, COUNT(DISTINCT t3.id) AS activeAccount\nFROM\n zt_project AS t1\n LEFT JOIN zt_team AS t2 ON t1.id = t2.root\n LEFT JOIN zt_user AS t3 ON t2.account = t3.account\n LEFT JOIN (\n SELECT objectID, YEAR(date) AS year, MONTH(date) AS month, cast(`date` as DATE) as date\n FROM zt_action\n WHERE objectType = ''user'' AND action = ''login''\n ) AS t4 ON t3.id = t4.objectID and t2.`join` <= t4.date\nWHERE\n t3.deleted = ''0'' AND t1.type = ''project''\nGROUP BY t1.id, t4.year, t4.month\n) AS t2 ON t1.year = t2.year AND t1.month = t2.month AND t1.id = t2.id\nORDER BY t2.activeAccount DESC', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20003, '活跃账号情况-公司账号日活跃度趋势', 'activeAccount_activeTendency', 'mysql', 1, 'line', '56', '0', NULL, '{"xaxis":[{"field":"day","name":"\\u65e5\\u671f","group":"value"}],"yaxis":[{"type":"value","field":"count","agg":"value","name":"\\u6570\\u91cf","valOrAgg":"value"}]}', NULL, 0, NULL, NULL, 'SELECT YEAR(t2.date) AS year, MONTH(t2.date) AS month, DAY(t2.date) AS day, COUNT(DISTINCT t1.account) AS count FROM zt_user AS t1\nLEFT JOIN zt_action AS t2 ON t1.account = t2.actor\nWHERE t2.objectType = ''user'' AND t2.action = ''login''\nGROUP BY YEAR(t2.date), MONTH(t2.date), DAY(t2.date)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20004, '应用数据-活跃产品数', 'appData_activeProduct', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"value","field":"count","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'select count(distinct REPLACE(product, '','', '''')) as count, year(date) as year, month(date) as month\nfrom zt_action\nwhere objectType not in (''project'',''execution'',''task'')\nand product != '',0,''\nand product != '',''\nand product != ''''\ngroup by year(date), month(date)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20005, '应用数据-本月新增产品数', 'appData_createdProductCount', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"value","field":"count","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT YEAR(createdDate) AS year, MONTH(createdDate) AS month, count(id) as count FROM zt_product\nWHERE deleted = ''0'' AND shadow = ''0''\nGROUP BY YEAR(createdDate), MONTH(createdDate)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20006, '应用数据-本月新增产品名', 'appData_createdProductName', 'mysql', 1, 'card', '47', '0', NULL, '{"value":{"type":"text","field":"name","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT GROUP_CONCAT(name) AS name, YEAR(createdDate) AS year, MONTH(createdDate) AS month FROM zt_product\nWHERE deleted = ''0'' AND shadow = ''0''\nGROUP BY YEAR(createdDate), MONTH(createdDate)\n', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20007, '应用数据-活跃项目数', 'appData_activeProject', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"value","field":"count","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'select year(date) as year, month(date) as month, count(distinct project) as count\nfrom zt_action\nwhere project != 0\ngroup by year(date), month(date)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20008, '应用数据-本月新增项目数', 'appData_createdProjectCount', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"value","field":"count","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT COUNT(id) as count, YEAR(openedDate) AS year, MONTH(openedDate) AS month FROM zt_project\nWHERE deleted = ''0'' AND type = ''project''\nGROUP BY YEAR(openedDate), MONTH(openedDate)', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20009, '应用数据-本月新增项目名 ', 'appData_createdProjectName', 'mysql', 1, 'card', '38', '0', NULL, '{"value":{"type":"text","field":"name","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT DISTINCT GROUP_CONCAT(name) AS name, YEAR(openedDate) AS year, MONTH(openedDate) AS month FROM zt_project\nWHERE deleted = ''0'' AND type = ''project''\nGROUP BY YEAR(openedDate), MONTH(openedDate)\n', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20010, '应用数据-项目任务概况表', 'appData_projectTaskOverview', 'mysql', 1, 'table', '60', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"createdTasks","valOrAgg":"value","name":"\\u65b0\\u589e\\u4efb\\u52a1\\u6570"},{"field":"contributors","valOrAgg":"value","name":"\\u65b0\\u589e\\u4efb\\u52a1\\u4eba\\u6570"},{"field":"finishedTasks","valOrAgg":"value","name":"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT\n t1.name,\n t4.year,\n t4.month,\n t1.createdTasks,\n t2.finishedTasks,\n t3.contributors\nFROM\n (\nselect distinct year(date) as year, month(date) as month\nfrom zt_action\n ) as t4\nleft join\n (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.openedDate ) AS YEAR,\n MONTH ( t2.openedDate ) AS MONTH,\n COUNT( t2.id ) AS createdTasks\nFROM\n zt_project AS t1\n LEFT JOIN zt_task AS t2 ON t1.id = t2.project\nWHERE\n t1.type = ''project''\nGROUP BY\n t1.id,\n YEAR ( t2.openedDate ),\n MONTH ( t2.openedDate )\n ) AS t1 on t4.year = t1.year and t4.month = t1.month\n LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.finishedDate ) AS YEAR,\n MONTH ( t2.finishedDate ) AS MONTH,\n COUNT( t2.id ) AS finishedTasks\nFROM\n zt_project AS t1\n LEFT JOIN zt_task AS t2 ON t1.id = t2.project\nWHERE\n t1.type = ''project''\n AND t2.finishedDate IS NOT NULL\nGROUP BY\n t1.id,\n YEAR ( t2.finishedDate ),\n MONTH ( t2.finishedDate )\n ) AS t2 ON t1.id = t2.id\n AND t4.YEAR = t2.YEAR\n AND t4.MONTH = t2.\n MONTH LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t3.date ) AS YEAR,\n MONTH ( t3.date ) AS MONTH,\n COUNT( DISTINCT t3.actor ) AS CONTRIBUTORS\nFROM\n zt_project AS t1\n LEFT JOIN zt_task AS t2 ON t1.id = t2.project\n LEFT JOIN zt_action AS t3 ON t2.id = t3.objectID\nWHERE\n t1.type = ''project''\n AND t3.objectType = ''task''\n AND t3.action IN ( ''opened'', ''closed'', ''finished'', ''canceled'', ''assigned'' )\nGROUP BY\n t1.id,\n YEAR ( t3.date ),\n MONTH ( t3.date )\n ) AS t3 ON t1.id = t3.id\n AND t4.YEAR = t3.YEAR\n AND t4.MONTH = t3.MONTH\n order by t1.id,t4.year', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20011, '应用数据-产品测试表', 'appData_productTest', 'mysql', 1, 'table', '63', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u4ea7\\u54c1"},{"field":"createdCases","valOrAgg":"value","name":"\\u65b0\\u589e\\u7528\\u4f8b\\u6570"},{"field":"avgBugsOfCase","valOrAgg":"value","name":"\\u7528\\u4f8b\\u5e73\\u5747Bug\\u6570"},{"field":"createdBugs","valOrAgg":"value","name":"\\u65b0\\u589eBug\\u6570"},{"field":"fixedBugs","valOrAgg":"value","name":"\\u4fee\\u590dBug\\u6570"},{"field":"avgFixedCycle","valOrAgg":"value","name":"Bug\\u5e73\\u5747\\u4fee\\u590d\\u5468\\u671f"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT * FROM\n(\nSELECT\n t1.name,\n t6.year,\n t6.month,\n IFNULL(t5.createdCases, 0) AS createdCases,\n IFNULL(t4.relativedBugs / t5.createdCases, 0) AS avgBugsOfCase,\n IFNULL(t1.createdBugs, 0) AS createdBugs,\n IFNULL(t2.fixedBugs, 0) AS fixedBugs,\n IFNULL(t3.fixedCycle / t2.fixedBugs, 0) AS avgFixedCycle\nFROM\n (\n select distinct year(date) as year, month(date) as month\n from zt_action\n ) AS t6 left join\n (\n SELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.openedDate ) AS YEAR,\n MONTH ( t2.openedDate ) AS MONTH,\n COUNT( t2.id ) AS createdBugs\nFROM\n zt_product AS t1\n LEFT JOIN zt_bug AS t2 ON t1.id = t2.product\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\nGROUP BY\n t1.id,\n YEAR ( t2.openedDate ),\n MONTH ( t2.openedDate )\n ) AS t1 on t1.year = t6.year AND t1.month = t6.month\n LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.resolvedDate ) AS YEAR,\n MONTH ( t2.resolvedDate ) AS MONTH,\n COUNT( t2.id ) AS fixedBugs\nFROM\n zt_product AS t1\n LEFT JOIN zt_bug AS t2 ON t1.id = t2.product\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\n AND t2.`status` = ''closed''\n AND t2.resolution = ''fixed''\nGROUP BY\n t1.id,\n YEAR ( t2.resolvedDate ),\n MONTH ( t2.resolvedDate )\n ) AS t2 ON t1.id = t2.id\n AND t6.YEAR = t2.YEAR\n AND t6.MONTH = t2.MONTH\n LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.resolvedDate ) AS YEAR,\n MONTH ( t2.resolvedDate ) AS MONTH,\n SUM( DATEDIFF( t2.resolvedDate, t2.openedDate ) ) AS fixedCycle\nFROM\n zt_product AS t1\n LEFT JOIN zt_bug AS t2 ON t1.id = t2.product\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\n AND t2.`status` = ''closed''\n AND t2.resolution = ''fixed''\nGROUP BY\n t1.id,\n YEAR ( t2.resolvedDate ),\n MONTH ( t2.resolvedDate )\n ) AS t3 ON t1.id = t3.id\n AND t6.YEAR = t3.YEAR\n AND t6.MONTH = t3.\n MONTH LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.openedDate ) AS YEAR,\n MONTH ( t2.openedDate ) AS MONTH,\n COUNT( t3.id ) AS relativedBugs\nFROM\n zt_product AS t1\n LEFT JOIN zt_case AS t2 ON t1.id = t2.product\n LEFT JOIN zt_bug AS t3 ON t2.id = t3.`case`\nWHERE\n t2.id IS NOT NULL\n AND t3.id IS NOT NULL\n AND t1.deleted = ''0''\n AND t2.deleted = ''0''\n AND t3.deleted = ''0''\nGROUP BY\n t1.id,\n YEAR ( t2.openedDate ),\n MONTH ( t2.openedDate )\n ) AS t4 ON t1.id = t4.id\n AND t6.YEAR = t4.YEAR\n AND t6.MONTH = t4.\n MONTH LEFT JOIN (\n SELECT\n t1.id,\n t1.NAME,\n YEAR ( t2.openedDate ) AS YEAR,\n MONTH ( t2.openedDate ) AS MONTH,\n COUNT( t2.id ) AS createdCases\nFROM\n zt_product AS t1\n LEFT JOIN zt_case AS t2 ON t1.id = t2.product\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\nGROUP BY\n t1.id,\n YEAR ( t2.openedDate ),\n MONTH ( t2.openedDate )\n ) AS t5 ON t1.id = t5.id\n AND t6.YEAR = t5.YEAR\n AND t6.MONTH = t5.MONTH\n) AS t WHERE t.name IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20012, '应用数据-产品需求概况表', 'appData_productStoryOverview', 'mysql', 1, 'table', '63', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u4ea7\\u54c1"},{"field":"createdStories","valOrAgg":"value","name":"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u6570"},{"field":"deliveredStories","valOrAgg":"value","name":"\\u4ea4\\u4ed8\\u9700\\u6c42\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT * FROM\n(\nSELECT\n t1.id,\n t1.name,\n t3.year,\n t3.month,\n IFNULL(t1.count, 0) AS createdStories,\n IFNULL(t2.count, 0) AS deliveredStories\nFROM\n (\n select distinct year(date) as year, month(date) as month\n from zt_action\n )\n as t3 left join\n (\nSELECT\n t2.id,\n t2.NAME,\n YEAR ( t1.openedDate ) AS YEAR,\n MONTH ( t1.openedDate ) AS MONTH,\n COUNT( t1.id ) AS count\nFROM\n zt_story AS t1\n LEFT JOIN zt_product AS t2 ON t1.product = t2.id\nWHERE\n t2.deleted = ''0''\n AND t1.deleted = ''0''\n AND t1.type = ''story''\nGROUP BY\n t2.id,\n YEAR,\nMONTH\n ) AS t1 on t3.year = t1.year and t3.month = t1.month\n LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n t1.YEAR,\n t1.MONTH,\n COUNT( distinct t1.story ) AS count\nFROM\n (\nSELECT\n t2.id,\n t2.NAME,\n YEAR ( t3.date ) AS YEAR,\n MONTH ( t3.date ) AS MONTH,\n t1.id AS story\nFROM\n zt_story AS t1\n LEFT JOIN zt_product AS t2 ON t1.product = t2.id\n LEFT JOIN ( SELECT objectID, MAX( date ) AS date FROM zt_action WHERE objectType = ''story'' AND action = ''linked2release'' GROUP BY objectID ) AS t3 ON t1.id = t3.objectID\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\n AND EXISTS ( SELECT 1 FROM zt_action WHERE objectID = t1.id AND objectType = ''story'' AND action = ''linked2release'' )\nUNION\nSELECT\n t2.id,\n t2.NAME,\n YEAR ( t1.closedDate ) AS YEAR,\n MONTH ( t1.closedDate ) AS MONTH,\n t1.id AS story\nFROM\n zt_story AS t1\n LEFT JOIN zt_product AS t2 ON t1.product = t2.id\nWHERE\n t1.deleted = ''0''\n AND t2.deleted = ''0''\n AND t1.status = ''closed''\n AND t1.closedReason = ''done''\n ) AS t1\nGROUP BY\n t1.id,\n t1.name,\n t1.YEAR,\n t1.MONTH order by id asc\n ) AS t2 ON t1.id = t2.id\n AND t3.YEAR = t2.YEAR\n AND t3.MONTH = t2.MONTH\n) AS t\nWHERE t.name IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20013, '应用数据-项目需求概况表', 'appData_projectStoryOverview', 'mysql', 1, 'table', '60', '0', NULL, '{"group":[],"column":[{"field":"name","valOrAgg":"value","name":"\\u9879\\u76ee"},{"field":"createdStories","valOrAgg":"value","name":"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u6570"},{"field":"deliveredStories","valOrAgg":"value","name":"\\u4ea4\\u4ed8\\u9700\\u6c42\\u6570"}],"filter":[]}', NULL, 0, NULL, NULL, 'SELECT * FROM (\nSELECT\n t1.id,\n t1.name,\n t3.year,\n t3.month,\n IFNULL(t1.count, 0) AS createdStories,\n IFNULL(t2.count, 0) AS deliveredStories\nFROM\n (\n select distinct year(date) as year, month(date) as month\n from zt_action\n )\n as t3 left join\n (\nSELECT\n t3.id,\n t3.NAME,\n YEAR ( t1.openedDate ) AS YEAR,\n MONTH ( t1.openedDate ) AS MONTH,\n COUNT( t1.id ) AS count\nFROM\n zt_story AS t1\n LEFT JOIN zt_projectstory AS t2 ON t1.id = t2.story\n LEFT JOIN zt_project AS t3 ON t2.project = t3.id\nWHERE\n t3.type = ''project''\n AND t1.deleted = ''0''\n AND t3.deleted = ''0''\nGROUP BY\n t3.id,\n YEAR,\nMONTH\n ) AS t1 on t1.year = t3.year and t1.month = t3.month\n LEFT JOIN (\nSELECT\n t1.id,\n t1.NAME,\n t1.YEAR,\n t1.MONTH,\n COUNT( t1.story ) AS count\nFROM\n (\nSELECT\n t3.id,\n t3.NAME,\n YEAR ( t4.date ) AS YEAR,\n MONTH ( t4.date ) AS MONTH,\n t1.id AS story\nFROM\n zt_story AS t1\n LEFT JOIN zt_projectstory AS t2 ON t1.id = t2.story\n LEFT JOIN zt_project AS t3 ON t2.project = t3.id\n LEFT JOIN ( SELECT objectID, MAX( date ) AS date FROM zt_action WHERE objectType = ''story'' AND action = ''linked2release'' GROUP BY objectID ) AS t4 ON t1.id = t4.objectID\nWHERE\n t3.type = ''project''\n AND t1.deleted = ''0''\n AND t3.deleted = ''0''\n AND EXISTS ( SELECT 1 FROM zt_action WHERE objectID = t1.id AND objectType = ''story'' AND action = ''linked2release'' ) UNION\nSELECT\n t3.id,\n t3.NAME,\n YEAR ( t1.closedDate ) AS YEAR,\n MONTH ( t1.closedDate ) AS MONTH,\n t1.id AS story\nFROM\n zt_story AS t1\n LEFT JOIN zt_projectstory AS t2 ON t1.id = t2.story\n LEFT JOIN zt_project AS t3 ON t2.project = t3.id\nWHERE\n t3.type = ''project''\n AND t1.STATUS = ''closed''\n AND t1.closedReason = ''done''\n AND t1.deleted = ''0''\n AND t3.deleted = ''0''\n ) AS t1\nGROUP BY\n t1.id,\n t1.name,\n t1.YEAR,\n t1.MONTH\n ) AS t2 ON t1.id = t2.id\n AND t3.YEAR = t2.YEAR\n AND t3.MONTH = t2.MONTH\n) AS t WHERE t.id IS NOT NULL', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20014, '使用数据分析-当前版本', 'appData_currentVersion', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"value","field":"version","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'SELECT REPLACE(REPLACE(REPLACE(value, ''max'', ''旗舰版''), ''biz'', ''企业版''), ''pro'', ''专业版'') as version FROM zt_config WHERE owner = ''system'' AND module = ''common'' AND section = ''global'' AND `key` = ''version''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0), (20015, '使用数据分析-上线时间', 'appData_onlineDate', 'mysql', 1, 'card', '', '0', NULL, '{"value":{"type":"value","field":"date","agg":"value"},"title":{"type":"text","name":""},"type":"value"}', NULL, 0, NULL, NULL, 'select `value` as date from zt_config where `owner` = ''system'' and `key` = ''installedDate''', 'published', 1, NULL, 'system', '[[regtime]]', '', NULL, 0);
INSERT INTO `zt_pivot` VALUES (1000, 2, '86', 'finishedProjectDuration', 'mysql', '{"zh-cn":"\\u5b8c\\u6210\\u9879\\u76ee\\u5de5\\u671f\\u900f\\u89c6\\u8868","zh-tw":"","en":"","de":"","fr":""}', NULL, 'select\n t1.name,\n t2.program1,\n t1.begin,\n t1.end,\n t1.realBegan,\n t1.realEnd,\n t1.closedDate,\n t1.realduration,\n t1.realduration - t1.planduration as duration_deviation,\n round((t1.realduration - t1.planduration) / t1.planduration, 3) as rate\nfrom\n (select\n name,\n substr(path,2,4) as program1,\n begin,\n end,\n realBegan,\n realEnd,\n left(closedDate, 10) as closedDate,\n datediff(`end`, `begin`) as planduration,\n ifnull(if(left(`realEnd`,4) != ''0000'',datediff(`realEnd`,`realBegan`),datediff(`closedDate`,`realBegan`)),0) realduration\n from zt_project\n where type=''project'' and status=''closed'' and deleted=''0'') t1\nleft join\n (select\n id as programid,\n name as program1\n from zt_project\n where type=''program''\n and grade=1) t2\non t1.program1=t2.programid;', '{"name":{"object":"project","field":"name","type":"string"},"program1":{"object":"project","field":"program1","type":"string"},"begin":{"object":"project","field":"begin","type":"date"},"end":{"object":"project","field":"end","type":"date"},"realBegan":{"object":"project","field":"realBegan","type":"date"},"realEnd":{"object":"project","field":"realEnd","type":"date"},"closedDate":{"object":"project","field":"closedDate","type":"date"},"realduration":{"object":"project","field":"realduration","type":"number"},"duration_deviation":{"object":"project","field":"duration_deviation","type":"number"},"rate":{"object":"project","field":"rate","type":"number"}}', '{"name":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"program1":{"zh-cn":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","zh-tw":"","en":"","de":"","fr":""},"begin":{"zh-cn":"\\u8ba1\\u5212\\u5f00\\u59cb\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""},"end":{"zh-cn":"\\u8ba1\\u5212\\u5b8c\\u6210\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""},"realBegan":{"zh-cn":"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""},"realEnd":{"zh-cn":"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""},"closedDate":{"zh-cn":"\\u5173\\u95ed\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""},"realduration":{"zh-cn":"\\u5b9e\\u9645\\u5de5\\u671f","zh-tw":"","en":"","de":"","fr":""},"duration_deviation":{"zh-cn":"\\u5de5\\u671f\\u504f\\u5dee","zh-tw":"","en":"","de":"","fr":""},"rate":{"zh-cn":"\\u5de5\\u671f\\u504f\\u5dee\\u7387","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"columns":[{"field":"begin","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"end","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"realBegan","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"realEnd","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"closedDate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"realduration","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"duration_deviation","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"rate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"}],"group1":"program1","group2":"name","lastStep":"4"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1001, 2, '85', 'finishedProjectHour', 'mysql', '{"zh-cn":"\\u5b8c\\u6210\\u9879\\u76ee\\u5de5\\u65f6\\u900f\\u89c6\\u8868","zh-tw":"","en":"","de":"","fr":""}', NULL, 'select\n t1.name as "projectname",\n t4.program1 as "topprogram",\n round(t2.estimate, 2) as "estimate",\n round(t2.consumed, 2) as "consumed",\n round(t2.consumed - t2.estimate, 2) as "deviation",\n round((t2.consumed - t2.estimate) / t2.estimate, 2) as "deviationrate",\n coalesce(t3.storys, 0) as "finishedstorys",\n coalesce(t3.storyestimate, 0) as "finishedstorysmate",\n round(coalesce(t3.storyestimate, 0) / coalesce(t2.consumed, 0), 2) as "demandsizesperunittime",\n t1.closedDate as "closeddate"\nfrom\n (\n select\n id,\n name,\n substr(`path`, 2, 4) as program1,\n closedDate\n from zt_project\n where deleted = ''0''\n and type = ''project''\n and status = ''closed''\n ) as t1\n left join (\n select\n project,\n sum(estimate) as estimate,\n sum(consumed) as consumed\n from zt_task\n where deleted = ''0''\n and project != 0\n group by project\n ) as t2 on t1.id = t2.project\n left join (\n select\n tt3.project,\n count(tt3.id) as storys,\n sum(estimate) as storyestimate\n from\n (\n select\n tt1.id,\n tt1.estimate,\n tt2.project\n from zt_story tt1\n left join zt_projectstory tt2 on tt1.id = tt2.story\n where tt1.deleted = ''0''\n and tt1.status = ''closed''\n and tt1.closedReason = ''done''\n ) tt3\n group by\n tt3.project\n ) t3 on t1.id = t3.project\n left join (\n select\n id as programid,\n name as program1\n from zt_project\n where type = ''program''\n and grade = 1\n ) t4 on t1.program1 = t4.programid;', '{"projectname":{"object":"project","field":"projectname","type":"string"},"topprogram":{"object":"project","field":"topprogram","type":"string"},"estimate":{"object":"project","field":"estimate","type":"number"},"consumed":{"object":"project","field":"consumed","type":"number"},"deviation":{"object":"project","field":"deviation","type":"number"},"deviationrate":{"object":"project","field":"deviationrate","type":"number"},"finishedstorys":{"object":"project","field":"deviationrate","type":"string"},"finishedstorysmate":{"object":"project","field":"finishedstorysmate","type":"number"},"demandsizesperunittime":{"object":"project","field":"demandsizesperunittime","type":"number"},"closeddate":{"object":"project","field":"closeddate","type":"date"}}', '{"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"\\u9879\\u76ee\\u540d\\u79f0","en":"projectname"},"topprogram":{"zh-cn":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","zh-tw":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","en":"topprogram"},"estimate":{"zh-cn":"\\u9884\\u8ba1\\u5de5\\u65f6","zh-tw":"\\u9884\\u8ba1\\u5de5\\u65f6","en":"estimate"},"consumed":{"zh-cn":"\\u6d88\\u8017\\u5de5\\u65f6","zh-tw":"\\u6d88\\u8017\\u5de5\\u65f6","en":"consumed"},"deviation":{"zh-cn":"\\u5de5\\u65f6\\u504f\\u5dee","zh-tw":"\\u5de5\\u65f6\\u504f\\u5dee","en":"deviation"},"deviationrate":{"zh-cn":"\\u5de5\\u65f6\\u504f\\u5dee\\u7387","zh-tw":"\\u5de5\\u65f6\\u504f\\u5dee\\u7387","en":"deviationrate"},"finishedstorys":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"\\u5b8c\\u6210\\u9700\\u6c42\\u6570","en":"finishedstorys"},"finishedstorysmate":{"zh-cn":"\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u6570","zh-tw":"\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u6570","en":"finishedstorysmate"},"demandsizesperunittime":{"zh-cn":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","zh-tw":"\\u5355\\u4f4d\\u65f6\\u95f4\\u4ea4\\u4ed8\\u9700\\u6c42\\u89c4\\u6a21\\u6570","en":"demandsizesperunittime"},"closeddate":{"zh-cn":"\\u5173\\u95ed\\u65e5\\u671f","zh-tw":"\\u5173\\u95ed\\u65e5\\u671f","en":"closeddate"}}', NULL, NULL, '{"columns":[{"field":"estimate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"consumed","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"deviation","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"deviationrate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"finishedstorys","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"finishedstorysmate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"demandsizesperunittime","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"}],"columnTotal":"noShow","group1":"topprogram","group2":"projectname","lastStep":"4"}', '[{"field":"closeddate","type":"date","name":"\\u5173\\u95ed\\u65e5\\u671f","default":{"begin":"","end":""}}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1002, 3, '100', 'productBugSummary', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u7f3a\\u9677\\u6570\\u636e\\u6c47\\u603b\\u8868","zh-tw":"","en":"","de":"","fr":""}', NULL, 'select\n t1.name as product,\n coalesce(t2.name, ''/'') as topprogram,\n coalesce(t3.name, ''/'') as productline,\n coalesce(t6.exfixedstorys, 0) as exfixedstorys,\n round(coalesce(t6.exfixedstorysmate, 0), 3) as exfixedstorysmate,\n coalesce(t8.storycases, 0) as storycases,\n round(coalesce(t8.storycases / t6.exfixedstorysmate, 0), 3) as casedensity,\n round(coalesce(t10.casestorys / t6.exfixedstorys, 0), 3) as casecoveragerate,\n coalesce(t7.bug, 0) as bugs,\n coalesce(t7.effbugs, 0) as effectivebugs,\n coalesce(t7.pri12bugs, 0) as pri12bugs,\n round(coalesce(t7.bug / t6.exfixedstorysmate, 0), 3) as bugdensity,\n coalesce(t7.fixedbugs, 0) as fixedbugs,\n round(coalesce(t7.fixedbugs / t7.bug, 0), 3) as fixedbugsrate\nfrom zt_product as t1\n left join zt_project as t2 on t1.program = t2.id\n and t2.type = ''program''\n and t2.grade = 1\n left join zt_module as t3 on t1.line = t3.id and t3.type = ''line''\n left join (\n select\n product,\n count(id) as exfixedstorys,\n sum(estimate) as exfixedstorysmate\n from zt_story\n where deleted = ''0''\n and (stage in (''developed'', ''testing'', ''verfied'', ''released'') or (status = ''closed'' and closedReason = ''done''))\n group by product\n ) as t6 on t1.id = t6.product\n left join (\n select\n product,\n count(id) as bug,\n sum(case when resolution in (''fixed'', ''postponed'') or status = ''active'' then 1 else 0 end) as effbugs,\n sum(case when resolution = ''fixed'' then 1 else 0 end) as fixedbugs,\n sum(case when severity IN (1, 2) then 1 else 0 end) as pri12bugs\n from zt_bug\n where deleted = ''0''\n group by product\n ) as t7 on t1.id = t7.product\n left join (\n select\n product,\n COUNT(id) as storycases\n from zt_case\n where deleted = ''0''\n group by product\n ) as t8 on t1.id = t8.product\n left join (\n select\n tcase.product,\n COUNT(tcase.story) as casestorys\n from zt_case as tcase\n left join zt_story as tstory on tcase.story = tstory.id\n where tcase.deleted = ''0''\n and tcase.story != ''0''\n and tstory.deleted = ''0''\n and (tstory.stage IN (''developed'', ''testing'', ''verfied'', ''released'') OR (tstory.status = ''closed'' and tstory.closedReason = ''done''))\n group by tcase.product\n ) as t10 on t1.id = t10.product\nwhere t1.deleted = ''0''\nand t1.status != ''closed''\nand t1.shadow = ''0''\nand t1.vision = ''rnd''\nORDER BY t1.order;', '{"product":{"object":"story","field":"product","type":"string"},"topprogram":{"object":"story","field":"topprogram","type":"string"},"productline":{"object":"story","field":"productline","type":"string"},"exfixedstorys":{"object":"story","field":"exfixedstorys","type":"string"},"exfixedstorysmate":{"object":"story","field":"exfixedstorysmate","type":"number"},"storycases":{"object":"story","field":"storycases","type":"string"},"casedensity":{"object":"story","field":"casedensity","type":"number"},"casecoveragerate":{"object":"story","field":"casecoveragerate","type":"number"},"bugs":{"object":"story","field":"bugs","type":"string"},"effectivebugs":{"object":"story","field":"effectviebugs","type":"number"},"pri12bugs":{"object":"story","field":"pri12bugs","type":"number"},"bugdensity":{"object":"story","field":"bugdensity","type":"number"},"fixedbugs":{"object":"story","field":"fixedbugs","type":"number"},"fixedbugsrate":{"object":"story","field":"fixedbugsrate","type":"number"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"\\u4ea7\\u54c1","en":"product"},"topprogram":{"zh-cn":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","zh-tw":"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6","en":"topprogram"},"productline":{"zh-cn":"\\u4ea7\\u54c1\\u7ebf","zh-tw":"\\u4ea7\\u54c1\\u7ebf","en":"productline"},"exfixedstorys":{"zh-cn":"\\u7814\\u53d1\\u5b8c\\u6210\\u9700\\u6c42\\u6570","zh-tw":"\\u7814\\u53d1\\u5b8c\\u6210\\u9700\\u6c42\\u6570","en":"exfixedstorys"},"exfixedstorysmate":{"zh-cn":"\\u7814\\u53d1\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u6570","zh-tw":"\\u7814\\u53d1\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u6570","en":"exfixedstorysmate"},"storycases":{"zh-cn":"\\u9700\\u6c42\\u7528\\u4f8b\\u6570","zh-tw":"\\u9700\\u6c42\\u7528\\u4f8b\\u6570","en":"storycases"},"casedensity":{"zh-cn":"\\u7528\\u4f8b\\u5bc6\\u5ea6","zh-tw":"\\u7528\\u4f8b\\u5bc6\\u5ea6","en":"casedensity"},"casecoveragerate":{"zh-cn":"\\u7528\\u4f8b\\u8986\\u76d6\\u7387","zh-tw":"\\u7528\\u4f8b\\u8986\\u76d6\\u7387","en":"casecoveragerate"},"bugs":{"zh-cn":"Bug\\u6570","zh-tw":"Bug\\u6570","en":"bugs"},"effectivebugs":{"zh-cn":"\\u6709\\u6548Bug\\u6570","zh-tw":"\\u6709\\u6548Bug\\u6570","en":"effectviebugs"},"pri12bugs":{"zh-cn":"\\u4f18\\u5148\\u7ea7\\u4e3a1\\uff0c2\\u7684Bug\\u6570","zh-tw":"\\u4f18\\u5148\\u7ea7\\u4e3a1\\uff0c2\\u7684Bug\\u6570","en":"pri12bugs"},"bugdensity":{"zh-cn":"Bug\\u5bc6\\u5ea6","zh-tw":"Bug\\u5bc6\\u5ea6","en":"bugdensity"},"fixedbugs":{"zh-cn":"\\u4fee\\u590dBug\\u6570","zh-tw":"\\u4fee\\u590dBug\\u6570","en":"fixedbugs"},"fixedbugsrate":{"zh-cn":"Bug\\u4fee\\u590d\\u7387","zh-tw":"Bug\\u4fee\\u590d\\u7387","en":"fixedbugsrate"}}', NULL, NULL, '{"columns":[{"field":"exfixedstorys","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"exfixedstorysmate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"storycases","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"casedensity","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"casecoveragerate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"bugs","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"effectivebugs","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"pri12bugs","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"bugdensity","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"fixedbugs","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"},{"field":"fixedbugsrate","stat":"sum","slice":"noSlice","showMode":"default","monopolize":"0","showTotal":"noShow"}],"columnTotal":"noShow","group1":"topprogram","group2":"productline","group3":"product","lastStep":"4"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1003, 1, '59', 'productProgress', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u9700\\u6c42\\u4ea4\\u4ed8\\u7edf\\u8ba1\\u8868","zh-tw":"\\u7522\\u54c1\\u5b8c\\u6210\\u5ea6\\u7d71\\u8a08\\u8868","en":"Product Progress","de":"Product Progress","fr":"Product Progress"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u4ea4\\u4ed8\\u7684\\u9700\\u6c42\\u603b\\u6570(\\u72b6\\u6001\\u662f\\u5173\\u95ed\\u4e14\\u5173\\u95ed\\u539f\\u56e0\\u4e3a\\u5df2\\u5b8c\\u6210\\uff0c\\u6216\\u8005\\u7814\\u53d1\\u9636\\u6bb5\\u662f\\u5df2\\u53d1\\u5e03\\u7684\\u9700\\u6c42)\\u3002","zh-tw":"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u5b8c\\u6210\\u7684\\u7e3d\\u6578(\\u72c0\\u614b\\u662f\\u95dc\\u9589\\uff0c\\u6216\\u8005\\u7814\\u767c\\u968e\\u6bb5\\u662f\\u767c\\u5e03)\\uff0c\\u5b8c\\u6210\\u7684\\u767e\\u5206\\u6bd4\\u3002","en":"Number of total stories,done stories(state is closed, or stage is released), percent of completion.","de":"Number of total stories,done stories(state is closed, or stage is released), percent of completion.","fr":"Number of total stories,done stories(state is closed, or stage is released), percent of completion."}', 'select\n t1.product,\n t2.name,\n (case when t1.closedReason = ''done'' or t1.stage = ''released'' then 1 else 0 end) as done,\n 1 as count from zt_story as t1\nleft join zt_product as t2 on t1.product=t2.id\nleft join zt_project as t3 on t2.program=t3.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"name":{"object":"product","field":"name","type":"string"},"done":{"object":"project","field":"","type":"number"},"count":{"object":"project","field":"","type":"number"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"name","zh-tw":"","en":"","de":"","fr":""},"done":{"zh-cn":"\\u4ea4\\u4ed8\\u9700\\u6c42\\u6570","zh-tw":"\\u4ea4\\u4ed8\\u9700\\u6c42\\u6570","en":"delivery","de":"","fr":""},"count":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories","de":"","fr":""}}', NULL, NULL, '{"summary":"use","group1":"product","columns":[{"field":"done","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"count","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1004, 1, '59', 'productStoryStatus', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u9700\\u6c42\\u72b6\\u6001\\u5206\\u5e03\\u8868","zh-tw":"\\u7522\\u54c1\\u9700\\u6c42\\u72c0\\u614b\\u5206\\u5e03\\u8868","en":"Story Status","de":"Story Status","fr":"Story Status"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u72b6\\u6001\\u7684\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u72c0\\u614b\\u7684\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"Total number and status distribution of stories.","de":"Total number and status distribution of stories.","fr":"Total number and status distribution of stories."}', 'select\n t1.product, t1.status,\n t2.name\nfrom zt_story as t1\nleft join zt_product as t2 on t1.product=t2.id\nleft join zt_project as t3 on t2.program=t3.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"status":{"object":"story","field":"status","type":"option"},"name":{"object":"product","field":"name","type":"string"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"status":{"zh-cn":"\\u4e0d\\u540c\\u72b6\\u6001\\u9700\\u6c42","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"name","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"group1":"product","columnTotal":"sum","columns":[{"field":"status","slice":"status","stat":"count","showTotal":"sum","showMode":"default","monopolize":"0","showOrigin":0,"summary":"use"}]}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1005, 1, '59', 'productStoryStage', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u8868","zh-tw":"\\u7522\\u54c1\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u8868","en":"Story Stage","de":"Story Stage","fr":"Story Stage"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u7814\\u53d1\\u9636\\u6bb5\\u7684\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u7814\\u767c\\u968e\\u6bb5\\u7684\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"Total number and stage distribution of stories ","de":"Total number and stage distribution of stories ","fr":"Total number and stage distribution of stories "}', 'select\n t1.product, t1.stage,\n t2.name\nfrom zt_story as t1\nleft join zt_product as t2 on t1.product=t2.id\nleft join zt_project as t3 on t2.program=t3.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"stage":{"object":"story","field":"stage","type":"option"},"name":{"object":"product","field":"name","type":"string"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"stage":{"zh-cn":"\\u4e0d\\u540c\\u9636\\u6bb5\\u9700\\u6c42","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"name","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"group1":"product","columnTotal":"sum","columns":[{"field":"stage","slice":"stage","stat":"count","showTotal":"sum","showMode":"default","monopolize":"0","showOrigin":0}],"summary":"use"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1006, 1, '59', 'productRelease', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u53d1\\u5e03\\u6570\\u91cf\\u7edf\\u8ba1\\u8868","zh-tw":"\\u7522\\u54c1\\u767c\\u5e03\\u6578\\u91cf\\u7d71\\u8a08\\u8868","en":"Product Release","de":"Product Release","fr":"Product Release"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u53d1\\u5e03\\u7684\\u6570\\u91cf\\u3002","zh-tw":"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u767c\\u5e03\\u7684\\u6578\\u91cf\\u3002","en":"Product Release.","de":"Product Release.","fr":"Product Release."}', 'select\n t1.product,\n t2.name,\n 1 as releases\nfrom zt_release as t1\nleft join zt_product as t2 on t1.product=t2.id\nleft join zt_project as t3 on t2.program=t3.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"name":{"object":"product","field":"name","type":"string"},"releases":{"object":"product","field":"","type":"number"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"releases":{"zh-cn":"\\u53d1\\u5e03","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"summary":"use","group1":"product","columns":[{"field":"releases","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1007, 1, '60', 'taskStatus', 'mysql', '{"zh-cn":"\\u4efb\\u52a1\\u72b6\\u6001\\u7edf\\u8ba1\\u8868","zh-tw":"\\u4efb\\u52d9\\u72c0\\u614b\\u7d71\\u8a08\\u8868","en":"Task Status Report","de":"Task Status Report","fr":"Task Status Report","vi":"Task Status Report","ja":"Task Status Report"}', '{"zh-cn":"\\u6309\\u7167\\u6267\\u884c\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u57f7\\u884c\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.project,\n t3.name as projectname,\n t2.status,\n t1.name as executionname,\n t2.execution as execution,\n t2.id as taskID,\n t1.status as projectstatus,\n (case when cast(t2.deadline as date) < current_date()\n and t2.deadline is not null\n and t2.status != ''closed''\n and t2.status != ''done''\n and t2.status != ''cancel'' then 1 else 0 end\n ) as timeout\nfrom zt_project as t1\nleft join zt_task as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $status='''' then 1 else t1.status=$status end)\nand (case when $beginDate='''' then 1 else t1.begin>=cast($beginDate as date) end)\nand (case when $endDate='''' then 1 else t1.end<=cast($endDate as date) end)', '{"project":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"status":{"object":"task","field":"status","type":"option"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"id","type":"number"},"taskID":{"object":"task","field":"","type":"object"},"projectstatus":{"object":"task","field":"","type":"object"},"timeout":{"object":"task","field":"","type":"number"}}', '{"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"\\u4e0d\\u540c\\u72b6\\u6001\\u4efb\\u52a1","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""},"timeout":{"zh-cn":"timeout","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","status","beginDate","endDate"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001","\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f"],"requestType":["select","select","date","date"],"selectList":["project","project.status","user","user"],"default":["","","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"taskID","slice":"status","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""},{"from":"query","field":"beginDate","name":"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","type":"date","typeOption":"","default":""},{"from":"query","field":"endDate","name":"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f","type":"date","typeOption":"","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1008, 1, '60', 'taskType', 'mysql', '{"zh-cn":"\\u4efb\\u52a1\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868","zh-tw":"\\u4efb\\u52d9\\u985e\\u578b\\u7d71\\u8a08\\u8868","en":"Task Type Report","de":"Task Type Report","fr":"Task Type Report","vi":"Task Type Report","ja":"Task Type Report"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as projectname,\n t3.id as project,\n t1.name as executionname,\n t1.id as execution,\n t2.type,\n t2.id as taskID,\n t1.status as projectstatus\nfrom zt_project as t1\nleft join zt_task as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $status='''' then 1 else t1.status=$status end)\nand (case when $beginDate='''' then 1 else t1.begin>=cast($beginDate as date) end)\nand (case when $endDate='''' then 1 else t1.end<=cast($endDate as date) end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"object"},"type":{"object":"task","field":"type","type":"option"},"taskID":{"object":"task","field":"","type":"object"},"projectstatus":{"object":"task","field":"","type":"object"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"\\u4efb\\u52a1\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"\\u4e0d\\u540c\\u7c7b\\u578b\\u4efb\\u52a1","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","status","beginDate","endDate"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001","\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f"],"requestType":["select","select","date","date"],"selectList":["project","project.status","user","user"],"default":["","","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"taskID","slice":"type","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""},{"from":"query","field":"beginDate","name":"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1009, 1, '60', 'projectTaskAssign', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u4efb\\u52a1\\u6307\\u6d3e\\u7edf\\u8ba1\\u8868","zh-tw":"\\u9805\\u76ee\\u4efb\\u52d9\\u6307\\u6d3e\\u7d71\\u8a08\\u8868","en":"Task Assign Report","de":"Task Assign Report","fr":"Task Assign Report","vi":"Task Assign Report","ja":"Task Assign Report"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t4.name as projectname,\n t4.id as project,\n t1.name as executionname,\n t2.execution as execution,\n (case when t3.account is not null then t3.account else t2.assignedTo end) as assignedTo,\n t2.id as taskID,\n t1.status as projectstatus\nfrom zt_project as t1\nleft join zt_task as t2 on t1.id=t2.execution\nleft join zt_team as t3 on t3.type=''task'' and t3.root=t2.id\nleft join zt_project as t4 on t1.project=t4.id\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t4.id=$project end)\nand (case when $status='''' then 1 else t1.status=$status end)\nand (case when $beginDate='''' then 1 else t1.begin>=cast($beginDate as date) end)\nand (case when $endDate='''' then 1 else t1.end<=cast($endDate as date) end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"object"},"assignedTo":{"object":"task","field":"assignedTo","type":"user"},"taskID":{"object":"team","field":"","type":"number"},"projectstatus":{"object":"team","field":"","type":"string"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"assignedTo":{"zh-cn":"\\u6307\\u6d3e\\u7ed9","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"\\u4eba\\u5458\\u88ab\\u6307\\u6d3e\\u4efb\\u52a1","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","status","beginDate","endDate"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001","\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f"],"requestType":["select","select","date","date"],"selectList":["project","project.status","user","user"],"default":["","","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"taskID","slice":"assignedTo","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""},{"from":"query","field":"beginDate","name":"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1010, 1, '60', 'projectTaskFinished', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u4efb\\u52a1\\u5b8c\\u6210\\u8005\\u7edf\\u8ba1\\u8868","zh-tw":"\\u9805\\u76ee\\u4efb\\u52d9\\u5b8c\\u6210\\u8005\\u7d71\\u8a08\\u8868","en":"Task Finish Report","de":"Task Finish Report","fr":"Task Finish Report","vi":"Task Finish Report","ja":"Task Finish Report"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u5b8c\\u6210\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u5b8c\\u6210\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as projectname,\n t3.id as project,\n t1.name as executionname,\n t2.execution as execution,\n t2.finishedBy,\n t2.id as taskID,\n t1.status as projectstatus\nfrom zt_project as t1\nleft join zt_task as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t1.project=t3.id\nleft join zt_user as t4 on t2.finishedBy=t4.account\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand t2.deleted=''0''\nand t2.finishedBy!=''''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $status='''' then 1 else t1.status=$status end)\nand (case when $dept='''' then 1 else t4.dept=$dept end)\nand (case when $user='''' then 1 else t2.finishedBy=$user end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"object"},"finishedBy":{"object":"task","field":"finishedBy","type":"user"},"taskID":{"object":"task","field":"","type":"number"},"projectstatus":{"object":"task","field":"","type":"string"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"finishedBy":{"zh-cn":"\\u7531\\u8c01\\u5b8c\\u6210","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"\\u4e0d\\u540c\\u5b8c\\u6210\\u8005\\u5b8c\\u6210\\u7684\\u4efb\\u52a1","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","status","beginDate","endDate"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001","\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f"],"requestType":["select","select","date","date"],"selectList":["project","project.status","user","user"],"default":["","","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"taskID","slice":"finishedBy","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""},{"field":"dept","name":"\\u5b8c\\u6210\\u8005\\u6240\\u5728\\u90e8\\u95e8","type":"select","typeOption":"dept","default":"","from":"query"},{"field":"user","name":"\\u5b8c\\u6210\\u8005","type":"select","typeOption":"user","default":"","from":"query"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1011, 1, '60', 'projectInvested', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u6295\\u5165\\u7edf\\u8ba1\\u8868","zh-tw":"\\u9805\\u76ee\\u6295\\u5165\\u7d71\\u8a08\\u8868","en":"Project Invest Report","de":"Project Invest Report","fr":"Project Invest Report","vi":"Project Invest Report","ja":"Project Invest Report"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u5217\\u51fa\\uff1a\\u4efb\\u52a1\\u6570\\uff0c\\u9700\\u6c42\\u6570\\uff0c\\u4eba\\u6570\\uff0c\\u603b\\u6d88\\u8017\\u5de5\\u65f6\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u5217\\u51fa\\uff1a\\u4efb\\u52d9\\u6578\\uff0c\\u9700\\u6c42\\u6578\\uff0c\\u4eba\\u6578\\uff0c\\u7e3d\\u6d88\\u8017\\u5de5\\u6642\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t5.name as projectname,\n t5.id as project,\n t1.name as executionname,\n t2.execution as execution,\n concat(t1.begin,'' ~ '',t1.end) as timeLimit,\n t2.teams,\n t3.stories,\n round(t4.consumed,1) as consumed,\n t4.number,\n t1.status as projectstatus\nfrom zt_project as t1\nleft join ztv_projectteams as t2 on t1.id=t2.execution\nleft join ztv_projectstories as t3 on t1.id=t3.execution\nleft join ztv_executionsummary as t4 on t1.id=t4.execution\nleft join zt_project as t5 on t1.project=t5.id\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand (case when $project='''' then 1 else t5.id=$project end)\nand (case when $status='''' then 1 else t1.status=$status end)\nand (case when $beginDate='''' then 1 else t1.begin>=cast($beginDate as date) end)\nand (case when $endDate='''' then 1 else t1.end<=cast($endDate as date) end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"object"},"timeLimit":{"object":"project","field":"","type":"string"},"teams":{"object":"project","field":"","type":"string"},"stories":{"object":"project","field":"","type":"string"},"consumed":{"object":"project","field":"","type":"number"},"number":{"object":"project","field":"","type":"string"},"projectstatus":{"object":"project","field":"","type":"object"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"timeLimit":{"zh-cn":"\\u5de5\\u671f","zh-tw":"","en":"","de":"","fr":""},"teams":{"zh-cn":"\\u4eba\\u6570","zh-tw":"","en":"","de":"","fr":""},"stories":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"","en":"","de":"","fr":""},"consumed":{"zh-cn":"\\u603b\\u6d88\\u8017","zh-tw":"","en":"","de":"","fr":""},"number":{"zh-cn":"\\u4efb\\u52a1\\u6570","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","status","beginDate","endDate"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001","\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f"],"requestType":["select","select","date","date"],"selectList":["project","project.status","user","user"],"default":["","","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"number","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"stories","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"teams","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"consumed","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""},{"from":"query","field":"beginDate","name":"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1012, 1, '60', 'projectStoryStatus', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u9700\\u6c42\\u72b6\\u6001\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76ee\\u9700\\u6c42\\u72c0\\u614b\\u5206\\u5e03\\u8868","en":"Project Story Status","de":"Project Story Status","fr":"Project Story Status","vi":"Project Story Status","ja":"Project Story Status"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t2.id,\n t4.name as projectname,\n t4.id as project,\n t2.name as executionname,\n t2.id as execution,\n t3.status\nfrom zt_projectstory as t1\nleft join zt_project as t2 on t1.project=t2.id\nleft join zt_story as t3 on t1.story=t3.id\nleft join zt_project as t4 on t4.id=t2.project\nwhere t2.deleted=''0'' and t3.deleted=''0''\nand t2.type in(''sprint'', ''stage'')\nand (case when $project='''' then 1 else t4.id=$project end)\nand (case when $execution='''' then 1 else t2.id=$execution end)\nand (case when $status='''' then 1 else t2.status=$status end)', '{"id":{"object":"project","field":"","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"string"},"status":{"object":"story","field":"status","type":"option"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"status":{"zh-cn":"\\u4e0d\\u540c\\u72b6\\u6001\\u9700\\u6c42","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution","status"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001"],"requestType":["select","select","select"],"selectList":["project","execution","project.status"],"default":["","",""]}', NULL, '{"summary":"use","columns":[{"field":"status","slice":"status","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1013, 1, '60', 'projectStoryStage', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76ee\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u8868","en":"Project Stage Report","de":"Project Stage Report","fr":"Project Stage Report","vi":"Project Stage Report","ja":"Project Stage Report"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t2.id,\n t4.name as projectname,\n t4.id as project,\n t2.name as executionname,\n t2.id as execution,\n t3.stage\nfrom zt_projectstory as t1\nleft join zt_project as t2 on t1.project=t2.id\nleft join zt_story as t3 on t1.story=t3.id\nleft join zt_project as t4 on t4.id=t2.project\nwhere t2.deleted=''0'' and t3.deleted=''0''\nand t2.type in(''sprint'', ''stage'')\nand (case when $project='''' then 1 else t4.id=$project end)\nand (case when $execution='''' then 1 else t2.id=$execution end)\nand (case when $status='''' then 1 else t2.status=$status end)', '{"id":{"object":"project","field":"","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"string"},"stage":{"object":"story","field":"stage","type":"option"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"stage":{"zh-cn":"\\u4e0d\\u540c\\u9636\\u6bb5\\u9700\\u6c42","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution","status"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001"],"requestType":["select","select","select"],"selectList":["project","execution","project.status"],"default":["","",""]}', NULL, '{"summary":"use","columns":[{"field":"stage","slice":"stage","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'); INSERT INTO `zt_pivot` VALUES (1014, 1, '60,61', 'projectBugResolution', 'mysql', '{"zh-cn":"\\u9879\\u76eeBug\\u89e3\\u51b3\\u65b9\\u6848\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76eeBug\\u89e3\\u6c7a\\u65b9\\u6848\\u5206\\u5e03\\u8868","en":"Project Bug Resolution","de":"Project Bug Resolution","fr":"Project Bug Resolution","vi":"Project Bug Resolution","ja":"Project Bug Resolution"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u89e3\\u51b3\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u89e3\\u6c7a\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as project,\n t3.id as projectID,\n t1.id as execution,\n t1.name as executionname,\n t2.id as bugID,\n t2.resolution\nfrom zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand t2.resolution!=''''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"","type":"number"},"project":{"object":"project","field":"name","type":"string"},"projectID":{"object":"project","field":"","type":"number"},"execution":{"object":"project","field":"name","type":"string"},"executionname":{"object":"bug","field":"","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"resolution":{"object":"bug","field":"resolution","type":"option"}}', '{"id":{"zh-cn":"\\u9879\\u76ee","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectID":{"zh-cn":"\\u6267\\u884c","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"resolution":{"zh-cn":"\\u89e3\\u51b3\\u65b9\\u6848","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"resolution","slice":"resolution","stat":"count","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"project","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1015, 1, '60,61', 'projectBugStatus', 'mysql', '{"zh-cn":"\\u9879\\u76eeBug\\u72b6\\u6001\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76eeBug\\u72c0\\u614b\\u5206\\u5e03\\u8868","en":"Project Bug Status","de":"Project Bug Status","fr":"Project Bug Status","vi":"Project Bug Status","ja":"Project Bug Status"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as project,\n t3.id as projectID,\n t1.name as execution,\n t1.id as executionID,\n t2.id as bugID,\n t2.status\nfrom zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"id","type":"number"},"project":{"object":"project","field":"name","type":"string"},"projectID":{"object":"project","field":"id","type":"number"},"execution":{"object":"project","field":"name","type":"string"},"executionID":{"object":"project","field":"name","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"status":{"object":"bug","field":"status","type":"option"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectID":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"executionID":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"status":{"zh-cn":"Bug\\u72b6\\u6001","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"status","slice":"status","stat":"count","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"noShow","group1":"project","group2":"execution"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1016, 1, '60,61', 'projectBugOpenedBy', 'mysql', '{"zh-cn":"\\u9879\\u76eeBug\\u521b\\u5efa\\u8005\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76eeBug\\u5275\\u5efa\\u8005\\u5206\\u5e03\\u8868","en":"Project Bug Opened","de":"Project Bug Opened","fr":"Project Bug Opened","vi":"Project Bug Opened","ja":"Project Bug Opened"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u521b\\u5efa\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u5275\\u5efa\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as projectname,\n t3.id as projectID,\n t1.name as executionname,\n t1.id as execution,\n t2.id as bugID,\n t2.openedBy\nfrom zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"projectID":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"openedBy":{"object":"project","field":"openedBy","type":"user"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectID":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"openedBy":{"zh-cn":"\\u521b\\u5efa\\u8005","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"openedBy","slice":"openedBy","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1017, 1, '60,61', 'projectBugResolvedBy', 'mysql', '{"zh-cn":"\\u9879\\u76eeBug\\u89e3\\u51b3\\u8005\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76eeBug\\u89e3\\u6c7a\\u8005\\u5206\\u5e03\\u8868","en":"Project Bug Resolve","de":"Project Bug Resolve","fr":"Project Bug Resolve","vi":"Project Bug Resolve","ja":"Project Bug Resolve"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u89e3\\u51b3\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u89e3\\u6c7a\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as projectname,\n t3.id as projectID,\n t1.name as executionname,\n t1.id as execution,\n t2.id as bugID,\n t2.resolvedBy\nfrom zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand t2.status!=''active''\nand t2.resolvedBy!=''''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"projectID":{"object":"project","field":"id","type":"number"},"executionname":{"object":"bug","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"resolvedBy":{"object":"bug","field":"resolvedBy","type":"user"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectID":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"resolvedBy":{"zh-cn":"\\u89e3\\u51b3\\u8005","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"resolvedBy","slice":"resolvedBy","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1018, 1, '60,61', 'projectBugAssignedBy', 'mysql', '{"zh-cn":"\\u9879\\u76eeBug\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u8868","zh-tw":"\\u9805\\u76eeBug\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u8868","en":"Project Bug Assign","de":"Project Bug Assign","fr":"Project Bug Assign","vi":"Project Bug Assign","ja":"Project Bug Assign"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t3.name as project,\n t3.id as projectID,\n t1.name as execution,\n t1.id as executionID,\n t2.id as bugID,\n t2.assignedTo\nfrom zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"id","type":"number"},"project":{"object":"project","field":"name","type":"string"},"projectID":{"object":"project","field":"id","type":"number"},"execution":{"object":"project","field":"name","type":"string"},"executionID":{"object":"project","field":"name","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"assignedTo":{"object":"bug","field":"assignedTo","type":"user"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectID":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"executionID":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"assignedTo":{"zh-cn":"\\u6307\\u6d3e\\u7ed9","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"assignedTo","slice":"assignedTo","stat":"count","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"noShow","group1":"project","group2":"execution"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1019, 1, '60', 'projectQuality', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u8d28\\u91cf\\u8868","zh-tw":"\\u9805\\u76ee\\u8cea\\u91cf\\u8868","en":"Project Quality Report","de":"Project Quality Report","fr":"Project Quality Report","vi":"Project Quality Report","ja":"Project Quality Report"}', '{"zh-cn":"\\u5217\\u51fa\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u5b8c\\u6210\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u603b\\u6570\\uff0c\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\uff0cBug\\u6570\\uff0c\\u89e3\\u51b3\\u7684Bug\\u6570\\uff0cBug\\/\\u9700\\u6c42\\uff0cBug\\/\\u4efb\\u52a1\\uff0c\\u91cd\\u8981Bug\\u6570\\u91cf(\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e0d\\u5927\\u4e8e3\\uff09\\u3002","zh-tw":"\\u5217\\u51fa\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u5b8c\\u6210\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u7e3d\\u6578\\uff0c\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\uff0cBug\\u6578\\uff0c\\u89e3\\u6c7a\\u7684Bug\\u6578\\uff0cBug\\/\\u9700\\u6c42\\uff0cBug\\/\\u4efb\\u52d9\\uff0c\\u91cd\\u8981Bug\\u6578\\u91cf(\\u56b4\\u91cd\\u7a0b\\u5ea6\\u4e0d\\u5927\\u65bc3\\uff09\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t5.name as projectname,\n t5.id as project,\n t1.name as executionname,\n t1.id as execution,\n ifnull(t2.stories, 0) as stories,\n ifnull((t2.stories-t2.undone), 0) as doneStory,\n ifnull(t3.number, 0) as number,\n ifnull((t3.number-t3.undone), 0) as doneTask,\n ifnull(t4.bugs, 0) as bugs,\n ifnull(t4.resolutions, 0) as resolutions,\n ifnull(round(t4.bugs/(t2.stories-t2.undone),2), 0) as bugthanstory,\n ifnull(round(t4.bugs/(t3.number-t3.undone),2), 0) as bugthantask,\n ifnull(t4.seriousBugs, 0) as seriousBugs\nfrom zt_project as t1\nleft join ztv_projectstories as t2 on t1.id=t2.execution\nleft join ztv_executionsummary as t3 on t1.id=t3.execution\nleft join ztv_projectbugs as t4 on t1.id=t4.execution\nleft join zt_project as t5 on t5.id=t1.project\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand t1.grade=''1''\nand (case when $project='''' then 1 else t5.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"name","type":"string"},"stories":{"object":"project","field":"","type":"string"},"doneStory":{"object":"project","field":"","type":"number"},"number":{"object":"project","field":"","type":"string"},"doneTask":{"object":"project","field":"","type":"number"},"bugs":{"object":"project","field":"","type":"string"},"resolutions":{"object":"project","field":"","type":"number"},"bugthanstory":{"object":"project","field":"","type":"number"},"bugthantask":{"object":"project","field":"","type":"number"},"seriousBugs":{"object":"project","field":"","type":"number"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"stories":{"zh-cn":"\\u9700\\u6c42\\u603b\\u6570","zh-tw":"","en":"","de":"","fr":""},"doneStory":{"zh-cn":"\\u5173\\u95ed\\u9700\\u6c42\\u6570","zh-tw":"","en":"","de":"","fr":""},"number":{"zh-cn":"\\u4efb\\u52a1\\u603b\\u6570","zh-tw":"","en":"","de":"","fr":""},"doneTask":{"zh-cn":"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570","zh-tw":"","en":"","de":"","fr":""},"bugs":{"zh-cn":"Bug\\u6570","zh-tw":"","en":"","de":"","fr":""},"resolutions":{"zh-cn":"\\u89e3\\u51b3Bug\\u6570","zh-tw":"","en":"","de":"","fr":""},"bugthanstory":{"zh-cn":"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42","zh-tw":"","en":"","de":"","fr":""},"bugthantask":{"zh-cn":"Bug\\/\\u5b8c\\u6210\\u4efb\\u52a1","zh-tw":"","en":"","de":"","fr":""},"seriousBugs":{"zh-cn":"\\u91cd\\u8981Bug\\u6570","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"stories","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"doneStory","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"number","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"doneTask","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"bugs","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"resolutions","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"bugthanstory","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"bugthantask","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"seriousBugs","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1020, 1, '59,61', 'productBugType', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1Bug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868","zh-tw":"\\u7522\\u54c1Bug\\u985e\\u578b\\u7d71\\u8a08\\u8868","en":"Bug Type of Product","de":"Bug Type of Product","fr":"Bug Type of Product"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u7522\\u54c1\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"Type distribution of Bugs.","de":"Type distribution of Bugs.","fr":"Type distribution of Bugs."}', 'select\n t2.product,\n t1.name,\n t2.id as bugID,\n t2.type\nfrom zt_product as t1\nleft join zt_bug as t2 on t1.id=t2.product\nleft join zt_project as t3 on t1.program=t3.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\norder by t3.`order` asc, t1.line desc, t1.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"name":{"object":"product","field":"name","type":"string"},"bugID":{"object":"project","field":"","type":"number"},"type":{"object":"bug","field":"type","type":"option"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"\\u4e0d\\u540c\\u7c7b\\u578bBug","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"group1":"product","columnTotal":"sum","columns":[{"field":"type","slice":"type","stat":"count","showTotal":"sum","showMode":"default","monopolize":"0","showOrigin":0}],"summary":"use"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1021, 1, '59', 'productQuality', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1\\u8d28\\u91cf\\u8868","zh-tw":"\\u7522\\u54c1\\u8cea\\u91cf\\u8868","en":"Product Quality","de":"Product Quality","fr":"Product Quality"}', '{"zh-cn":"\\u5217\\u51fa\\u4ea7\\u54c1\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u5b8c\\u6210\\u7684\\u9700\\u6c42\\u603b\\u6570\\uff0cBug\\u6570\\uff0c\\u89e3\\u51b3\\u7684Bug\\u603b\\u6570\\uff0cBug\\/\\u9700\\u6c42\\uff0c\\u91cd\\u8981Bug\\u6570\\u91cf(\\u4e25\\u91cd\\u7a0b\\u5ea6\\u5c0f\\u4e8e3)\\u3002","zh-tw":"\\u5217\\u51fa\\u7522\\u54c1\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u5b8c\\u6210\\u7684\\u9700\\u6c42\\u7e3d\\u6578\\uff0cBug\\u6578\\uff0c\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0cBug\\/\\u9700\\u6c42\\uff0c\\u91cd\\u8981Bug\\u6578\\u91cf(\\u56b4\\u91cd\\u7a0b\\u5ea6\\u5c0f\\u65bc3)\\u3002","en":"Serious Bug (severity is less than 3).","de":"Serious Bug (severity is less than 3).","fr":"Serious Bug (severity is less than 3)."}', 'select\n t1.id,\n t1.name,\n ifnull(t2.stories, 0) as stories,\n ifnull((t2.stories-t2.undone), 0) as doneStory,\n ifnull(t3.bugs, 0) as bugs,\n ifnull(t3.resolutions, 0) as resolutions,\n ifnull(round(t3.bugs/(t2.stories-t2.undone),2), 0) as bugthanstory,\n ifnull(t3.seriousBugs, 0) as seriousBugs\nfrom zt_product as t1\nleft join ztv_productstories as t2 on t1.id=t2.product\nleft join ztv_productbugs as t3 on t1.id=t3.product\nleft join zt_project as t4 on t1.program=t4.id\nwhere t1.deleted=''0''\norder by t4.`order` asc, t1.line desc, t1.`order` asc', '{"id":{"object":"product","field":"id","type":"number"},"name":{"object":"product","field":"name","type":"string"},"stories":{"object":"project","field":"","type":"string"},"doneStory":{"object":"project","field":"","type":"number"},"bugs":{"object":"product","field":"","type":"string"},"resolutions":{"object":"project","field":"","type":"number"},"bugthanstory":{"object":"project","field":"","type":"number"},"seriousBugs":{"object":"project","field":"","type":"number"}}', '{"id":{"zh-cn":"\\u4ea7\\u54c1ID","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"stories":{"zh-cn":"\\u9700\\u6c42\\u603b\\u6570","zh-tw":"\\u9700\\u6c42\\u603b\\u6570","en":"Stories","de":"","fr":""},"doneStory":{"zh-cn":"\\u5173\\u95ed\\u9700\\u6c42\\u6570","zh-tw":"\\u5173\\u95ed\\u9700\\u6c42\\u6570","en":"Closed Stories","de":"","fr":""},"bugs":{"zh-cn":"Bug\\u6570","zh-tw":"Bug\\u6570","en":"Bugs","de":"","fr":""},"resolutions":{"zh-cn":"\\u89e3\\u51b3Bug\\u6570","zh-tw":"\\u89e3\\u51b3Bug\\u6570","en":"Solved Bugs","de":"","fr":""},"bugthanstory":{"zh-cn":"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42","zh-tw":"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42","en":"Bug\\/Finished Story","de":"","fr":""},"seriousBugs":{"zh-cn":"\\u91cd\\u8981Bug\\u6570","zh-tw":"\\u91cd\\u8981Bug\\u6570","en":"Serious Bugs","de":"","fr":""}}', NULL, NULL, '{"group1":"name","columnTotal":"sum","columns":[{"field":"stories","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0},{"field":"doneStory","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0},{"field":"bugs","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0},{"field":"resolutions","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0},{"field":"bugthanstory","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0},{"field":"seriousBugs","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"1","showOrigin":0}],"summary":"use"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1022, 1, '62', 'loginTimes', 'mysql', '{"zh-cn":"\\u5458\\u5de5\\u767b\\u5f55\\u6b21\\u6570\\u7edf\\u8ba1\\u8868","zh-tw":"\\u54e1\\u5de5\\u767b\\u9304\\u6b21\\u6578\\u7d71\\u8a08\\u8868","en":"Login Times","de":"Login Times","fr":"Login Times"}', '{"zh-cn":"\\u5b9e\\u73b0\\u5458\\u5de5\\u767b\\u5f55\\u6b21\\u6570\\u7edf\\u8ba1\\u62a5\\u8868\\uff0c\\u6309\\u7167\\u5929\\u7edf\\u8ba1\\u6bcf\\u5929\\u6bcf\\u4e2a\\u4eba\\u7684\\u767b\\u5f55\\u6b21\\u6570\\uff0c\\u4ee5\\u53ca\\u603b\\u6570\\u3002","zh-tw":"\\u5be6\\u73fe\\u54e1\\u5de5\\u767b\\u9304\\u6b21\\u6578\\u7d71\\u8a08\\u5831\\u8868\\uff0c\\u6309\\u7167\\u5929\\u7d71\\u8a08\\u6bcf\\u5929\\u6bcf\\u500b\\u4eba\\u7684\\u767b\\u9304\\u6b21\\u6578\\uff0c\\u4ee5\\u53ca\\u7e3d\\u6578\\u3002","en":"The summary of user login times.","de":"The summary of user login times.","fr":"The summary of user login times."}', 'select actor,LEFT(`date`,10) as `day` from zt_action\nwhere `action`=''login''\nand if($startDate='''',1,LEFT(`date`, 10)>=cast($startDate as date))\nand if($endDate='''',1,LEFT(`date`, 10)<=cast($endDate as date))\norder by `date` asc, actor asc', '{"actor":{"object":"action","field":"actor","type":"user"},"day":{"object":"action","field":"day","type":"string"}}', '{"actor":{"name":"\\u64cd\\u4f5c\\u8005","zh-cn":"\\u64cd\\u4f5c\\u8005","zh-tw":"","en":"","de":"","fr":""},"day":{"name":"day","zh-cn":"\\u65e5\\u671f","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["startDate","endDate"],"showName":["\\u8d77\\u59cb\\u65f6\\u95f4","\\u7ed3\\u675f\\u65f6\\u95f4"],"requestType":["date","date"],"selectList":["user","user"],"default":["$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","group1":"actor","columns":[{"field":"day","slice":"day","stat":"count","showTotal":"sum","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum"}', '[{"from":"query","field":"startDate","name":"\\u8d77\\u59cb\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u7ed3\\u675f\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1023, 1, '62', 'effortSummary', 'mysql', '{"zh-cn":"\\u65e5\\u5fd7\\u6c47\\u603b\\u8868","zh-tw":"\\u65e5\\u8a8c\\u532f\\u7e3d\\u8868","en":"Effort Summary","de":"Effort Summary","fr":"Effort Summary"}', '{"zh-cn":"\\u67e5\\u770b\\u67d0\\u4e2a\\u65f6\\u95f4\\u6bb5\\u5185\\u7684\\u65e5\\u5fd7\\u60c5\\u51b5\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u95e8\\u9009\\u62e9\\u3002","zh-tw":"\\u67e5\\u770b\\u67d0\\u500b\\u6642\\u9593\\u6bb5\\u5167\\u7684\\u65e5\\u8a8c\\u60c5\\u6cc1\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u9580\\u9078\\u64c7\\u3002","en":"Effort summary of users.","de":"Effort summary of users","fr":"Effort summary of users"}', 'select\n t1.account,\n t1.consumed,\n t1.`date`,\n t2.dept as dept\nfrom zt_effort as t1\nleft join zt_user as t2 on t1.account = t2.account\nleft join zt_dept as t3 on t2.dept = t3.id\nwhere t1.`deleted` = ''0''\nand (case when $startDate='''' then 1 else cast(t1.`date` as date) >= cast($startDate as date) end)\nand (case when $endDate='''' then 1 else cast(t1.`date` as date) <= cast($endDate as date) end)\nand (t3.path like concat((select path from zt_dept where id=$dept), ''%'') or $dept=0)\norder by t1.`date` asc', '{"account":{"object":"effort","field":"account","type":"user"},"consumed":{"object":"effort","field":"consumed","type":"number"},"date":{"object":"effort","field":"date","type":"date"},"dept":{"object":"effort","field":"dept","type":"number"}}', '{"account":{"name":"account","zh-cn":"\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"consumed":{"name":"consumed","zh-cn":"\\u6d88\\u8017\\u5de5\\u65f6","zh-tw":"\\u6d88\\u8017\\u5de5\\u65f6","en":"Cost","de":"","fr":""},"date":{"name":"date","zh-cn":"\\u65e5\\u671f","zh-tw":"\\u65e5\\u671f","en":"Date","de":"","fr":""},"dept":{"name":"dept","zh-cn":"\\u90e8\\u95e8","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["dept","startDate","endDate"],"showName":["\\u90e8\\u95e8","\\u8d77\\u59cb\\u65f6\\u95f4","\\u7ed3\\u675f\\u65f6\\u95f4"],"requestType":["select","date","date"],"selectList":["dept","user","user"],"default":["","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"group1":"account","columnTotal":"sum","columns":[{"field":"consumed","slice":"date","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":"0","showOrigin":0}],"lastStep":"4","summary":"use"}', '[{"from":"query","field":"dept","name":"\\u90e8\\u95e8","type":"select","typeOption":"dept","default":""},{"from":"query","field":"startDate","name":"\\u8d77\\u59cb\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u7ed3\\u675f\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1024, 1, '62', 'companyDynamics', 'mysql', '{"zh-cn":"\\u516c\\u53f8\\u52a8\\u6001\\u6c47\\u603b\\u8868","zh-tw":"\\u516c\\u53f8\\u52d5\\u614b\\u532f\\u7e3d\\u8868","en":"Company Dynamics","de":"Company Dynamics","fr":"Company Dynamics"}', '{"zh-cn":"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u4e2a\\u65f6\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u5e94\\u7684\\u6570\\u636e\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u5f55\\u6b21\\u6570\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u5fd7\\u5de5\\u65f6\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6570\\u30024. \\u6bcf\\u5929\\u5173\\u95ed\\u7684\\u9700\\u6c42\\u6570\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52a1\\u6570\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6570\\u30028. \\u6bcf\\u5929\\u89e3\\u51b3\\u7684Bug\\u6570\\u30029. \\u6bcf\\u5929\\u7684\\u52a8\\u6001\\u6570\\u3002","zh-tw":"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u500b\\u6642\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u61c9\\u7684\\u6578\\u64da\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u9304\\u6b21\\u6578\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u8a8c\\u5de5\\u6642\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6578\\u30024. \\u6bcf\\u5929\\u95dc\\u9589\\u7684\\u9700\\u6c42\\u6578\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52d9\\u6578\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6578\\u30028. \\u6bcf\\u5929\\u89e3\\u6c7a\\u7684Bug\\u6578\\u30029. \\u6bcf\\u5929\\u7684\\u52d5\\u614b\\u6578\\u3002","en":"The summary of company dynamics","de":"The summary of company dynamics","fr":"The summary of company dynamics"}', 'select t1.day,t2.userlogin,t3.consumed,t4.storyopen,t5.storyclose,t6.taskopen,t7.taskfinish,t8.bugopen,t9.bugresolve,t1.actions from ztv_dayactions as t1 left join ztv_dayuserlogin as t2 on t1.day=t2.day left join ztv_dayeffort as t3 on t1.day=t3.date left join ztv_daystoryopen as t4 on t1.day=t4.day left join ztv_daystoryclose as t5 on t1.day=t5.day left join ztv_daytaskopen as t6 on t1.day=t6.day left join ztv_daytaskfinish as t7 on t1.day=t7.day left join ztv_daybugopen as t8 on t1.day=t8.day left join ztv_daybugresolve as t9 on t1.day=t9.day where if($startDate='''',1,t1.day>=$startDate) and if($endDate='''',1,t1.day<=$endDate)', '{"day":{"object":"","field":"day","type":"string"},"userlogin":{"object":"","field":"userlogin","type":"string"},"consumed":{"object":"","field":"consumed","type":"number"},"storyopen":{"object":"","field":"storyopen","type":"string"},"storyclose":{"object":"","field":"storyclose","type":"string"},"taskopen":{"object":"","field":"taskopen","type":"string"},"taskfinish":{"object":"","field":"taskfinish","type":"string"},"bugopen":{"object":"","field":"bugopen","type":"string"},"bugresolve":{"object":"","field":"bugresolve","type":"string"},"actions":{"object":"","field":"actions","type":"string"}}', '{"day":{"zh-cn":"\\u65e5\\u671f","zh-tw":"\\u65e5\\u671f","en":"Date"},"userlogin":{"zh-cn":"\\u767b\\u5f55\\u6b21\\u6570","zh-tw":"\\u767b\\u9304\\u6b21\\u6578","en":"Login"},"consumed":{"zh-cn":"\\u65e5\\u5fd7\\u5de5\\u65f6","zh-tw":"\\u65e5\\u8a8c\\u5de5\\u6642","en":"Cost(h)"},"storyopen":{"zh-cn":"\\u65b0\\u589e\\u9700\\u6c42\\u6570","zh-tw":"\\u65b0\\u589e\\u9700\\u6c42\\u6578","en":"Open Story"},"storyclose":{"zh-cn":"\\u5173\\u95ed\\u9700\\u6c42\\u6570","zh-tw":"\\u95dc\\u9589\\u9700\\u6c42\\u6578","en":"Closed Story"},"taskopen":{"zh-cn":"\\u65b0\\u589e\\u4efb\\u52a1\\u6570","zh-tw":"\\u65b0\\u589e\\u4efb\\u52d9\\u6578","en":"Open Task"},"taskfinish":{"zh-cn":"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570","zh-tw":"\\u5b8c\\u6210\\u4efb\\u52d9\\u6578","en":"Finished Task"},"bugopen":{"zh-cn":"\\u65b0\\u589eBug\\u6570","zh-tw":"\\u65b0\\u589eBug\\u6578","en":"Open Bug"},"bugresolve":{"zh-cn":"\\u89e3\\u51b3Bug\\u6570","zh-tw":"\\u89e3\\u51b3Bug\\u6578","en":"Resolved bug"},"actions":{"zh-cn":"\\u52a8\\u6001\\u6570","zh-tw":"\\u52d5\\u614b\\u6578","en":"Dynamics"}}', '{"varName":["startDate","endDate"],"showName":["\\u8d77\\u59cb\\u65f6\\u95f4","\\u7ed3\\u675f\\u65f6\\u95f4"],"requestType":["date","date"],"selectList":["user","user"],"default":["$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","group1":"day","columns":[{"field":"userlogin","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"consumed","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"storyopen","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"storyclose","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"taskopen","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"taskfinish","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"bugopen","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"bugresolve","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"actions","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum"}', '[{"from":"query","field":"startDate","name":"\\u8d77\\u59cb\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u7ed3\\u675f\\u65f6\\u95f4","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1025, 1, '61', 'slovedBugs', 'mysql', '{"zh-cn":"Bug\\u89e3\\u51b3\\u8868","zh-tw":"Bug\\u89e3\\u6c7a\\u8868","en":"Solved Bugs","de":"Solved Bugs","fr":"Solved Bugs"}', '{"zh-cn":"\\u5217\\u51fa\\u89e3\\u51b3\\u7684Bug\\u603b\\u6570\\uff0c\\u89e3\\u51b3\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8be5\\u7528\\u6237\\u89e3\\u51b3\\u7684Bug\\u7684\\u6570\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u51b3\\u7684Bug\\u7684\\u6570\\u91cf)\\u3002","zh-tw":"\\u5217\\u51fa\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0c\\u89e3\\u6c7a\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8a72\\u7528\\u6236\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf)\\u3002","en":"percentage:self resolved \\/ all resolved","de":"percentage:self resolved \\/ all resolved","fr":"percentage:self resolved \\/ all resolved"}', 'select\n t1.resolvedBy,t1.resolution\nfrom zt_bug as t1\nleft join zt_product as t2 on t1.product = t2.id\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand t1.resolution!=''''\nand (case when $startDate='''' then 1 else cast(t1.resolvedDate as date)>=cast($startDate as date) end)\nand (case when $endDate='''' then 1 else cast(t1.resolvedDate as date)<=cast($endDate as date) end)\nand (case when $product = '''' then 1 else t1.product=$product end)', '{"resolvedBy":{"object":"bug","field":"resolvedBy","type":"user"},"resolution":{"object":"bug","field":"resolution","type":"option"}}', '{"resolvedBy":{"zh-cn":"\\u89e3\\u51b3\\u8005","zh-tw":"","en":"","de":"","fr":""},"resolution":{"zh-cn":"\\u4e0d\\u540c\\u89e3\\u51b3\\u65b9\\u6848\\u7684Bug","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["product","startDate","endDate"],"showName":["\\u4ea7\\u54c1","\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb","\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f"],"requestType":["select","date","date"],"selectList":["product","user","user"],"default":["","$MONTHBEGIN","$MONTHEND"]}', NULL, '{"summary":"use","columns":[{"field":"resolution","slice":"resolution","stat":"count","showTotal":"sum","showMode":"row","monopolize":1,"showOrigin":0}],"columnTotal":"sum","group1":"resolvedBy"}', '[{"from":"query","field":"product","name":"\\u4ea7\\u54c1","type":"select","typeOption":"product","default":""},{"from":"query","field":"startDate","name":"\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb","type":"date","typeOption":"","default":"$MONTHBEGIN"},{"from":"query","field":"endDate","name":"\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f","type":"date","typeOption":"","default":"$MONTHEND"}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1026, 1, '60', 'projectProgress', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868","zh-tw":"\\u9805\\u76ee\\u9032\\u5c55\\u8868","en":"Project Progress Report","de":"Project Progress Report","fr":"Project Progress Report","vi":"Project Progress Report","ja":"Project Progress Report"}', '{"zh-cn":"\\u9879\\u76ee\\u7684\\uff1a\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570(\\u8fc7\\u6ee4\\u72b6\\u6001\\u4e3a\\u5df2\\u5173\\u95ed\\u7684\\u9700\\u6c42)\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570(\\u8fc7\\u6ee4\\u72b6\\u6001\\u4e3a\\u5df2\\u5b8c\\u6210\\u548c\\u5df2\\u5173\\u95ed\\u7684\\u4efb\\u52a1)\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff08\\u5269\\u4f59\\u4efb\\u52a1\\u7684\\u5269\\u4f59\\u5de5\\u65f6\\uff09\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\u3002","zh-tw":"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002","en":"","de":"","fr":"","vi":"","ja":""}', 'select\n t1.id,\n t4.name as projectname,\n t4.id as project,\n t1.name as executionname,\n t1.id as execution,\n t1.status,\n t2.number as tasks,\n round(t2.consumed,2) as consumed,\n round(t2.`left`,2) as `left`,\n t3.stories,\n t2.undone as undoneTask,\n t3.undone as undoneStory,\n t2.totalReal from zt_project as t1\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\nleft join ztv_projectstories as t3 on t1.id=t3.execution\nleft join zt_project as t4 on t4.id=t1.project\nwhere t1.deleted=''0''\nand t1.type in (''sprint'',''stage'')\nand (case when $project='''' then 1 else t4.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)\nand (case when $status='''' then 1 else t1.status=$status end)', '{"id":{"object":"project","field":"id","type":"number"},"projectname":{"object":"project","field":"name","type":"string"},"project":{"object":"project","field":"id","type":"number"},"executionname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"id","type":"string"},"status":{"object":"project","field":"status","type":"option"},"tasks":{"object":"project","field":"","type":"string"},"consumed":{"object":"project","field":"","type":"number"},"left":{"object":"project","field":"","type":"number"},"stories":{"object":"project","field":"","type":"string"},"undoneTask":{"object":"project","field":"","type":"number"},"undoneStory":{"object":"project","field":"","type":"number"},"totalReal":{"object":"project","field":"","type":"number"}}', '{"id":{"zh-cn":"id","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884cID","zh-tw":"","en":"","de":"","fr":""},"status":{"zh-cn":"\\u72b6\\u6001","zh-tw":"","en":"","de":"","fr":""},"tasks":{"zh-cn":"\\u4efb\\u52a1\\u6570","zh-tw":"\\u4efb\\u52a1\\u6570","en":"Tasks","de":"","fr":""},"consumed":{"zh-cn":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","zh-tw":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","en":"Cost(h)","de":"","fr":""},"left":{"zh-cn":"\\u5269\\u4f59\\u5de5\\u65f6","zh-tw":"\\u5269\\u4f59\\u5de5\\u65f6","en":"Left(h)","de":"","fr":""},"stories":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories","de":"","fr":""},"undoneTask":{"zh-cn":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","zh-tw":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","en":"Undone Task","de":"","fr":""},"undoneStory":{"zh-cn":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","zh-tw":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","en":"Undone Story","de":"","fr":""},"totalReal":{"zh-cn":"totalReal","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution","status"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868","\\u6267\\u884c\\u72b6\\u6001"],"requestType":["select","select","select"],"selectList":["project","execution","project.status"],"default":["","",""]}', NULL, '{"summary":"use","columns":[{"field":"stories","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"undoneStory","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"tasks","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"undoneTask","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"left","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0},{"field":"consumed","slice":"noSlice","stat":"sum","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""},{"from":"query","field":"status","name":"\\u6267\\u884c\\u72b6\\u6001","type":"select","typeOption":"project.status","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1027, 1, '60,61', 'projectBugType', 'mysql', '{"zh-cn":"\\u9879\\u76ee\\u6267\\u884cBug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868","zh-tw":"\\u9805\\u76eeBug\\u985e\\u578b\\u7d71\\u8a08\\u8868","en":"Project Bug Type","de":"Project Bug Type","fr":"Project Bug Type"}', '{"zh-cn":"\\u6309\\u7167\\u9879\\u76ee\\u4e0b\\u4e0d\\u540c\\u6267\\u884c\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002"}', 'select\n t1.id,\n t2.project as project,\n t3.name as projectname,\n t1.id as execution,\n t1.name as executionname,\n t2.id as bugID,\n t2.type from zt_project as t1\nleft join zt_bug as t2 on t1.id=t2.execution\nleft join zt_project as t3 on t3.id=t1.project\nwhere t1.deleted=''0''\nand t2.deleted=''0''\nand (case when $project='''' then 1 else t3.id=$project end)\nand (case when $execution='''' then 1 else t1.id=$execution end)', '{"id":{"object":"project","field":"id","type":"number"},"project":{"object":"project","field":"name","type":"object"},"projectname":{"object":"project","field":"name","type":"string"},"execution":{"object":"project","field":"id","type":"string"},"executionname":{"object":"project","field":"name","type":"string"},"bugID":{"object":"bug","field":"","type":"number"},"type":{"object":"bug","field":"type","type":"option"}}', '{"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"projectname":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"executionname":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"\\u4e0d\\u540c\\u7c7b\\u578b\\u7684Bug","zh-tw":"","en":"","de":"","fr":""}}', '{"varName":["project","execution"],"showName":["\\u9879\\u76ee\\u5217\\u8868","\\u6267\\u884c\\u5217\\u8868"],"requestType":["select","select"],"selectList":["project","execution"],"default":["",""]}', NULL, '{"summary":"use","columns":[{"field":"type","slice":"type","stat":"count","showTotal":"noShow","showMode":"default","monopolize":0,"showOrigin":0}],"columnTotal":"sum","group1":"projectname","group2":"executionname"}', '[{"from":"query","field":"project","name":"\\u9879\\u76ee\\u5217\\u8868","type":"select","typeOption":"project","default":""},{"from":"query","field":"execution","name":"\\u6267\\u884c\\u5217\\u8868","type":"select","typeOption":"execution","default":""}]', 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0'), (1028, 1, '59,61', 'productBugSolution', 'mysql', '{"zh-cn":"\\u4ea7\\u54c1Bug\\u89e3\\u51b3\\u65b9\\u6848\\u7edf\\u8ba1\\u8868","zh-tw":"\\u7523\\u54c1Bug\\u89e3\\u6c7a\\u65b9\\u6848\\u7d71\\u8a08\\u8868","en":"Bug Solution of Product"}', '{"zh-cn":"\\u6309\\u7167\\u4ea7\\u54c1\\u7edf\\u8ba1Bug\\u7684\\u89e3\\u51b3\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u51b5\\u3002","zh-tw":"\\u6309\\u7167\\u7523\\u54c1\\u7d71\\u8a08Bug\\u7684\\u89e3\\u6c7a\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u6cc1\\u3002","en":"Solution distribution of bugs."}', 'select t1.product,t2.name,t1.id as bugID,t1.resolution from zt_bug as t1\nleft join zt_product as t2 on t2.id=t1.product\nleft join zt_project as t3 on t2.program=t3.id\nwhere t2.deleted=''0'' and t1.deleted=''0''\nand t1.resolution != ''''\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{"product":{"object":"product","field":"name","type":"object"},"name":{"object":"product","field":"name","type":"string"},"bugID":{"object":"bug","field":"id","type":"number"},"resolution":{"object":"bug","field":"resolution","type":"option"}}', '{"product":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"resolution":{"zh-cn":"\\u89e3\\u51b3\\u65b9\\u6848","zh-tw":"","en":"","de":"","fr":""}}', NULL, NULL, '{"group1":"product","columnTotal":"sum","columns":[{"field":"resolution","slice":"resolution","stat":"count","showTotal":"sum","showMode":"default","monopolize":"0","showOrigin":0}],"summary":"use"}', NULL, 0, 'published', '0', 'system', '[[regtime]]', '', NULL, '0');
-- -- Table structure for table `zt_pivotdrill` --
CREATE TABLE `zt_pivotdrill` ( `pivot` mediumint(9) NOT NULL, `field` varchar(255) NOT NULL, `object` varchar(40) NOT NULL, `whereSql` mediumtext NOT NULL, `condition` mediumtext NOT NULL, `status` enum('design','published') NOT NULL DEFAULT 'published', `account` varchar(30) NOT NULL DEFAULT '', `type` enum('auto','manual') NOT NULL DEFAULT 'manual' ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -- Dumping data for table `zt_pivotdrill` --
INSERT INTO `zt_pivotdrill` VALUES (1003, 'done', 'story', 'WHERE t1.deleted=''0'' and t1.closedReason = ''done'' or t1.stage = ''released''', '[{"drillObject":"zt_story","drillAlias":"t1","drillField":"product","queryField":"product"}]', 'published', '', 'manual'), (1003, 'count', 'story', 'WHERE t1.deleted=''0'' ', '[{"drillObject":"zt_story","drillAlias":"t1","drillField":"product","queryField":"product"}]', 'published', '', 'manual'), (1004, 'status', 'story', 'WHERE t1.deleted=''0'' ', '[{"drillObject":"zt_story","drillAlias":"t1","drillField":"product","queryField":"product"},{"drillObject":"zt_story","drillAlias":"t1","drillField":"status","queryField":"status"}]', 'published', '', 'manual'), (1005, 'stage', 'story', 'WHERE t1.deleted=''0'' ', '[{"drillObject":"zt_story","drillAlias":"t1","drillField":"product","queryField":"product"},{"drillObject":"zt_story","drillAlias":"t1","drillField":"stage","queryField":"stage"}]', 'published', '', 'manual'), (1006, 'releases', 'release', 'WHERE t1.deleted=''0'' ', '[{"drillObject":"zt_release","drillAlias":"t1","drillField":"product","queryField":"product"}]', 'published', '', 'manual'), (1007, 'taskID', 'task', 'left join zt_project t2 on t1.execution=t2.id left join zt_project as t3 on t3.id=t2.project WHERE t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_task","drillAlias":"t1","drillField":"status","queryField":"status"}]', 'published', '', 'manual'), (1008, 'taskID', 'task', 'left join zt_project t2 on t1.execution=t2.id left join zt_project as t3 on t3.id=t2.project WHERE t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_task","drillAlias":"t1","drillField":"type","queryField":"type"}]', 'published', '', 'manual'), (1009, 'taskID', 'task', 'left join zt_project t2 on t1.execution=t2.id left join zt_project as t3 on t2.project=t3.id WHERE t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_task","drillAlias":"t1","drillField":"assignedTo","queryField":"assignedTo"}]', 'published', '', 'manual'), (1010, 'taskID', 'task', 'left join zt_project t2 on t1.execution=t2.id left join zt_user t3 on t1.finishedBy=t3.account WHERE t1.deleted=''0'' AND t1.finishedBy!=''''', '[{"drillObject":"zt_task","drillAlias":"t1","drillField":"finishedBy","queryField":"finishedBy"},{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"}]', 'published', '', 'manual'), (1011, 'number', 'task', 'left join zt_project as t2 on t1.execution=t2.id left join zt_project as t3 on t2.project=t3.id where t1.deleted=''0'' and t2.deleted=''0'' and t2.type in (''sprint'',''stage'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1011, 'stories', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in(''sprint'', ''stage'') and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1011, 'teams', 'user', 'left join zt_team t2 on t1.account=t2.account left join zt_project t3 on t2.root=t3.id left join zt_project t4 on t3.project=t4.id where t2.type =''execution'' and t3.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1011, 'consumed', 'task', 'left join zt_project as t2 on t1.execution=t2.id left join zt_project as t3 on t2.project=t3.id where t1.deleted=''0'' and t2.deleted=''0'' and t2.type in (''sprint'',''stage'') and t1.parent>=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1012, 'status', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in(''sprint'', ''stage'') and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"},{"drillObject":"zt_story","drillAlias":"t1","drillField":"status","queryField":"status"}]', 'published', '', 'manual'), (1013, 'stage', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in(''sprint'', ''stage'') and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"},{"drillObject":"zt_story","drillAlias":"t1","drillField":"stage","queryField":"stage"}]', 'published', '', 'manual'), (1014, 'resolution', 'bug', 'left join zt_project as t2 on t1.execution=t2.id left join zt_project as t3 on t3.id=t2.project where t1.deleted=''0'' and t2.deleted=''0'' and t1.resolution!=''''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"project"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"resolution","queryField":"resolution"}]', 'published', '', 'manual'), (1015, 'status', 'bug', 'left join zt_project as t2 on t2.id=t1.execution left join zt_project as t3 on t3.id=t1.project WHERE t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"execution"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"project"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"status","queryField":"status"}]', 'published', '', 'manual'), (1016, 'openedBy', 'bug', 'left join zt_project as t2 on t2.id=t1.execution left join zt_project as t3 on t3.id=t2.project where t1.deleted=''0'' and t2.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"openedBy","queryField":"openedBy"}]', 'published', '', 'manual'), (1017, 'resolvedBy', 'bug', 'left join zt_project as t2 on t2.id=t1.execution left join zt_project as t3 on t3.id=t2.project where t1.deleted=''0'' and t2.deleted=''0'' and t1.status!=''active'' and t1.resolvedBy!=''''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"resolvedBy","queryField":"resolvedBy"}]', 'published', '', 'manual'), (1018, 'assignedTo', 'bug', 'left join zt_project as t2 on t1.project=t2.id left join zt_project as t3 on t1.execution=t3.id WHERE t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"project"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"assignedTo","queryField":"assignedTo"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"execution"}]', 'published', '', 'manual'), (1019, 'stories', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in (''sprint'',''stage'') and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'doneStory', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in (''sprint'',''stage'') and t1.deleted=''0'' and t1.status=''closed''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'number', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t2.type in (''sprint'',''stage'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'doneTask', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t1.status in (''closed'',''done'') and t2.type in (''sprint'',''stage'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'bugs', 'bug', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'resolutions', 'bug', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t1.resolution !='' ''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1019, 'seriousBugs', 'bug', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t1.severity<=''2''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1020, 'type', 'bug', 'WHERE t1.deleted=''0''', '[{"drillObject":"zt_bug","drillAlias":"t1","drillField":"product","queryField":"product"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"type","queryField":"type"}]', 'published', '', 'manual'), (1021, 'stories', 'story', 'left join zt_product as t2 on t1.product = t2.id where t1.deleted=''0'' ', '[{"drillObject":"zt_story","drillAlias":"t2","drillField":"name","queryField":"name"}]', 'published', '', 'manual'), (1021, 'doneStory', 'story', 'left join zt_product as t2 on t1.product = t2.id where t1.deleted=''0'' and t1.status=''closed''', '[{"drillObject":"zt_story","drillAlias":"t2","drillField":"name","queryField":"name"}]', 'published', '', 'manual'), (1021, 'bugs', 'bug', 'left join zt_product as t2 on t1.product = t2.id where t1.deleted=''0''', '[{"drillObject":"zt_bug","drillAlias":"t2","drillField":"name","queryField":"name"}]', 'published', '', 'manual'), (1021, 'resolutions', 'bug', 'left join zt_product as t2 on t1.product = t2.id where t1.deleted=''0'' and t1.resolution !='' ''', '[{"drillObject":"zt_bug","drillAlias":"t2","drillField":"name","queryField":"name"}]', 'published', '', 'manual'), (1021, 'seriousBugs', 'bug', 'left join zt_product as t2 on t1.product = t2.id where t1.deleted and t1.severity<=''2''', '[{"drillObject":"zt_bug","drillAlias":"t2","drillField":"name","queryField":"name"}]', 'published', '', 'manual'), (1022, 'day', 'action', 'left join (select date(date) `day`,id from zt_action) t2 on t2.id=t1.id WHERE t1.`action`=''login'' AND if($startDate='''',1,`date`>=$startDate) AND if($endDate='''',1,`date`<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"},{"drillObject":"zt_action","drillAlias":"t1","drillField":"actor","queryField":"actor"}]', 'published', '', 'manual'), (1023, 'consumed', 'effort', 'left join zt_user as t2 on t1.account = t2.account left join zt_dept as t3 on t2.dept = t3.id where t1.`deleted` = ''0'' and (case when $startDate='''' then 1 else cast(t1.`date` as date) >= cast($startDate as date) end) and (case when $endDate='''' then 1 else cast(t1.`date` as date) <= cast($endDate as date) end) and (t3.path like concat((select path from zt_dept where id=$dept), ''%'') or $dept=0) order by t1.`date` asc', '[{"drillObject":"zt_effort","drillAlias":"t1","drillField":"account","queryField":"account"},{"drillObject":"zt_effort","drillAlias":"t1","drillField":"date","queryField":"date"}]', 'published', '', 'manual'), (1024, 'userlogin', 'action', 'left join ztv_dayuserlogin t2 on date(t1.date)=t2.day where ((t1.objectType = ''user'') and (t1.action = ''login'')) and if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillObject":"ztv_dayuserlogin","drillAlias":"t2","drillField":"day","queryField":"day"}]', 'published', '', 'manual'), (1024, 'consumed', 'effort', 'where if($startDate='''',1,t1.date>=$startDate) and if($endDate='''',1,t1.date<=$endDate) ', '[{"drillObject":"zt_effort","drillAlias":"t1","drillField":"date","queryField":"day"}]', 'published', '', 'manual'), (1024, 'storyopen', 'story', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''story'' and action = ''opened'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"}]', 'published', '', 'manual'), (1024, 'storyclose', 'story', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''story'' and action = ''closed'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"}]', 'published', '', 'manual'), (1024, 'taskopen', 'task', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''task'' and action = ''opened'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"}]', 'published', '', 'manual'), (1024, 'taskfinish', 'task', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''task'' and action = ''finished'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"}]', 'published', '', 'manual'), (1024, 'bugopen', 'bug', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''bug'' and action = ''opened'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillAlias":"t2","queryField":"day","drillObject":"","drillField":"day"}]', 'published', '', 'manual'), (1024, 'bugresolve', 'bug', 'right join (select objectID,date(`date`) day from zt_action where objectType = ''bug'' and action = ''resolved'') t2 on t2.objectID=t1.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillObject":"","drillAlias":"t2","drillField":"day","queryField":"day"}]', 'published', '', 'manual'), (1024, 'actions', 'action', 'left join (select id,date(`date`) day from zt_action) t2 on t1.id=t2.id where if($startDate='''',1,t2.day>=$startDate) and if($endDate='''',1,t2.day<=$endDate)', '[{"drillObject":"","drillAlias":"t2","drillField":"day","queryField":"day"}]', 'published', '', 'manual'), (1025, 'resolution', 'bug', 'left join zt_product as t2 on t1.product = t2.id WHERE t1.deleted=''0'' AND t1.resolution!='''' and (case when $startDate='''' then 1 else cast(t1.resolvedDate as date)>=cast($startDate as date) end) and (case when $endDate='''' then 1 else cast(t1.resolvedDate as date)<=cast($endDate as date) end) and (case when $product = '''' then 1 else t1.product=$product end)', '[{"drillObject":"zt_bug","drillAlias":"t1","drillField":"resolvedBy","queryField":"resolvedBy"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"resolution","queryField":"resolution"}]', 'published', '', 'manual'), (1026, 'stories', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in (''sprint'',''stage'') and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1026, 'undoneStory', 'story', 'right join zt_projectstory as t2 on t2.story=t1.id left join zt_project as t3 on t2.project=t3.id left join zt_project as t4 on t4.id=t3.project where t3.deleted=''0'' and t3.type in (''sprint'',''stage'') and t1.status !=''closed'' and t1.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t4","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1026, 'tasks', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t2.type in (''sprint'',''stage'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1026, 'undoneTask', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t2.type in (''sprint'',''stage'') and t1.status not in (''closed'',''done'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1026, 'left', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t2.type in (''sprint'',''stage'') and t1.status not in (''closed'',''done'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1026, 'consumed', 'task', 'left join zt_project as t2 on t1.execution = t2.id left join zt_project as t3 on t3.id=t2.project where t2.deleted=''0'' and t1.deleted=''0'' and t2.type in (''sprint'',''stage'')', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"}]', 'published', '', 'manual'), (1027, 'type', 'bug', 'left join zt_project as t2 on t2.id=t1.execution left join zt_project as t3 on t3.id=t2.project where t1.deleted=''0'' and t2.deleted=''0''', '[{"drillObject":"zt_project","drillAlias":"t2","drillField":"name","queryField":"executionname"},{"drillObject":"zt_project","drillAlias":"t3","drillField":"name","queryField":"projectname"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"type","queryField":"type"}]', 'published', '', 'manual'), (1028, 'resolution', 'bug', ' where t1.deleted=''0'' and t1.resolution != ''''', '[{"drillObject":"zt_bug","drillAlias":"t1","drillField":"resolution","queryField":"resolution"},{"drillObject":"zt_bug","drillAlias":"t1","drillField":"product","queryField":"product"}]', 'published', '', 'manual');
-- -- Structure for view `view_datasource_2` -- DROP TABLE IF EXISTS `view_datasource_2`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_2` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where ((`zt_story`.`deleted` = '0') and (`zt_story`.`type` = 'epic'));
-- -- Structure for view `view_datasource_3` -- DROP TABLE IF EXISTS `view_datasource_3`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_3` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where ((`zt_story`.`deleted` = '0') and (`zt_story`.`type` = 'requirement'));
-- -- Structure for view `view_datasource_4` -- DROP TABLE IF EXISTS `view_datasource_4`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_4` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where ((`zt_story`.`deleted` = '0') and (`zt_story`.`type` = 'story'));
-- -- Structure for view `view_datasource_5` -- DROP TABLE IF EXISTS `view_datasource_5`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_5` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'rnd'));
-- -- Structure for view `view_datasource_6` -- DROP TABLE IF EXISTS `view_datasource_6`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_6` AS select `zt_bug`.`id` AS `id`,`zt_bug`.`title` AS `title` from `zt_bug` where (`zt_bug`.`deleted` = '0');
-- -- Structure for view `view_datasource_10` -- DROP TABLE IF EXISTS `view_datasource_10`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_10` AS select `zt_build`.`id` AS `id`,`zt_build`.`name` AS `name` from `zt_build` where (`zt_build`.`deleted` = '0');
-- -- Structure for view `view_datasource_11` -- DROP TABLE IF EXISTS `view_datasource_11`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_11` AS select `zt_module`.`id` AS `id`,`zt_module`.`name` AS `name` from `zt_module` where (`zt_module`.`deleted` = '0');
-- -- Structure for view `view_datasource_12` -- DROP TABLE IF EXISTS `view_datasource_12`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_12` AS select `zt_productplan`.`id` AS `id`,`zt_productplan`.`title` AS `title` from `zt_productplan` where (`zt_productplan`.`deleted` = '0');
-- -- Structure for view `view_datasource_41` -- DROP TABLE IF EXISTS `view_datasource_41`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_41` AS select `zt_case`.`id` AS `id`,`zt_case`.`title` AS `title` from `zt_case` where (`zt_case`.`deleted` = '0');
-- -- Structure for view `view_datasource_54` -- DROP TABLE IF EXISTS `view_datasource_54`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_54` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'lite'));
-- -- Structure for view `view_datasource_55` -- DROP TABLE IF EXISTS `view_datasource_55`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `view_datasource_55` AS select `zt_feedback`.`id` AS `id`,`zt_feedback`.`title` AS `title` from `zt_feedback` where (`zt_feedback`.`deleted` = '0');
-- -- Structure for view `ztv_dayactions` -- DROP TABLE IF EXISTS `ztv_dayactions`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_dayactions` AS select count(1) AS `actions`,left(`zt_action`.`date`,10) AS `day` from `zt_action` group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_daybugopen` -- DROP TABLE IF EXISTS `ztv_daybugopen`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daybugopen` AS select count(1) AS `bugopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_daybugresolve` -- DROP TABLE IF EXISTS `ztv_daybugresolve`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daybugresolve` AS select count(1) AS `bugresolve`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'resolved')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_dayeffort` -- DROP TABLE IF EXISTS `ztv_dayeffort`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_dayeffort` AS select round(sum(`zt_effort`.`consumed`),1) AS `consumed`,`zt_effort`.`date` AS `date` from `zt_effort` group by `zt_effort`.`date`;
-- -- Structure for view `ztv_daystoryclose` -- DROP TABLE IF EXISTS `ztv_daystoryclose`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daystoryclose` AS select count(1) AS `storyclose`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'closed')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_daystoryopen` -- DROP TABLE IF EXISTS `ztv_daystoryopen`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daystoryopen` AS select count(1) AS `storyopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_daytaskfinish` -- DROP TABLE IF EXISTS `ztv_daytaskfinish`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daytaskfinish` AS select count(1) AS `taskfinish`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'finished')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_daytaskopen` -- DROP TABLE IF EXISTS `ztv_daytaskopen`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_daytaskopen` AS select count(1) AS `taskopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_dayuserlogin` -- DROP TABLE IF EXISTS `ztv_dayuserlogin`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_dayuserlogin` AS select count(1) AS `userlogin`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'user') and (`zt_action`.`action` = 'login')) group by left(`zt_action`.`date`,10);
-- -- Structure for view `ztv_executionsummary` -- DROP TABLE IF EXISTS `ztv_executionsummary`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution`;
-- -- Structure for view `ztv_normalproduct` -- DROP TABLE IF EXISTS `ztv_normalproduct`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_normalproduct` AS select `zt_product`.`id` AS `id`,`zt_product`.`program` AS `program`,`zt_product`.`name` AS `name`,`zt_product`.`code` AS `code`,`zt_product`.`shadow` AS `shadow`,`zt_product`.`bind` AS `bind`,`zt_product`.`line` AS `line`,`zt_product`.`type` AS `type`,`zt_product`.`status` AS `status`,`zt_product`.`subStatus` AS `subStatus`,`zt_product`.`desc` AS `desc`,`zt_product`.`PO` AS `PO`,`zt_product`.`QD` AS `QD`,`zt_product`.`RD` AS `RD`,`zt_product`.`feedback` AS `feedback`,`zt_product`.`ticket` AS `ticket`,`zt_product`.`acl` AS `acl`,`zt_product`.`groups` AS `groups`,`zt_product`.`whitelist` AS `whitelist`,`zt_product`.`reviewer` AS `reviewer`,`zt_product`.`PMT` AS `PMT`,`zt_product`.`draftEpics` AS `draftEpics`,`zt_product`.`activeEpics` AS `activeEpics`,`zt_product`.`changingEpics` AS `changingEpics`,`zt_product`.`reviewingEpics` AS `reviewingEpics`,`zt_product`.`finishedEpics` AS `finishedEpics`,`zt_product`.`closedEpics` AS `closedEpics`,`zt_product`.`totalEpics` AS `totalEpics`,`zt_product`.`draftRequirements` AS `draftRequirements`,`zt_product`.`activeRequirements` AS `activeRequirements`,`zt_product`.`changingRequirements` AS `changingRequirements`,`zt_product`.`reviewingRequirements` AS `reviewingRequirements`,`zt_product`.`finishedRequirements` AS `finishedRequirements`,`zt_product`.`closedRequirements` AS `closedRequirements`,`zt_product`.`totalRequirements` AS `totalRequirements`,`zt_product`.`draftStories` AS `draftStories`,`zt_product`.`activeStories` AS `activeStories`,`zt_product`.`changingStories` AS `changingStories`,`zt_product`.`reviewingStories` AS `reviewingStories`,`zt_product`.`finishedStories` AS `finishedStories`,`zt_product`.`closedStories` AS `closedStories`,`zt_product`.`totalStories` AS `totalStories`,`zt_product`.`unresolvedBugs` AS `unresolvedBugs`,`zt_product`.`closedBugs` AS `closedBugs`,`zt_product`.`fixedBugs` AS `fixedBugs`,`zt_product`.`totalBugs` AS `totalBugs`,`zt_product`.`plans` AS `plans`,`zt_product`.`releases` AS `releases`,`zt_product`.`createdBy` AS `createdBy`,`zt_product`.`createdDate` AS `createdDate`,`zt_product`.`createdVersion` AS `createdVersion`,`zt_product`.`closedDate` AS `closedDate`,`zt_product`.`order` AS `order`,`zt_product`.`vision` AS `vision`,`zt_product`.`deleted` AS `deleted` from `zt_product` where (`zt_product`.`shadow` = 0);
-- -- Structure for view `ztv_productbugs` -- DROP TABLE IF EXISTS `ztv_productbugs`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_productbugs` AS select `zt_bug`.`product` AS `product`,count(1) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`product`;
-- -- Structure for view `ztv_productstories` -- DROP TABLE IF EXISTS `ztv_productstories`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_productstories` AS select `zt_story`.`product` AS `product`,count(1) AS `stories`,sum(if((`zt_story`.`status` = 'closed'),0,1)) AS `undone` from `zt_story` where (`zt_story`.`deleted` = '0') group by `zt_story`.`product`;
-- -- Structure for view `ztv_projectbugs` -- DROP TABLE IF EXISTS `ztv_projectbugs`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_projectbugs` AS select `zt_bug`.`execution` AS `execution`,count(1) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`execution`;
-- -- Structure for view `ztv_projectstories` -- DROP TABLE IF EXISTS `ztv_projectstories`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_projectstories` AS select `t1`.`project` AS `execution`,count(1) AS `stories`,sum(if((`t2`.`status` = 'closed'),0,1)) AS `undone` from ((`zt_projectstory` `t1` left join `zt_story` `t2` on((`t1`.`story` = `t2`.`id`))) left join `zt_project` `t3` on((`t1`.`project` = `t3`.`id`))) where ((`t2`.`deleted` = '0') and (`t3`.`type` in ('sprint','stage'))) group by `t1`.`project`;
-- -- Structure for view `ztv_projectsummary` -- DROP TABLE IF EXISTS `ztv_projectsummary`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project`;
-- -- Structure for view `ztv_projectteams` -- DROP TABLE IF EXISTS `ztv_projectteams`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ztv_projectteams` AS select `zt_team`.`root` AS `execution`,count(1) AS `teams` from `zt_team` where (`zt_team`.`type` = 'execution') group by `zt_team`.`root`;
DELIMITER $$ -- -- Functions -- CREATE FUNCTION `get_monday`(day date) RETURNS date READS SQL DATA begin if date_format(day, '%w') = 0 then return subdate(day, date_format(day, '%w') - 6); else return subdate(day, date_format(day, '%w') -1); end if; END$$
CREATE FUNCTION `get_sunday`(day date) RETURNS date READS SQL DATA begin if date_format(day, '%w') = 0 then return day; else return subdate(day, date_format(day, '%w') - 7); end if; END$$
CREATE FUNCTION `qc_cminited`($project int, $category varchar(30)) RETURNS int(11) READS SQL DATA begin declare products int default 0; declare objects int default 0; select COUNT(1) from zt_projectproduct where project = $project into products; select COUNT(DISTINCT product) from zt_object where project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) into objects; IF products = objects THEN return 1; ELSEIF products != objects THEN return 0; END IF; END$$
CREATE FUNCTION `qc_getdesignfirstesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(designEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getdesignlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(designEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getdevelfirstesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(devEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getdevlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(devEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getfirstesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(taskEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(taskEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getrequestlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_getstoryfirstesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_gettestfirstesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(testEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_gettestlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN SELECT sum(testEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate;
return @estimate; END$$
CREATE FUNCTION `qc_initscale`($project int, $category varchar(30), $estimateType varchar(30)) RETURNS float(10,2) READS SQL DATA BEGIN declare $estimate int default 0; declare $storyEst varchar(30) default 'storyEst'; declare $requestEst varchar(30) default 'requestEst'; if($estimateType = $storyEst) THEN SELECT sum(storyEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate; end if; if($estimateType = $requestEst) THEN SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate; end if; RETURN @estimate; END$$
CREATE FUNCTION `qc_pgmallrequirementstage`($project int) RETURNS int(1) READS SQL DATA BEGIN -- 获取项目产品总数 select COUNT(1) AS products from zt_projectproduct where project = $project into @totalproduct; -- 获取已经设置需求阶段的产品总数 select COUNT(1) AS product from (select product from zt_projectproduct where project in (select id from zt_project where project = $project and type = 'stage' and attribute = 'request' and deleted = '0') GROUP BY product) as product into @product; -- 让项目产品总数和已设置需求阶段产品总数比较,都设置返回1,否则返回0 if @totalproduct = @product then return 1; end if; RETURN 0; END$$
CREATE FUNCTION `qc_pgmdesgignrealesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmesthoursbytype($project, 'design'); END$$
CREATE FUNCTION `qc_pgmdesignrealhours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmrealhoursbytype($project, 'design'); END$$
CREATE FUNCTION `qc_pgmdesigntplandays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeplanneddays($project,'design') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmdesigntrealdays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeactualdays($project,'design') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmdevelplandays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeplanneddays($project,'dev') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmdevelrealdays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeactualdays($project,'dev') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmdevelrealesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmesthoursbytype($project, 'devel'); END$$
CREATE FUNCTION `qc_pgmdevelrealhours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmrealhoursbytype($project, 'devel'); END$$
CREATE FUNCTION `qc_pgmesthoursbytype`($project int, $type char(30)) RETURNS float(10,2) READS SQL DATA BEGIN select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_task where project=$project and type = $type and parent >= 0 and status != 'cancel' and deleted = '0' into @estimate; return @estimate; END$$
CREATE FUNCTION `qc_pgmlastesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN declare estimate float(10,2) default 0; declare inited int default 0; select qc_cminited($project,'PP') into inited; IF inited = 1 THEN select qc_getlastesthours($project) into estimate; return estimate; ELSE return 0; END IF; END$$
CREATE FUNCTION `qc_pgmplanscale`($project int) RETURNS float(10,2) READS SQL DATA BEGIN declare programScale float (10,2) default 0; select `scale` from zt_workestimation where project = $project into @programScale; return @programScale; END$$
CREATE FUNCTION `qc_pgmrealesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_task where project=$project and parent >= 0 and status != 'cancel' and deleted = '0' into @estimate; return @estimate; END$$
CREATE FUNCTION `qc_pgmrealhours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN select CAST(sum(consumed) as DECIMAL(10,2)) as consumed from zt_task where project=$project and parent >= 0 and status != 'cancel' and deleted = '0' into @consumed; return @consumed; END$$
CREATE FUNCTION `qc_pgmrealhoursbytype`($project int, $type char(30)) RETURNS float(10,2) READS SQL DATA BEGIN select CAST(sum(consumed) as DECIMAL(10,2)) as consumed from zt_task where project=$project and type = $type and parent >= 0 and status != 'cancel' and deleted = '0' into @consumed; return @consumed; END$$
CREATE FUNCTION `qc_pgmrequestplandays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeplanneddays($project,'request') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmrequestrealdays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeactualdays($project,'request') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmrequestrealesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmesthoursbytype($project, 'request'); END$$
CREATE FUNCTION `qc_pgmrequestrealhours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmrealhoursbytype($project, 'request'); END$$
CREATE FUNCTION `qc_pgmspecifiedtypeactualdays`($project int,$attribute varchar(50)) RETURNS int(11) READS SQL DATA BEGIN -- 查询某类型的阶段总数 select COUNT(1) from zt_project where project = $project and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @totalstory; -- 查询某类型已设置实际工期的阶段总数 select COUNT(1) from zt_project where project = $project and attribute = $attribute and deleted = '0' and realDuration > 0 and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @setstory; -- 查询项目下某类型阶段实际工期总数 select sum(realDuration) as realDuration from zt_project where project = $project and attribute = $attribute and deleted = '0' and realDuration > 0 and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @days; -- 判断项目下某类型的阶段是否都已设置实际工期 if @totalstory != @setstory then set @days = 0; end if; return @days; END$$
CREATE FUNCTION `qc_pgmspecifiedtypeplanneddays`($project int,$attribute varchar(50)) RETURNS int(11) READS SQL DATA BEGIN select sum(planDuration) as planDuration from zt_project where project = $project and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @days; return @days; END$$
CREATE FUNCTION `qc_pgmsrinitscale`($project int) RETURNS float(10,2) READS SQL DATA begin declare scale int default 0; declare inited int default 0; select qc_cminited($project, 'SRS') into inited; IF inited = 1 THEN select qc_initscale($project, 'SRS', 'storyEst') into scale ; return scale ; ELSE return 0; END IF; END$$
CREATE FUNCTION `qc_pgmsrrealscale`($project int) RETURNS float(10,2) READS SQL DATA BEGIN declare totalEstimate float(10,2) default 0; select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_story where id in (select story from zt_projectstory where project=$project) and type='story' and deleted='0' and closedReason not in ('subdivided', 'duplicate', 'willnotdo', 'cancel', 'bydesign') into totalEstimate; return totalEstimate; END$$
CREATE FUNCTION `qc_pgmstageactualduration`($product int, $attribute varchar(50)) RETURNS int(11) READS SQL DATA BEGIN -- 查找某类型的阶段总数 select COUNT(1) AS totalduration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) into @totalduration; -- 查某类型阶段已设置实际工期的总数 select COUNT(1) AS setduration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and realDuration > 0 into @setduration; -- 指定产品下某类型的阶段实际工期总和 select sum(realDuration) as duration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and realDuration > 0 into @duration; -- 需要判断该类型阶段都已设置实际工期,否则不统计 if @totalduration != @setduration then set @duration = 0; end if; return @duration; END$$
CREATE FUNCTION `qc_pgmstageplannedduration`($product int, $attribute varchar(50)) RETURNS int(11) READS SQL DATA BEGIN -- 查找某产品对应阶段 select sum(planDuration) as duration from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and planDuration > 0 into @duration; RETURN @duration; END$$
CREATE FUNCTION `qc_pgmtestplandays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeplanneddays($project,'qa') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmtestrealdays`($project int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmspecifiedtypeactualdays($project,'qa') as days into @days; return @days; END$$
CREATE FUNCTION `qc_pgmtestrealesthours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmesthoursbytype($project, 'test'); END$$
CREATE FUNCTION `qc_pgmtestrealhours`($project int) RETURNS float(10,2) READS SQL DATA BEGIN return qc_pgmrealhoursbytype($project, 'test'); END$$
CREATE FUNCTION `qc_pgmurinitscale`($project int) RETURNS float(10,2) READS SQL DATA begin declare scale int default 0; declare inited int default 0; select qc_cminited($project, 'URS') into inited; IF inited = 1 THEN select qc_initscale($project, 'URS', 'requestEst') into scale; return scale; ELSE return 0; END IF; END$$
CREATE FUNCTION `qc_pgmurrealscale`($project int) RETURNS float(10,2) READS SQL DATA BEGIN declare totalEstimate float(10,2) default 0; select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_story where project=$project and type='requirement' and deleted='0' and closedReason not in ('subdivided', 'duplicate', 'willnotdo', 'cancel', 'bydesign') into totalEstimate; return totalEstimate; END$$
CREATE FUNCTION `qc_prddesigntplandays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageplannedduration($project, $product, 'design') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prddesigntrealdays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageactualduration($project, $product, 'design') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prddevelplandays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageplannedduration($project, $product, 'dev') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prddevelrealdays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageactualduration($project, $product, 'dev') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prdrequestplandays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageplannedduration($project, $product, 'request') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prdrequestrealdays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageactualduration($project, $product, 'request') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prdtestplandays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageplannedduration($project, $product, 'qa') as days into @days; return @days; END$$
CREATE FUNCTION `qc_prdtestrealdays`($project int, $product int) RETURNS int(11) READS SQL DATA BEGIN select qc_pgmstageactualduration($project, $product, 'qa') as days into @days; return @days; END$$