Merge branch 'sprint/171_sgm_43948' into 'sprint/168'

Sprint/171 sgm 43948

See merge request easycorp/zentaopms!340
This commit is contained in:
李玉春
2021-11-08 07:53:34 +00:00
4 changed files with 25 additions and 10 deletions
+3 -2
View File
@@ -428,8 +428,9 @@ $.extend($.fn.kanban.Constructor.DEFAULTS,
doingProjectCount = $doingProjectItems.find('.project-item').length;
doingExecutionCount = $doingProjectItems.find('.execution-item').length;
}
$kanban.find('.kanban-header-col[data-type="doingProject"] > .title > .count').text(doingProjectCount || 0);
$kanban.find('.kanban-header-col[data-type="doingExecution"] > .title > .count').text(doingExecutionCount || 0);
if(doingProjectCount > 0) $kanban.find('.kanban-header-col[data-type="doingProject"] > .title > .count').text(doingProjectCount);
if(doingExecutionCount > 0) $kanban.find('.kanban-header-col[data-type="doingExecution"] > .title > .count').text(doingExecutionCount);
},
onCreate(kanban)
{
+1
View File
@@ -1881,6 +1881,7 @@ class execution extends control
$avatarPairs = $this->dao->select('account, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchPairs();
foreach($avatarPairs as $account => $avatar)
{
if(!$avatar) continue;
$userList[$account]['avatar'] = $avatar;
}
+1 -1
View File
@@ -1362,7 +1362,7 @@ class productModel extends model
* @access public
* @return array
*/
public function getStats($orderBy = 'order_desc', $pager = null, $status = 'noclosed', $line = 0, $storyType = 'story', $programID = 0)
public function getStats($orderBy = 'order_asc', $pager = null, $status = 'noclosed', $line = 0, $storyType = 'story', $programID = 0)
{
$this->loadModel('report');
$this->loadModel('story');
+20 -7
View File
@@ -443,13 +443,26 @@ class weeklyModel extends model
$executions = $this->loadModel('execution')->getList($project, 'all', 'all', 0, 0, 0);
$executionIdList = array_keys($executions);
$AC = $this->dao->select('sum(consumed) as consumed')
->from(TABLE_EFFORT)
->where('objectType')->eq('task')
->andWhere('execution')->in($executionIdList)
->andWhere('date')->ge($monday)
->andWhere('date')->lt($nextMonday)
->fetch('consumed');
if(isset($this->config->proVersion))
{
$AC = $this->dao->select('sum(consumed) as consumed')
->from(TABLE_EFFORT)
->where('objectType')->eq('task')
->andWhere('execution')->in($executionIdList)
->andWhere('date')->ge($monday)
->andWhere('date')->lt($nextMonday)
->fetch('consumed');
}
else
{
$taskIdList = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->in($executionIdList)->fetchPairs();
$AC = $this->dao->select('sum(consumed) as consumed')
->from(TABLE_TASKESTIMATE)
->where('task')->in($taskIdList)
->andWhere('date')->ge($monday)
->andWhere('date')->lt($nextMonday)
->fetch('consumed');
}
return round($AC, 2);
}