更新
This commit is contained in:
parent
b4fa584367
commit
181b2d30cc
@ -46,8 +46,15 @@ class TaskStages extends CommonModel
|
||||
if (is_array($stageCode)) {
|
||||
$taskModel = $taskModel->whereIn('t.stage_code', $stageCode);
|
||||
} else {
|
||||
if (isset($data['type']) && $data['type'] != 'all')
|
||||
if (isset($data['type']) && $data['type'] != 'all'){
|
||||
$taskModel = $taskModel->where('t.stage_code', $stageCode);
|
||||
}elseif(isset($data['type']) && $data['type'] == 'all'){
|
||||
if(isset($data['type_name'])){
|
||||
$code =Db::name('task_stages')->where('name',$data['type_name'])->where('deleted',0)->column('code');
|
||||
$taskModel = $taskModel->whereIn('t.stage_code', $code);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if ($title) {
|
||||
$taskModel = $taskModel->whereLike('t.name', "%$title%");
|
||||
|
@ -67,6 +67,7 @@ class TaskStages extends BasicApi
|
||||
$where = [];
|
||||
$code = Request::post('stageCode');
|
||||
$type = Request::post('type');
|
||||
$type_name = Request::post('type_name');
|
||||
$page = Request::post('page',1);
|
||||
$done = Request::param('done', -1);
|
||||
$title = Request::param('title', '');
|
||||
@ -85,7 +86,8 @@ class TaskStages extends BasicApi
|
||||
}
|
||||
$where[] = ['stage_code', '=', $code];
|
||||
$data = ['type'=>$type];
|
||||
$data = ['page'=>$page];
|
||||
$data['page'] = $page;
|
||||
$data['type_name'] = $type_name;
|
||||
$list = $this->model->tasks($code, 0, $done, $title, $pri, $executor, $creator, $joiner, $status, $endTime, $beginTime, $createTime, $doneTime,$data);
|
||||
// $list = \app\common\Model\Task::alias('t')->join('member m','t.assign_to = m.code')->field()->where(['stage_code'=>$code])->select();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user