Merge branch release/21.7.6 of zentao/zentaopms (#11906)
This commit is contained in:
@@ -366,7 +366,7 @@ class deptModel extends model
|
||||
|
||||
return $this->dao->select("$keyField, realname")->from(TABLE_USER)
|
||||
->where('1=1')
|
||||
->beginIF(strpos($params, 'queryAll') === false)->andWhere('deleted')->eq(0)->fi()
|
||||
->beginIF(strpos($params, 'queryAll') === false && empty($this->config->user->showDeleted))->andWhere('deleted')->eq(0)->fi()
|
||||
->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq($type)->fi()
|
||||
->beginIF($childDepts)->andWhere('dept')->in($childDepts)->fi()
|
||||
->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi()
|
||||
|
||||
@@ -4,25 +4,25 @@ include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/lib/dept.unittest.class.php';
|
||||
su('admin');
|
||||
|
||||
zenData('dept')->gen(30);
|
||||
zenData('dept')->gen(30);
|
||||
zenData('user')->loadYaml('user')->gen(200);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 deptModel->getDeptUserPairs();
|
||||
timeout=0
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询所有内部用户 >> 用户49
|
||||
查询所有外部用户 >> 测试1
|
||||
根据部门查询用户 >> 用户10
|
||||
键值为account查询 >> 用户40
|
||||
键值为out查询 >> 用户10
|
||||
type为out查询 >> 用户10
|
||||
查询所有内部用户统计 >> 100
|
||||
查询所有外部用户统计 >> 100
|
||||
根据部门查询用户统计 >> 10
|
||||
查询全部用户统计 >> 200
|
||||
- 查询所有内部用户属性50 @用户49
|
||||
- 查询所有外部用户属性101 @测试1
|
||||
- 根据部门查询用户属性11 @用户10
|
||||
- 键值为account查询属性user40 @用户40
|
||||
- 键值为out查询属性user10 @用户10
|
||||
- type为out查询属性user10 @用户10
|
||||
- 查询所有内部用户统计 @100
|
||||
- 查询所有外部用户统计 @100
|
||||
- 根据部门查询用户统计 @10
|
||||
- 查询全部用户统计 @200
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1582,7 +1582,7 @@ class storyModel extends model
|
||||
$isChanged = !empty($oldStory->changedBy) ? true : false;
|
||||
if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft';
|
||||
|
||||
$actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($this->post, 'closedReason', '')) . (zget($this->post, 'duplicateStory', '') ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus");
|
||||
$actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($_POST, 'closedReason', '')) . (!empty($_POST['duplicateStory']) ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus");
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user