增加任务执行状态
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
893449ab6c
commit
cec4cf5024
@ -34,7 +34,7 @@ class TaskStages extends CommonModel
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function tasks($stageCode, $deleted = 0, $done = -1, $title = '', $pri = [], $executor = [], $creator = [], $joiner = [], $endTime = [], $beginTime = [], $createTime = [], $doneTime = [])
|
||||
public function tasks($stageCode, $deleted = 0, $done = -1, $title = '', $pri = [], $executor = [], $creator = [], $joiner = [], $status = [], $endTime = [], $beginTime = [], $createTime = [], $doneTime = [])
|
||||
{
|
||||
$where = ['pcode' => '', 'deleted' => $deleted];
|
||||
if ($done != -1) {
|
||||
@ -52,6 +52,9 @@ class TaskStages extends CommonModel
|
||||
if ($pri) {
|
||||
$taskModel = $taskModel->whereIn('t.pri', $pri);
|
||||
}
|
||||
if ($status) {
|
||||
$taskModel = $taskModel->whereIn('t.status', $status);
|
||||
}
|
||||
if ($endTime) {
|
||||
$taskModel = $taskModel->whereBetween('t.end_time', implode(',', $endTime));
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ class TaskStages extends BasicApi
|
||||
$done = Request::param('done', -1);
|
||||
$title = Request::param('title', '');
|
||||
$pri = json_decode(Request::post('pri', ''));
|
||||
$status = json_decode(Request::post('status', ''));
|
||||
$stage = json_decode(Request::post('stage', ''));
|
||||
$executor = json_decode(Request::post('executor', ''));
|
||||
$creator = json_decode(Request::post('creator', ''));
|
||||
@ -81,7 +82,7 @@ class TaskStages extends BasicApi
|
||||
$this->error("数据解析异常");
|
||||
}
|
||||
$where[] = ['stage_code', '=', $code];
|
||||
$list = $this->model->tasks($code, 0, $done, $title, $pri, $executor, $creator, $joiner, $endTime, $beginTime, $createTime, $doneTime);
|
||||
$list = $this->model->tasks($code, 0, $done, $title, $pri, $executor, $creator, $joiner, $status, $endTime, $beginTime, $createTime, $doneTime);
|
||||
// $list = \app\common\Model\Task::alias('t')->join('member m','t.assign_to = m.code')->field()->where(['stage_code'=>$code])->select();
|
||||
|
||||
$this->success('', $list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user