package com.sundot.airport.web.controller.score;

import com.sundot.airport.common.core.controller.BaseController;
import com.sundot.airport.common.core.domain.AjaxResult;
import com.sundot.airport.ledger.service.IScoreRadarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 六维度雷达图大屏数据接口
 */
@RestController
@RequestMapping("/score/radar")
public class ScoreRadarController extends BaseController {

    @Autowired
    private IScoreRadarService radarService;

    /** 获取所有班组列表（用于顶部下拉） */
    @GetMapping("/teamList")
    public AjaxResult teamList() {
        return AjaxResult.success(radarService.selectTeamList());
    }

    /** 获取指定班组全员六维度得分（雷达图数据） */
    @GetMapping("/memberScores")
    public AjaxResult memberScores(@RequestParam String teamName) {
        return AjaxResult.success(radarService.selectMemberScores(teamName));
    }
}
