no message
This commit is contained in:
parent
dd3df81c63
commit
917d144484
@ -621,7 +621,7 @@ class ProjectController extends AbstractController
|
|||||||
return Base::retError('项目不存在或不在成员列表内');
|
return Base::retError('项目不存在或不在成员列表内');
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
$data = ProjectTask::with(['taskUser', 'taskTag'])->where('parent_id', $task->id)->get();
|
$data = ProjectTask::with(['taskUser', 'taskTag'])->where('parent_id', $task->id)->whereNull('archived_at')->get();
|
||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,11 +117,11 @@ class ProjectTask extends AbstractModel
|
|||||||
if ($this->parent_id > 0) {
|
if ($this->parent_id > 0) {
|
||||||
$this->attributes['sub_num'] = 0;
|
$this->attributes['sub_num'] = 0;
|
||||||
$this->attributes['sub_complete'] = 0;
|
$this->attributes['sub_complete'] = 0;
|
||||||
$this->attributes['percent'] = 0;
|
$this->attributes['percent'] = $this->complete_at ? 100 : 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isset($this->attributes['sub_num'])) {
|
if (!isset($this->attributes['sub_num'])) {
|
||||||
$builder = self::whereParentId($this->id);
|
$builder = self::whereParentId($this->id)->whereNull('archived_at');
|
||||||
$this->attributes['sub_num'] = $builder->count();
|
$this->attributes['sub_num'] = $builder->count();
|
||||||
$this->attributes['sub_complete'] = $builder->whereNotNull('complete_at')->count();
|
$this->attributes['sub_complete'] = $builder->whereNotNull('complete_at')->count();
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user