package com.ningdatech.pmapi.meeting.controller;

import com.ningdatech.basic.model.PagePo;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.meeting.entity.req.MeetingCalenderReq;
import com.ningdatech.pmapi.meeting.entity.vo.*;
import com.ningdatech.pmapi.meeting.manage.DashboardManage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * DashboardController
 * </p>
 *
 * @author WendyYang
 * @since 22:19 2022/8/24
 */
@Api(tags = "工作台相关接口")
@RestController
@AllArgsConstructor
@RequestMapping("/api/v1/dashboard")
public class DashboardController {

    private final DashboardManage dashboardManage;

    @ApiOperation("会议日历")
    @GetMapping("/meetingCalender")
    @WebLog(value = "会议日历")
    public List<MeetingCalenderItemVO> meetingCalender(@Valid MeetingCalenderReq po) {
        return dashboardManage.meetingCalender(po);
    }

    @ApiOperation("待办：专家评价列表")
    @GetMapping("/todo/expertEvaluation")
    @WebLog(value = "待办：专家评价列表")
    public PageVo<ExpertEvaluationToDoListItemVO> expertEvaluationToDo(PagePo po) {
        return dashboardManage.expertEvaluationToDo(po);
    }

    @ApiOperation("待办：专家待替换列表")
    @GetMapping("/todo/expertReplace")
    @WebLog(value = "待办：专家待替换列表")
    public PageVo<ExpertReplaceTodoListItemVO> expertReplaceToDo(PagePo po) {
        return dashboardManage.expertReplaceTodoList(po);
    }

    @ApiOperation("待办：专家待确认列表")
    @GetMapping("/todo/expertConfirm")
    @WebLog(value = "待办：专家待确认列表")
    public PageVo<MeetingConfirmToDoListItemVO> expertConfirmToDo(PagePo po) {
        return dashboardManage.expertConfirmToDo(po);
    }

    @ApiOperation("会议数量统计")
    @GetMapping("/meetingCountSummary")
    @WebLog(value = "会议数量统计")
    public MeetingCountSummaryVO meetingCountSummary() {
        return dashboardManage.meetingCountSummary();
    }

    @ApiOperation("专家工作台：会议数量统计")
    @GetMapping("/meetingCountByExpert")
    @WebLog(value = "专家工作台：会议数量统计")
    public MeetingCountByExpertVO meetingCountByExpert() {
        return dashboardManage.meetingCountByExpert();
    }

}
