package com.template.api;

import com.alibaba.fastjson.JSONObject;
import com.template.model.evaluate.teacher.SmartEvaluateTeacher;
import com.template.model.request.addChildScoreManageRequest;
import com.template.model.request.addScoreManageRequest;
import com.template.model.request.updateScoreManageRequest;
import com.template.model.request.useridsRequest;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@RequestMapping("/api/smartEvaluateTeacher")
@Api(tags = {"SmartEvaluateTeacherControllerAPI"}, value = "综合素质")
public interface SmartEvaluateTeacherControllerAPI {

    /**
     * 添加项按钮
     * @param asmr
     * @param bindingResult
     * @return
     */
    @PostMapping(value = "/addScoreManage")
    @ApiOperation(value = "添加项按钮", httpMethod = "POST")
    CommonResult addScoreManage(@Validated @RequestBody addScoreManageRequest asmr, BindingResult bindingResult) throws Exception;

    /**
     * 添加子项按钮
     * @param acsmr
     * @param bindingResult
     * @return
     */
    @PostMapping(value = "/addChildScoreManage")
    @ApiOperation(value = "添加子项按钮", httpMethod = "POST")
    CommonResult addChildScoreManage(@Validated @RequestBody addChildScoreManageRequest acsmr, BindingResult bindingResult) throws Exception;

    /**
     * 编辑按钮
     * @param usmr
     * @return
     */
    @PostMapping(value = "/updateScoreManage")
    @ApiOperation(value = "编辑按钮", httpMethod = "POST")
    CommonResult updateScoreManage(@Validated @RequestBody updateScoreManageRequest usmr, BindingResult bindingResult) throws Exception;

    /**
     * 删除按钮
     * @param id 数据ID
     * @return
     */
    @GetMapping(value = "/deleteScoreManage")
    @ApiOperation(value = "删除按钮", httpMethod = "GET")
    CommonResult deleteScoreManage(@RequestParam int id) throws Exception;



    @RequestMapping(value = "/operateSmartScoreManage")
    @ApiOperation(value = "评分项目管理", httpMethod = "POST")
    CommonResult operateSmartScoreManage(@Validated @RequestBody JSONObject jsonObject);

    @RequestMapping(value = "/getScoreManage")
    @ApiOperation(value = "查看评分项", httpMethod = "POST")
    CommonResult getScoreManage(String term);

    @RequestMapping(value = "/getTeacherScoreList")
    @ApiOperation(value = "查看教师评分", httpMethod = "POST")
    CommonResult getTeacherScoreList(@Validated @RequestBody SmartEvaluateTeacher smartEvaluateTeacher, Integer currentPage, Integer pageCount);

    @RequestMapping(value = "/getTeacherScoreExcel")
    @ApiOperation(value = "导出教师评分", httpMethod = "POST")
    void getTeacherScoreExcel(SmartEvaluateTeacher smartEvaluateTeacher, HttpServletResponse response);

    @RequestMapping(value = "/evaluateScore")
    @ApiOperation(value = "教师评分", httpMethod = "POST")
    CommonResult evaluateScore(@Validated @RequestBody JSONObject jsonObject) throws Exception;

    @RequestMapping(value = "/getTeacherScoreDetail")
    @ApiOperation(value = "获取教师分数详情", httpMethod = "POST")
    CommonResult getTeacherScoreDetail(Integer id);

    @RequestMapping(value = "/getScoreComparison")
    @ApiOperation(value = "分数对比", httpMethod = "POST")
    CommonResult getScoreComparison(Integer id);

    @RequestMapping(value = "/getScoreRank")
    @ApiOperation(value = "评分排行", httpMethod = "POST")
    CommonResult getScoreRank(int currentPage, int pageCount, String subject);

    /**
     * 首页最受欢迎老师TOP6
     */
    @GetMapping(value = "queryTopSixTeacher")
    @ApiOperation(value = "最受欢迎老师TOP6", notes = "最受欢迎老师TOP6", httpMethod = "GET")
    CommonResult queryTopSixTeacher();

    @GetMapping(value = "/rankingList")
    @ApiOperation(value = "排行榜", notes = "排行榜", httpMethod = "GET")
    CommonResult rankingList(String cardNo);


}
