package com.casic.missiles.controller.meter;


import com.casic.missiles.dto.ReturnDTO;
import com.casic.missiles.dto.meter.MeterWorkbenchRequest;
import com.casic.missiles.dto.meter.MeterWorkbenchResponse;
import com.casic.missiles.service.meter.MeterWorkbenchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "工作台相关接口")
@RestController
@RequestMapping("/workbench")
public class MeterWorkbenchController {

    @Resource
    private MeterWorkbenchService meterWorkbenchService;

    /**
     * 证书列表查询
     * @return
     */
    @ApiOperation("我的证书列表查询")
    @PostMapping("/queryStaffCertificate")
    @ResponseBody
    public ReturnDTO<MeterWorkbenchResponse> queryStaffCertificate(@RequestBody MeterWorkbenchRequest workbenchRequest) {
        return meterWorkbenchService.queryStaffCertificate(workbenchRequest);
    }

    /**
     * 计量人员统计
     * @return
     */
    @ApiOperation("计量人员统计")
    @PostMapping("/meterStaffStatistic")
    @ResponseBody
    public ReturnDTO<MeterWorkbenchResponse> meterStaffStatistic() {
        return meterWorkbenchService.meterStaffStatistic();
    }

    /**
     * 培训计划统计
     * @return
     */
    @ApiOperation("培训计划统计")
    @PostMapping("/meterTrainStatistic")
    @ResponseBody
    public ReturnDTO<MeterWorkbenchResponse> meterTrainStatistic() {
        return meterWorkbenchService.meterTrainStatistic();
    }

    /**
     * 培训考核统计
     * @return
     */
    @ApiOperation("培训考核统计")
    @PostMapping("/meterTrainLogStatistic")
    @ResponseBody
    public ReturnDTO<MeterWorkbenchResponse> meterTrainLogStatistic(@RequestBody MeterWorkbenchRequest workbenchRequest) {
        return meterWorkbenchService.meterTrainLogStatistic(workbenchRequest);
    }

}
