request->params([ ["name",""], ["phone_number",""], ["campus_name",""] ]); return success((new PersonCourseScheduleService())->getPage($data)); } /** * 人员与课程安排关系详情 * @param int $id * @return \think\Response */ public function info(int $id){ return success((new PersonCourseScheduleService())->getInfo($id)); } /** * 添加人员与课程安排关系 * @return \think\Response */ public function add(){ $data = $this->request->params([ ["person_id",0], ["person_type",""], ["schedule_id",0], ["course_date","2025-05-29 17:03:27"], ["time_slot",""], ]); $this->validate($data, 'app\validate\person_course_schedule\PersonCourseSchedule.add'); $id = (new PersonCourseScheduleService())->add($data); return success('ADD_SUCCESS', ['id' => $id]); } /** * 人员与课程安排关系编辑 * @param $id 人员与课程安排关系id * @return \think\Response */ public function edit(int $id){ $data = $this->request->params([ ["person_id",0], ["person_type",""], ["schedule_id",0], ["course_date","2025-05-29 17:03:27"], ["time_slot",""], ]); $this->validate($data, 'app\validate\person_course_schedule\PersonCourseSchedule.edit'); (new PersonCourseScheduleService())->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 人员与课程安排关系删除 * @param $id 人员与课程安排关系id * @return \think\Response */ public function del(int $id){ (new PersonCourseScheduleService())->del($id); return success('请假成功'); } public function xk(int $id){ (new PersonCourseScheduleService())->xk($id); return success('销课成功'); } public function getCustomerResourcesAll(){ return success(( new PersonCourseScheduleService())->getCustomerResourcesAll()); } }