任务成-查看公司每日任务列表
This commit is contained in:
parent
5e52fe7be7
commit
ceb3a3d48d
@ -116,5 +116,19 @@ class TaskSchedulingPlanController extends BaseAdminController
|
|||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDayTaskList()
|
||||||
|
{
|
||||||
|
$companyId = $this->request->param('company_id', 0);
|
||||||
|
$date = $this->request->param('date',);
|
||||||
|
$list = TaskSchedulingPlan::where(['company_id' => $companyId])
|
||||||
|
->where('start_time', strtotime($date))
|
||||||
|
->with(['template','templateInfo'])
|
||||||
|
->order(['id' => 'desc'])
|
||||||
|
->select()
|
||||||
|
->toArray();
|
||||||
|
return $this->success('', $list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -17,6 +17,7 @@ namespace app\common\model\task_scheduling_plan;
|
|||||||
|
|
||||||
use app\common\model\BaseModel;
|
use app\common\model\BaseModel;
|
||||||
use app\common\model\Company;
|
use app\common\model\Company;
|
||||||
|
use app\common\model\task\Task;
|
||||||
use app\common\model\task_scheduling\TaskScheduling;
|
use app\common\model\task_scheduling\TaskScheduling;
|
||||||
use app\common\model\task_template\TaskTemplate;
|
use app\common\model\task_template\TaskTemplate;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
@ -46,6 +47,10 @@ class TaskSchedulingPlan extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->hasOne(TaskTemplate::class, 'id', 'template_id')->bind(['template_name'=>'title']);
|
return $this->hasOne(TaskTemplate::class, 'id', 'template_id')->bind(['template_name'=>'title']);
|
||||||
}
|
}
|
||||||
|
public function task()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Task::class, 'task_id', 'id');
|
||||||
|
}
|
||||||
public function templateInfo()
|
public function templateInfo()
|
||||||
{
|
{
|
||||||
return $this->hasOne(TaskTemplate::class, 'id', 'template_id');
|
return $this->hasOne(TaskTemplate::class, 'id', 'template_id');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user