package com.lutao.cloud.oil.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lutao.cloud.common.core.util.MessageInfo;
import com.lutao.cloud.common.security.annotation.Inner;
import com.lutao.cloud.oil.pojo.param.BaseParam;
import com.lutao.cloud.oil.pojo.param.MinisteriaSupervisionDetailParam;
import com.lutao.cloud.oil.pojo.vo.MinisteriaSupervisionDetailVO;
import com.lutao.cloud.oil.pojo.vo.ProblemRectifyProportionVO;
import com.lutao.cloud.oil.service.MinisteriaSupervisionDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/ministeria-supervision-detail")
@Api(value = "ministeria-supervision-detail", tags = "部级督导详情")
public class MinisteriaSupervisionDetailController {

    @Resource
    private MinisteriaSupervisionDetailService ministeriaSupervisionDetailService;

    @ApiOperation(value = "部级督导详情分页", notes = "部级督导详情分页")
    @PostMapping("/page")
    @Inner(value = false)
    public MessageInfo<IPage<MinisteriaSupervisionDetailVO>> getMinisteriaSupervisionDetailPage(Page page, @RequestBody MinisteriaSupervisionDetailParam param) {
        return ministeriaSupervisionDetailService.getMinisteriaSupervisionDetailPage(page,param);
    }

    @ApiOperation(value = "部级督导详情隐患整改完成图", notes = "部级督导详情隐患整改完成图")
    @PostMapping("/getMinisteriaSupervisionDetailChart")
    @Inner(value = false)
    public MessageInfo<ProblemRectifyProportionVO> getMinisteriaSupervisionDetailChart(@RequestBody BaseParam param) {
        return ministeriaSupervisionDetailService.getMinisteriaSupervisionDetailChart(param);
    }


}
