* Move weekly to max.

This commit is contained in:
Yagami
2021-02-25 09:35:52 +08:00
parent 6bd9b8a6bd
commit ca9e3f907e
21 changed files with 6 additions and 1248 deletions
-1
View File
@@ -194,7 +194,6 @@ if(!defined('TABLE_PROJECTSPEC')) define('TABLE_PROJECTSPEC', '`' . $conf
if(!defined('TABLE_WORKESTIMATION')) define('TABLE_WORKESTIMATION', '`' . $config->db->prefix . 'workestimation`');
if(!defined('TABLE_DURATIONESTIMATION')) define('TABLE_DURATIONESTIMATION', '`' . $config->db->prefix . 'durationestimation`');
if(!defined('TABLE_BUDGET')) define('TABLE_BUDGET', '`' . $config->db->prefix . 'budget`');
if(!defined('TABLE_WEEKLYREPORT')) define('TABLE_WEEKLYREPORT', '`' . $config->db->prefix . 'weeklyreport`');
if(!defined('TABLE_SEARCHINDEX')) define('TABLE_SEARCHINDEX', $config->db->prefix . 'searchindex');
if(!defined('TABLE_SEARCHDICT')) define('TABLE_SEARCHDICT', $config->db->prefix . 'searchdict');
-16
View File
@@ -277,22 +277,6 @@ CREATE TABLE IF NOT EXISTS `zt_taskspec` (
UNIQUE KEY `task` (`task`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`PRJ` mediumint(8) unsigned NOT NULL,
`weekStart` date NOT NULL,
`pv` float(9,2) NOT NULL,
`ev` float(9,2) NOT NULL,
`ac` float(9,2) NOT NULL,
`sv` float(9,2) NOT NULL,
`cv` float(9,2) NOT NULL,
`staff` smallint(5) unsigned NOT NULL,
`progress` varchar(255) NOT NULL,
`workload` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `week` (`PRJ`,`weekStart`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`;
ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`;
-16
View File
@@ -1363,22 +1363,6 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` (
`deleted` enum('0', '1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_weeklyreport`;
CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`PRJ` mediumint(8) unsigned NOT NULL,
`weekStart` date NOT NULL,
`pv` float(9,2) NOT NULL,
`ev` float(9,2) NOT NULL,
`ac` float(9,2) NOT NULL,
`sv` float(9,2) NOT NULL,
`cv` float(9,2) NOT NULL,
`staff` smallint(5) unsigned NOT NULL,
`progress` varchar(255) NOT NULL,
`workload` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `week` (`PRJ`,`weekStart`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_workestimation`;
CREATE TABLE `zt_workestimation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
+4 -4
View File
@@ -856,7 +856,7 @@ class block extends control
}
$today = helper::today();
$monday = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
if(isset($this->config->maxVersion)) $monday = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
$tasks = $this->dao->select("PRJ,
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
@@ -874,7 +874,7 @@ class block extends control
$project->progress = $project->allStories == 0 ? 0 : round($project->doneStories / $project->allStories, 3) * 100;
$project->executions = $this->project->getExecutionStats($projectID, 'all', 0, 0, 30, 'id_asc');
}
elseif($project->model == 'waterfall')
elseif($project->model == 'waterfall' and isset($this->config->maxVersion))
{
$begin = $project->begin;
$weeks = $this->weekly->getWeekPairs($begin);
@@ -1672,8 +1672,8 @@ class block extends control
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view')) $hasViewPriv['issue'] = true;
if(common::hasPriv('risk', 'view') and isset($this->config->maxVersion)) $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and isset($this->config->maxVersion)) $hasViewPriv['issue'] = true;
if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true;
$params = $this->get->param;
+2
View File
@@ -30,6 +30,7 @@
<div class="tile-title"><?php echo $lang->block->createdCases;?></div>
<div class="tile-amount"><?php echo empty($data['createdCases']) ? 0 : (int)$data['createdCases'];?></div>
</div>
<?php if(isset($config->maxVersion)):?>
<div class="col-xs-4 tile">
<div class="tile-title"><?php echo $lang->block->createdRisks;?></div>
<div class="tile-amount"><?php echo empty($data['createdRisks']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=risk'), (int)$data['createdRisks']);?></div>
@@ -46,6 +47,7 @@
<div class="tile-title"><?php echo $lang->block->resolvedIssues;?></div>
<div class="tile-amount"><?php echo $data['resolvedIssues'];?></div>
</div>
<?php endif;?>
<div class="col-xs-4 tile">
<div class="tile-title"><?php echo $lang->block->createdDocs;?></div>
<div class="tile-amount"><?php echo $data['createdDocs'];?></div>
-39
View File
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->subMenu = new stdclass();
$lang->scrum->subMenu->other = new stdclass();
$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = 'Code|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
-39
View File
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->subMenu = new stdclass();
$lang->scrum->subMenu->other = new stdclass();
$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = 'Code|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
-39
View File
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->subMenu = new stdclass();
$lang->scrum->subMenu->other = new stdclass();
$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = 'Code|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
-1
View File
@@ -22,7 +22,6 @@ $lang->waterfall->menuOrder[40] = 'qa';
$lang->waterfall->menuOrder[45] = 'doc';
$lang->waterfall->menuOrder[50] = 'projectbuild';
$lang->waterfall->menuOrder[55] = 'projectrelease';
$lang->waterfall->menuOrder[60] = 'weekly';
$lang->waterfall->menuOrder[65] = 'other';
$lang->waterfall->menuOrder[70] = 'projectsetting';
-39
View File
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->subMenu = new stdclass();
$lang->scrum->subMenu->other = new stdclass();
$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = 'Code|repo|browse|';
$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = 'Index|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
-39
View File
@@ -678,7 +678,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -933,16 +932,8 @@ $lang->menu->scrum->qa = '测试|qa|index';
$lang->menu->scrum->ci = '代码|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse');
$lang->menu->scrum->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => '设置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->scrum = new stdclass();
$lang->scrum->subMenu = new stdclass();
$lang->scrum->subMenu->other = new stdclass();
$lang->scrum->subMenu->other->issue = array('link' => '问题|issue|browse|', 'subModule' => 'issue');
$lang->scrum->subMenu->other->risk = array('link' => '风险|risk|browse|', 'subModule' => 'risk');
$lang->scrum->subMenu->other->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => '概况|program|prjview|project={PROJECT}', 'alias' => 'prjedit');
$lang->scrum->setMenu->products = array('link' => '产品|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -950,40 +941,11 @@ $lang->scrum->setMenu->group = array('link' => '权限|program|PRJGroup
$lang->scrum->setMenu->members = array('link' => '团队|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => '白名单|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|project={PROJECT}');
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track');
$lang->menu->waterfall->qa = '测试|qa|index';
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
$lang->menu->waterfall->projectsetting = array('link' => '设置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->other = new stdclass();
$lang->waterfall->subMenu->other->estimation = array('link' => '估算|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
$lang->waterfall->subMenu->other->issue = array('link' => '问题|issue|browse|', 'subModule' => 'issue');
$lang->waterfall->subMenu->other->risk = array('link' => '风险|risk|browse|', 'subModule' => 'risk');
$lang->waterfall->subMenu->other->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
$lang->waterfall->setMenu = new stdclass();
$lang->waterfall->setMenu = $lang->scrum->setMenu;
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1000,7 +962,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
-4
View File
@@ -1156,10 +1156,6 @@ $lang->resource->subject->browse = 'browse';
$lang->subject->methodOrder[5] = 'browse';
/* Weekly. */
$lang->resource->weekly = new stdclass();
$lang->resource->weekly->index = 'index';
/* Custom. */
$lang->resource->custom = new stdclass();
$lang->resource->custom->index = 'index';
-80
View File
@@ -1,80 +0,0 @@
<?php
/**
* The control file of weekly of ChanzhiEPS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv11.html)
* @author Xiying Guan <guanxiying@xirangit.com>
* @package weekly
* @version $Id$
* @link http://www.zentao.net
*/
class weekly extends control
{
/**
* The construct function, load users.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->view->users = $this->loadModel('user')->getPairs('noletter');
}
/**
* Index
*
* @param int $program
* @param string $date
* @access public
* @return void
*/
public function index($program = 0, $date = '')
{
$program = $program ? $program : $this->session->PRJ;
if(!$date) $date = helper::today();
$date = date('Y-m-d', strtotime($date));
$this->view->title = $this->lang->weekly->common;
$this->view->pv = $this->weekly->getPV($program, $date);
$this->view->ev = $this->weekly->getEV($program, $date);
$this->view->ac = $this->weekly->getAC($program, $date);
$this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
$this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
$this->view->program = $this->loadModel('program')->getPRJByID($program);
$this->view->weekSN = $this->weekly->getWeekSN($this->view->program->begin, $date);
$this->view->monday = $this->weekly->getThisMonday($date);
$this->view->lastDay = $this->weekly->getLastDay($date);
$this->view->staff = $this->weekly->getStaff($program);
$this->view->finished = $this->weekly->getFinished($program);
$this->view->postponed = $this->weekly->getPostponed($program);
$this->view->nextWeek = $this->weekly->getTasksOfNextWeek($program, $date);
$this->view->workload = $this->weekly->getWorkloadByType($program, $date);
$this->weekly->save($program, $date);
$this->lang->modulePageNav = $this->weekly->getPageNav($this->view->program, $date);
$this->display();
}
/**
* ComputeWeekly
*
* @access public
* @return void
*/
public function computeWeekly()
{
$programs = $this->dao->select('id, name')->from(TABLE_PROJECT)
->where('deleted')->eq(0)
->andWhere('type')->eq('project')
->fetchPairs();
$date = helper::today();
foreach($programs as $programID => $program) $this->weekly->save($programID, $date);
}
}
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = 'Project Weekly';
$lang->weekly->index = 'Weekly Overview';
$lang->weekly->progress = 'Progress';
$lang->weekly->workload = 'Workload';
$lang->weekly->total = 'Total';
$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
$lang->weekly->summary = 'Project Progress';
$lang->weekly->finished = 'Work finished this week (100% completed work)';
$lang->weekly->postponed = 'Work unfinished this week';
$lang->weekly->nextWeek = 'Work planned for next week';
$lang->weekly->workloadByType = 'Workload Summary';
$lang->weekly->term = 'Reporting Cycle';
$lang->weekly->program = 'Project Name';
$lang->weekly->master = 'Project Manager ';
$lang->weekly->staff = 'The number of men in this week';
$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
$lang->weekly->progress = 'Progress of the project';
$lang->weekly->analysisResult = 'Analysis';
$lang->weekly->cost = 'Project Cost';
$lang->weekly->pv = 'Planned Value(PV)';
$lang->weekly->ev = 'Earned Value(EV)';
$lang->weekly->ac = 'Actual Cost(AC)';
$lang->weekly->sv = 'Schedule Variance(SV%)';
$lang->weekly->cv = 'Cost Variance(CV%)';
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = 'Project Weekly';
$lang->weekly->index = 'Weekly Overview';
$lang->weekly->progress = 'Progress';
$lang->weekly->workload = 'Workload';
$lang->weekly->total = 'Total';
$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
$lang->weekly->summary = 'Project Progress';
$lang->weekly->finished = 'Work finished this week (100% completed work)';
$lang->weekly->postponed = 'Work unfinished this week';
$lang->weekly->nextWeek = 'Work planned for next week';
$lang->weekly->workloadByType = 'Workload Summary';
$lang->weekly->term = 'Reporting Cycle';
$lang->weekly->program = 'Project Name';
$lang->weekly->master = 'Project Manager ';
$lang->weekly->staff = 'The number of men in this week';
$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
$lang->weekly->progress = 'Progress of the project';
$lang->weekly->analysisResult = 'Analysis';
$lang->weekly->cost = 'Project Cost';
$lang->weekly->pv = 'Planned Value(PV)';
$lang->weekly->ev = 'Earned Value(EV)';
$lang->weekly->ac = 'Actual Cost(AC)';
$lang->weekly->sv = 'Schedule Variance(SV%)';
$lang->weekly->cv = 'Cost Variance(CV%)';
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = 'Project Weekly';
$lang->weekly->index = 'Weekly Overview';
$lang->weekly->progress = 'Progress';
$lang->weekly->workload = 'Workload';
$lang->weekly->total = 'Total';
$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
$lang->weekly->summary = 'Project Progress';
$lang->weekly->finished = 'Work finished this week (100% completed work)';
$lang->weekly->postponed = 'Work unfinished this week';
$lang->weekly->nextWeek = 'Work planned for next week';
$lang->weekly->workloadByType = 'Workload Summary';
$lang->weekly->term = 'Reporting Cycle';
$lang->weekly->program = 'Project Name';
$lang->weekly->master = 'Project Manager ';
$lang->weekly->staff = 'The number of men in this week';
$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
$lang->weekly->progress = 'Progress of the project';
$lang->weekly->analysisResult = 'Analysis';
$lang->weekly->cost = 'Project Cost';
$lang->weekly->pv = 'Planned Value(PV)';
$lang->weekly->ev = 'Earned Value(EV)';
$lang->weekly->ac = 'Actual Cost(AC)';
$lang->weekly->sv = 'Schedule Variance(SV%)';
$lang->weekly->cv = 'Cost Variance(CV%)';
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = 'Project Weekly';
$lang->weekly->index = 'Weekly Overview';
$lang->weekly->progress = 'Progress';
$lang->weekly->workload = 'Workload';
$lang->weekly->total = 'Total';
$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
$lang->weekly->summary = 'Project Progress';
$lang->weekly->finished = 'Work finished this week (100% completed work)';
$lang->weekly->postponed = 'Work unfinished this week';
$lang->weekly->nextWeek = 'Work planned for next week';
$lang->weekly->workloadByType = 'Workload Summary';
$lang->weekly->term = 'Reporting Cycle';
$lang->weekly->program = 'Project Name';
$lang->weekly->master = 'Project Manager ';
$lang->weekly->staff = 'The number of men in this week';
$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
$lang->weekly->progress = 'Progress of the project';
$lang->weekly->analysisResult = 'Analysis';
$lang->weekly->cost = 'Project Cost';
$lang->weekly->pv = 'Planned Value(PV)';
$lang->weekly->ev = 'Earned Value(EV)';
$lang->weekly->ac = 'Actual Cost(AC)';
$lang->weekly->sv = 'Schedule Variance(SV%)';
$lang->weekly->cv = 'Cost Variance(CV%)';
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = '项目周报';
$lang->weekly->index = '周报总览';
$lang->weekly->progress = '完成百分比';
$lang->weekly->workload = '工作量';
$lang->weekly->total = '合计';
$lang->weekly->reportTtitle = '项目: %s 周报(第 %s 周)';
$lang->weekly->summary = '项目进展状况';
$lang->weekly->finished = '本周工作完成情况(100%完成的工作)';
$lang->weekly->postponed = '本周未完成工作';
$lang->weekly->nextWeek = '下周工作计划';
$lang->weekly->workloadByType = '工作量统计';
$lang->weekly->term = '报告周期';
$lang->weekly->program = '项目名称';
$lang->weekly->master = '项目经理 ';
$lang->weekly->staff = '本周投入人数';
$lang->weekly->weekDesc = '第 %s 周( %s ~ %s)';
$lang->weekly->progress = '项目当前进展状况';
$lang->weekly->analysisResult = '分析结果';
$lang->weekly->cost = '项目成本';
$lang->weekly->pv = '计划完成的工作(PV)';
$lang->weekly->ev = '实际完成的工作(EV)';
$lang->weekly->ac = '实际花费的成本(AC)';
$lang->weekly->sv = '进度偏差率(SV%)';
$lang->weekly->cv = '成本偏差率(CV%)';
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The weekly module lang file of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package weekly
* @version $Id
* @link http://www.zentao.net
*/
$lang->weekly->common = '項目周報';
$lang->weekly->index = '周報總覽';
$lang->weekly->progress = '完成百分比';
$lang->weekly->workload = '工作量';
$lang->weekly->total = '合計';
$lang->weekly->reportTtitle = '項目: %s 周報(第 %s 周)';
$lang->weekly->summary = '項目進展狀況';
$lang->weekly->finished = '本週工作完成情況(100%完成的工作)';
$lang->weekly->postponed = '本週未完成工作';
$lang->weekly->nextWeek = '下周工作計劃';
$lang->weekly->workloadByType = '工作量統計';
$lang->weekly->term = '報告周期';
$lang->weekly->program = '項目名稱';
$lang->weekly->master = '項目經理 ';
$lang->weekly->staff = '本週投入人數';
$lang->weekly->weekDesc = '第 %s 周( %s ~ %s)';
$lang->weekly->progress = '項目當前進展狀況';
$lang->weekly->analysisResult = '分析結果';
$lang->weekly->cost = '項目成本';
$lang->weekly->pv = '計劃完成的工作(PV)';
$lang->weekly->ev = '實際完成的工作(EV)';
$lang->weekly->ac = '實際花費的成本(AC)';
$lang->weekly->sv = '進度偏差率(SV%)';
$lang->weekly->cv = '成本偏差率(CV%)';
-511
View File
@@ -1,511 +0,0 @@
<?php
/**
* The model file of weekly module of ChanzhiEPS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv11.html)
* @author Xiying Guan <guanxiying@xirangit.com>
* @package weekly
* @version $Id$
* @link http://www.zentao.net
*/
class weeklyModel extends model
{
/**
* GetPageNav
*
* @param int $program
* @param int $date
* @access public
* @return string
*/
public function getPageNav($program, $date)
{
$date = date('Ymd', strtotime($this->getThisMonday($date)));
$begin = $program->begin;
$weeks = $this->getWeekPairs($begin);
$current = zget($weeks, $date, '');
$selectHtml = "<div class='btn-group angle-btn'>";
$selectHtml .= html::a('###', $this->lang->weekly->common . $this->lang->colon . $program->name, '', "class='btn'");
$selectHtml .= '</div>';
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<div class='btn-group'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn' title=$current>" . $current . " <span class='caret'></span></a>";
$selectHtml .= "<ul class='dropdown-menu'>";
foreach($weeks as $day => $title)
{
$selectHtml .= '<li>' . html::a(helper::createLink('weekly', 'index', "program={$program->id}&date=$day"), $title) . '</li>';
}
$selectHtml .='</ul></div></div>';
return $selectHtml;
}
/**
* GetWeekPairs
*
* @param int $begin
* @access public
* @return array
*/
public function getWeekPairs($begin)
{
$sn = $this->getWeekSN($begin, date('Y-m-d'));
$weeks = array();
for($i = 0; $i <= $sn; $i++)
{
$monday = $this->getThisMonday($begin);
$sunday = $this->getThisSunday($begin);
$begin = date('Y-m-d', strtotime("$begin +7 days"));
$key = date('Ymd', strtotime($monday));
$weeks[$key] = sprintf($this->lang->weekly->weekDesc, $i + 1, $monday, $sunday);
}
krsort($weeks);
return $weeks;
}
/**
* GetFromDB
*
* @param int $program
* @param int $date
* @access public
* @return object
*/
public function getFromDB($program, $date)
{
$monday = $this->getThisMonday($date);
return $this->dao->select('*')
->from(TABLE_WEEKLYREPORT)
->where('weekStart')->eq($monday)
->andWhere('PRJ')->eq($program)
->fetch();
}
/**
* Save data.
*
* @param int $project
* @param int $date
* @access public
* @return void
*/
public function save($project, $date)
{
$report = new stdclass;
$report->pv = $this->getPV($project, $date);
$report->ev = $this->getEV($project, $date);
$report->ac = $this->getAC($project, $date);
$report->sv = $this->getSV($report->ev, $report->pv);
$report->cv = $this->getCV($report->ev, $report->ac);
$report->PRJ = $project;
$report->weekStart = $this->getThisMonday($date);
$report->staff = $this->getStaff($project);
$report->workload = json_encode($this->getWorkloadByType($project, $date));
$this->dao->replace(TABLE_WEEKLYREPORT)->data($report)->exec();
}
/**
* GetWeekSN
*
* @param int $begin
* @param int $date
* @access public
* @return int
*/
public function getWeekSN($begin, $date)
{
return ceil((strtotime($date) - strtotime($begin)) / 7 / 86400);
}
/**
* Get monday for a date.
*
* @param int $date
* @access public
* @return date
*/
public function getThisMonday($date)
{
$day = date('w', strtotime($date));
if($day == 0) $day = 7;
$days = $day - 1;
return date('Y-m-d', strtotime("$date - $days days"));
}
/**
* GetThisSunday
*
* @param int $date
* @access public
* @return date
*/
public function getThisSunday($date)
{
$monday = $this->getThisMonday($date);
return date('Y-m-d', strtotime("$monday +6 days"));
}
/**
* GetLastDay
*
* @param int $date
* @access public
* @return string
*/
public function getLastDay($date)
{
$this->loadModel('project');
$weekend = zget($this->config->project, 'weekend', 2);
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$workdays = $this->loadModel('holiday')->getActualWorkingDays($monday, $sunday);
return end($workdays);
}
/**
* GetStaff
*
* @param int $program
* @param string $date
* @access public
* @return array
*/
public function getStaff($program, $date = '')
{
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
$projectIdList = array_keys($projects);
return $this->dao->select('count(distinct t1.account) as count')
->from(TABLE_TASKESTIMATE)->alias('t1')
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
->where('t2.project')->in($projectIdList)
->andWhere('t1.date')->ge($monday)
->andWhere('t1.date')->lt($sunday)
->fetch('count');
}
/**
* GetFinished
*
* @param int $program
* @param string $date
* @param int $pager
* @access public
* @return void
*/
public function getFinished($program, $date = '', $pager = null)
{
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
$projectIdList = array_keys($projects);
$tasks = $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere("(status='done' or closedReason= 'done')")
->andWhere('finishedDate')->ge($monday)
->andWhere('finishedDate')->le($sunday)
->fetchAll();
return $this->loadModel('task')->processTasks($tasks);
}
/**
* GetPostponed
*
* @param int $program
* @param string $date
* @access public
* @return void
*/
public function getPostponed($program, $date = '')
{
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
$projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
$projectIdList = array_keys($projects);
$unFinished = $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere('status')->in('wait,doing,pause')
->andWhere('deadline')->ge($monday)
->andWhere('deadline')->le($sunday)
->fetchAll('id');
$postponed = $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere('finishedDate')->gt($nextMonday)
->andWhere('deadline')->ge($monday)
->andWhere('deadline')->lt($nextMonday)
->fetchAll('id');
$tasks = array_merge($unFinished, $postponed);
return $this->loadModel('task')->processTasks($tasks);
}
/**
* GetTasksOfNextWeek
*
* @param int $program
* @param string $date
* @access public
* @return void
*/
public function getTasksOfNextWeek($program, $date = '')
{
if(!$date) $date = date('Y-m-d');
$sunday = $this->getThisSunday($date);
$nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
$sencondMondy = date('Y-m-d', strtotime("$sunday +8 days"));
$projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
$projectIdList = array_keys($projects);
$tasks = $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere("((deadline > '$nextMonday' and deadline < '$sencondMondy') or (estStarted > '$nextMonday' and estStarted < '$sencondMondy'))")
->fetchAll('id');
return $this->loadModel('task')->processTasks($tasks);
}
/**
* GetWorkloadByType
*
* @param int $program
* @param string $date
* @access public
* @return object
*/
public function getWorkloadByType($program, $date = '')
{
if(!$date) $date = date('Y-m-d');
$sunday = $this->getThisSunday($date);
$nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
$sencondMondy = date('Y-m-d', strtotime("$sunday +8 days"));
$projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
$projectIdList = array_keys($projects);
return $this->dao->select('type, sum(cast(estimate as decimal(10,2))) as workload')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->groupBy('type')
->fetchPairs();
}
/**
* GetPlanedTaskByWeek
*
* @param int $program
* @param string $date
* @access public
* @return array
*/
public function getPlanedTaskByWeek($program, $date = '')
{
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$nextMonday = date('Y-m-d', strtotime("$monday +7 days"));
$projects = $this->loadModel('project')->getList($status = 'all', $limit = 0, $productID = 0, $branch = 0, $program);
$projectIdList = array_keys($projects);
return $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere('deadline')->ge($monday)
->fetchAll('id');
}
/**
* GetPV
*
* @param int $program
* @param string $date
* @access public
* @return int
*/
public function getPV($projectID, $date = '')
{
$report = $this->getFromDB($projectID, $date);
if(!empty($report)) return $report->pv;
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$lastDay = $this->getLastDay($date);
$nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
$workdays = $this->loadModel('holiday')->getActualWorkingDays($monday, $sunday);
$executions = $this->loadModel('project')->getExecutionList($projectID);
$executionIdList = array_keys($executions);
$tasks = $this->dao->select('*')->from(TABLE_TASK)
->where('project')->in($executionIdList)
->andWhere("(estStarted < '$nextMonday' or estStarted='0000-00-00')")
->fetchAll('id');
$PV = 0;
foreach($tasks as $task)
{
if($task->estStarted == '0000-00-00') $task->estStarted = date('Y-m-d', strtotime($task->openedDate));
if($task->deadline < $nextMonday)
{
$PV += $task->estimate;
continue;
}
$fullDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $task->deadline);
$passedDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $sunday);
if(empty($fullDays) or empty($passedDays) or empty($task->estimate)) continue;
$PV += count($passedDays) * $task->estimate / count($fullDays);
}
return round($PV, 2);
}
/**
* Get EV data.
*
* @param int $projectID
* @param string $date
* @access public
* @return int
*/
public function getEV($projectID, $date = '')
{
$report = $this->getFromDB($projectID, $date);
if(!empty($report)) return $report->ev;
$executions = $this->loadModel('project')->getExecutionList($projectID);
$executionIdList = array_keys($executions);
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$sunday = $this->getThisSunday($date);
$lastDay = $this->getLastDay($date);
$nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
$tasks = $this->dao->select('*')
->from(TABLE_TASK)
->where('project')->in($executionIdList)
->andWhere('consumed')->gt(0)
->andWhere('status')->ne('cancel')
->fetchAll('id');
$EV = 0;
foreach($tasks as $task)
{
if($task->status == 'done' or $task->closedReason == 'done')
{
$EV += $task->estimate;
}
else
{
$task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
$EV += $task->estimate * $task->progress / 100;
}
}
return round($EV, 2);
}
/**
* Get AC data.
*
* @param int $projectID
* @param string $date
* @access public
* @return int
*/
public function getAC($projectID, $date = '')
{
$report = $this->getFromDB($projectID, $date);
if(!empty($report)) return $report->ac;
if(!$date) $date = date('Y-m-d');
$monday = $this->getThisMonday($date);
$nextMonday = date('Y-m-d', strtotime("$monday +7 days"));
$executions = $this->loadModel('project')->getExecutionList($projectID);
$executionIdList = array_keys($executions);
$AC = $this->dao->select('sum(t1.consumed) as consumed')
->from(TABLE_TASKESTIMATE)->alias('t1')
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
->where('t2.project')->in($executionIdList)
->andWhere('t1.date')->ge($monday)
->andWhere('t1.date')->lt($nextMonday)
->fetch('consumed');
return round($AC, 2);
}
/**
* Get SV data.
*
* @param int $ev
* @param int $pv
* @access public
* @return int
*/
public function getSV($ev, $pv)
{
if($pv == 0) return 0;
$sv = -1 * (1- ($ev / $pv));
return number_format($sv * 100, 2);
}
/**
* GetCV
*
* @param int $ev
* @param int $ac
* @access public
* @return int
*/
public function getCV($ev, $ac)
{
if($ac == 0) return 0;
$cv = -1 * (1 - ($ev / $ac));
return number_format($cv * 100, 2);
}
/**
* GetTips
*
* @param string $type
* @param int $data
* @access public
* @return string
*/
public function getTips($type = 'progress', $data = 0)
{
$this->app->loadConfig('custom');
if($type == 'progress') $tipsConfig = isset($this->config->custom->SV->progressTip) ? $this->config->custom->SV->progressTip : '';
if($type == 'cost') $tipsConfig = isset($this->config->custom->CV->costTip) ? $this->config->custom->CV->costTip : '';
if(empty($tipsConfig)) return '';
$tipsConfig = json_decode($tipsConfig);
foreach($tipsConfig as $tipConfig)
{
if($tipConfig->min <= $data and $tipConfig->max >= $data) return $tipConfig->tip;
}
return '';
}
}
-186
View File
@@ -1,186 +0,0 @@
<?php
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: index.html.php 5094 2013-07-10 08:46:15Z chencongzhi520@gmail.com $
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix text-center">
<div id='mainContent' >
<div class='main-table'>
<table class='table table-bordered'>
<tr>
<td><?php echo $lang->weekly->term;?></td>
<td><?php echo $monday . ' ~ ' . $lastDay?></td>
<td><?php echo $lang->weekly->master;?></td>
<td><?php echo zget($users, $program->PM, '');?></td>
</tr>
<tr>
<td><?php echo $lang->weekly->program;?></td>
<td><?php echo $program->name;?></td>
<td><?php echo $lang->weekly->staff;?></td>
<td><?php echo $staff;?></td>
</tr>
</table>
<div class='page-title'><h4><?php echo $lang->weekly->summary;?></h4></div>
<table class='table table-bordered'>
<tr>
<td><?php echo $lang->weekly->progress;?></td>
<td></td>
<td><?php echo $lang->weekly->analysisResult;?></td>
<td></td>
</tr>
<tr>
<td><?php echo $lang->weekly->pv;?></td>
<td><?php echo $pv;?></td>
<td rowspan='4'><?php echo $lang->weekly->progress;?></td>
<td rowspan='4'><?php echo $this->weekly->getTips('progress', $sv);?></td>
</tr>
<tr>
<td><?php echo $lang->weekly->ev;?></td>
<td><?php echo $ev;?></td>
</tr>
<tr>
<td><?php echo $lang->weekly->ac;?></td>
<td><?php echo $ac;?></td>
</tr>
<tr>
<td><?php echo $lang->weekly->sv;?></td>
<td><?php echo $sv ? $sv . '%' : '';?></td>
</tr>
<tr>
<td><?php echo $lang->weekly->cv;?></td>
<td><?php echo $cv ? $cv . '%' : '';?></td>
<td><?php echo $lang->weekly->cost;?></td>
<?php $projectCost = zget($this->config->custom, 'cost', 1);?>
<td><?php echo empty($projectCost) ? 0 : $ac * $projectCost;?></td>
</tr>
</table>
<div class='page-title'><h4><?php echo $lang->weekly->finished;?></h4></div>
<table class='table has-sort-head table-fixed'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='text-left w-120px'><?php echo $lang->task->estStarted;?></th>
<th class='text-left w-120px'><?php echo $lang->task->deadline;?></th>
<th class='text-left w-120px'><?php echo $lang->task->realStarted;?></th>
<th class='text-left w-100px'><?php echo $lang->task->finishedBy;?></th>
</tr>
</thead>
<tbody>
<?php foreach($finished as $task):?>
<tr data-id='<?php echo $task->id ?>'>
<td class='c-id'>
<?php printf('%03d', $task->id);?>
</td>
<td class='text-left' title='<?php echo $task->name?>'>
<?php echo html::a($this->createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
</td>
<td class='text-left'><?php echo $task->estStarted;?></td>
<td class='text-left'><?php echo $task->deadline;?></td>
<td class='text-left'><?php echo $task->realStarted;?></td>
<td class='text-left'><?php echo zget($users, $task->finishedBy);?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='page-title'><h4><?php echo $lang->weekly->postponed;?></h4></div>
<table class='table has-sort-head table-fixed'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='text-left w-100px'><?php echo $lang->task->assignedTo;?></th>
<th class='text-left w-120px'><?php echo $lang->task->estStarted;?></th>
<th class='text-left w-120px'><?php echo $lang->task->deadline;?></th>
<th class='text-left w-120px'><?php echo $lang->task->realStarted;?></th>
<th class='text-left w-100px'><?php echo $lang->task->progress;?></th>
</tr>
</thead>
<tbody>
<?php foreach($postponed as $task):?>
<tr data-id='<?php echo $task->id ?>'>
<td class='c-id'>
<?php printf('%03d', $task->id);?>
</td>
<td class='text-left' title='<?php echo $task->name?>'>
<?php echo html::a($this->createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
</td>
<td class='text-left'><?php echo zget($users, $task->assignedTo);?></td>
<td class='text-left'><?php echo $task->estStarted;?></td>
<td class='text-left'><?php echo $task->deadline;?></td>
<td class='text-left'><?php echo $task->realStarted;?></td>
<td class='text-left'><?php echo $task->progress;?>%</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='page-title'><h4><?php echo $lang->weekly->nextWeek;?></h4></div>
<table class='table has-sort-head table-fixed'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='text-left w-100px'><?php echo $lang->task->assignedTo;?></th>
<th class='text-left tw-120px'><?php echo $lang->task->estStarted;?></th>
<th class='text-left w-120px'><?php echo $lang->task->deadline;?></th>
</tr>
</thead>
<tbody>
<?php foreach($nextWeek as $task):?>
<tr data-id='<?php echo $task->id ?>'>
<td class='c-id'>
<?php printf('%03d', $task->id);?>
</td>
<td class='text-left' title='<?php echo $task->name?>'>
<?php echo html::a($this->createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
</td>
<td class='text-left'><?php echo zget($users, $task->assignedTo);?></td>
<td class='text-left'><?php echo $task->estStarted;?></td>
<td class='text-left'><?php echo $task->deadline;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='page-title'><h4><?php echo $lang->weekly->workloadByType;?></h4></div>
<table class='table has-sort-head table-fixed'>
<thead>
<tr>
<th><?php echo $lang->task->type;?></th>
<?php foreach($lang->task->typeList as $type => $name):?>
<?php if(!$name) continue;?>
<th><?php echo $name;?></th>
<?php endforeach;?>
<th><?php echo $lang->weekly->total;?></th>
</tr>
</thead>
<tbody class='sortable' id='taskTableList'>
<tr>
<th><?php echo $lang->weekly->workload;?></th>
<?php $total = 0;?>
<?php foreach($lang->task->typeList as $type => $name):?>
<?php if(!$name) continue;?>
<?php $worktimes = zget($workload, $type, 0);?>
<td><?php echo $worktimes;?></td>
<?php $total += $worktimes;?>
<?php if(!$name) continue;?>
<?php endforeach;?>
<td><?php echo $total;?></td>
</tr>
</tbody>
</table>
</div>
</div>
<style>
.main-table tbody>tr:nth-child(odd){ background-color:#fff;}
</style>
<?php include '../../common/view/footer.html.php';?>