package com.srs.web.controller.comprehensive;

import com.srs.common.core.controller.BaseController;
import com.srs.common.core.domain.AjaxResult;
import com.srs.common.core.page.TableDataInfo;
import com.srs.comprehensive.domain.CphTeacher;
import com.srs.comprehensive.service.Gxsdxy01ZzjgService;
import com.srs.comprehensive.service.GxsdxySjzx005XsxxService;
import com.srs.comprehensive.service.ICphTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 数据同步控制器
 */
@RestController
@RequestMapping("/system/dataSync")
public class DataSyncController extends BaseController{

        @Autowired
        private Gxsdxy01ZzjgService gxsdxy01ZzjgService;
        @Autowired
        private ICphTeacherService cphTeacherService;

        @Autowired
        private GxsdxySjzx005XsxxService gxsdxySjzx005XsxxService;

        /**
         * 同步部门信息
         * @return 结果
         */

        @PostMapping("/dept")
        public AjaxResult dept()
        {
          return  AjaxResult.success(gxsdxy01ZzjgService.dataSync());
        }

        /**
         * 同步辅导员
         * @return 结果
         */

        @PostMapping("/teacher")
        public AjaxResult teacher()
        {
                return  AjaxResult.success(cphTeacherService.teacherDataSync());
        }

        /**
         * 同步专业信息
         * @return 结果
         */

        @PostMapping("/major")
        public AjaxResult major()
        {
                return  AjaxResult.success(gxsdxySjzx005XsxxService.majorDataSync());
        }

        /**
         * 同步班级信息
         * @return 结果
         */

        @PostMapping("/class")
        public AjaxResult classes()
        {
                return  AjaxResult.success(gxsdxySjzx005XsxxService.classDataSync());
        }

        /**
         * 同步学生信息
         * @return 结果
         */

        @PostMapping("/student")
        public AjaxResult student()
        {
                return  AjaxResult.success(gxsdxySjzx005XsxxService.studentDataSync());
        }




}
