dataLists(new TaskSchedulingPlanLists()); } /** * @notes 添加任务排期日历 * @return \think\response\Json * @author likeadmin * @date 2023/08/08 10:34 */ public function add() { $params = (new TaskSchedulingPlanValidate())->post()->goCheck('add'); $params['create_user_id']=$this->adminId; $time=strtotime($params['start_time']); $params['start_time']=$time; $params['end_time']=strtotime($params['end_time'])+86399; $result = TaskSchedulingPlanLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(TaskSchedulingPlanLogic::getError()); } /** * @notes 编辑任务排期日历 * @return \think\response\Json * @author likeadmin * @date 2023/08/08 10:34 */ public function edit() { $params = (new TaskSchedulingPlanValidate())->post()->goCheck('edit'); $time=strtotime($params['start_time']); $params['start_time']=$time; $params['end_time']=strtotime($params['end_time'])+86399; $result = TaskSchedulingPlanLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(TaskSchedulingPlanLogic::getError()); } /** * @notes 删除任务排期日历 * @return \think\response\Json * @author likeadmin * @date 2023/08/08 10:34 */ public function delete() { $params = (new TaskSchedulingPlanValidate())->post()->goCheck('delete'); $find=TaskSchedulingPlan::where('id',$params['id'])->find(); TaskSchedulingPlanLogic::delete($params); $data['id']=$find['task_id']; TaskLogic::delete($data); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取任务排期日历详情 * @return \think\response\Json * @author likeadmin * @date 2023/08/08 10:34 */ public function detail() { $params = (new TaskSchedulingPlanValidate())->goCheck('detail'); $result = TaskSchedulingPlanLogic::detail($params); return $this->data($result); } }