智慧教务系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

103 lines
3.0 KiB

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\adminapi\controller\person_course_schedule;
use core\base\BaseAdminController;
use app\service\admin\person_course_schedule\PersonCourseScheduleService;
/**
* 人员与课程安排关系控制器
* Class PersonCourseSchedule
* @package app\adminapi\controller\person_course_schedule
*/
class PersonCourseSchedule extends BaseAdminController
{
/**
* 获取人员与课程安排关系列表
* @return \think\Response
*/
public function lists(){
$data = $this->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([
["resources_id",[]],
["schedule_id",0],
["student_ids",[]],
]);
$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([
["resources_id",[]],
["schedule_id",0],
["student_ids",[]],
]);
(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());
}
public function getTryCoursePerson($schedule_id){
return success((new PersonCourseScheduleService())->getTryCoursePerson($schedule_id));
}
}