Merge branch ztflow-caoyanyi-feature/task-report#caoyanyi of zentao/zentaopms (#9511)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* 按优先级统计的需求数。
|
||||
* Count of story in pri
|
||||
*
|
||||
* 范围:pri
|
||||
* 对象:story
|
||||
* 目的:scale
|
||||
* 度量名称:按优先级统计的需求数
|
||||
* 单位:个
|
||||
* 描述:按优先级统计的需求数
|
||||
* 定义:按优先级统计的需求数
|
||||
*
|
||||
* @copyright Copyright 2009-2025 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author Yanyi Cao <caoyanyi@chandao.com>
|
||||
* @package
|
||||
* @uses func
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @Link https://www.zentao.net
|
||||
*/
|
||||
class count_of_story_in_pri_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = '';
|
||||
|
||||
public $fieldList = array();
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(!isset($this->result[$row->pri])) $this->result[$row->pri] = array();
|
||||
$this->result[$row->pri][$row->id] = $row->id;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
{
|
||||
foreach($this->result as $pri => $stories)
|
||||
{
|
||||
if(!is_array($stories))
|
||||
{
|
||||
unset($this->result[$pri]);
|
||||
continue;
|
||||
}
|
||||
$this->result[$pri] = count($stories);
|
||||
}
|
||||
|
||||
$records = $this->getRecords(array('pri', 'value'));
|
||||
return $this->filterByOptions($records, $options);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* 按来源统计的需求数。
|
||||
* Count of story in source
|
||||
*
|
||||
* 范围:source
|
||||
* 对象:story
|
||||
* 目的:scale
|
||||
* 度量名称:按来源统计的需求数
|
||||
* 单位:个
|
||||
* 描述:按来源统计的需求数
|
||||
* 定义:按来源统计的需求数
|
||||
*
|
||||
* @copyright Copyright 2009-2025 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author Yanyi Cao <caoyanyi@chandao.com>
|
||||
* @package
|
||||
* @uses func
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @Link https://www.zentao.net
|
||||
*/
|
||||
class count_of_story_in_source_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = '';
|
||||
|
||||
public $fieldList = array();
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(!isset($this->result[$row->source])) $this->result[$row->source] = array();
|
||||
$this->result[$row->source][$row->id] = $row->id;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
{
|
||||
foreach($this->result as $source => $stories)
|
||||
{
|
||||
if(!is_array($stories))
|
||||
{
|
||||
unset($this->result[$source]);
|
||||
continue;
|
||||
}
|
||||
$this->result[$source] = count($stories);
|
||||
}
|
||||
|
||||
$records = $this->getRecords(array('source', 'value'));
|
||||
return $this->filterByOptions($records, $options);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* 按状态统计的需求数。
|
||||
* Count of story in status
|
||||
*
|
||||
* 范围:status
|
||||
* 对象:story
|
||||
* 目的:scale
|
||||
* 度量名称:按状态统计的需求数
|
||||
* 单位:个
|
||||
* 描述:按状态统计的需求数
|
||||
* 定义:按状态统计的需求数
|
||||
*
|
||||
* @copyright Copyright 2009-2025 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author Yanyi Cao <caoyanyi@chandao.com>
|
||||
* @package
|
||||
* @uses func
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @Link https://www.zentao.net
|
||||
*/
|
||||
class count_of_story_in_status_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = '';
|
||||
|
||||
public $fieldList = array();
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(!isset($this->result[$row->status])) $this->result[$row->status] = array();
|
||||
$this->result[$row->status][$row->id] = $row->id;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
{
|
||||
foreach($this->result as $status => $stories)
|
||||
{
|
||||
if(!is_array($stories))
|
||||
{
|
||||
unset($this->result[$status]);
|
||||
continue;
|
||||
}
|
||||
$this->result[$status] = count($stories);
|
||||
}
|
||||
|
||||
$records = $this->getRecords(array('status', 'value'));
|
||||
return $this->filterByOptions($records, $options);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* 按类型统计的需求数。
|
||||
* Count of story in type
|
||||
*
|
||||
* 范围:type
|
||||
* 对象:story
|
||||
* 目的:scale
|
||||
* 度量名称:按类型统计的需求数
|
||||
* 单位:个
|
||||
* 描述:按类型统计的需求数
|
||||
* 定义:按类型统计的需求数
|
||||
*
|
||||
* @copyright Copyright 2009-2025 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author Yanyi Cao <caoyanyi@chandao.com>
|
||||
* @package
|
||||
* @uses func
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @Link https://www.zentao.net
|
||||
*/
|
||||
class count_of_story_in_type_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = '';
|
||||
|
||||
public $fieldList = array();
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(!isset($this->result[$row->type])) $this->result[$row->type] = array();
|
||||
$this->result[$row->type][$row->id] = $row->id;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
{
|
||||
foreach($this->result as $type => $stories)
|
||||
{
|
||||
if(!is_array($stories))
|
||||
{
|
||||
unset($this->result[$type]);
|
||||
continue;
|
||||
}
|
||||
$this->result[$type] = count($stories);
|
||||
}
|
||||
|
||||
$records = $this->getRecords(array('type', 'value'));
|
||||
return $this->filterByOptions($records, $options);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* 按人员统计的创建的研发需求数。
|
||||
* Count of reviewing story in user.
|
||||
*
|
||||
* 范围:user
|
||||
* 对象:story
|
||||
* 目的:scale
|
||||
* 度量名称:按人员统计的创建的研发需求数
|
||||
* 单位:个
|
||||
* 描述:按人员统计的创建的研发需求数。
|
||||
* 定义:所有研发需求个数求和;
|
||||
*
|
||||
* @copyright Copyright 2009-2025 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
|
||||
* @package
|
||||
* @uses func
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @Link https://www.zentao.net
|
||||
*/
|
||||
class count_of_story_in_user extends baseCalc
|
||||
{
|
||||
public $dataset = '';
|
||||
|
||||
public $fieldList = array();
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(!isset($this->result[$row->openedBy])) $this->result[$row->openedBy] = 0;
|
||||
$this->result[$row->openedBy] += 1;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
{
|
||||
$records = $this->getRecords(array('user', 'value'));
|
||||
return $this->filterByOptions($records, $options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user