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.oil.pojo.param.BaseParam;
import com.lutao.cloud.oil.pojo.param.DivisionInspectionDetailParam;
import com.lutao.cloud.oil.pojo.vo.DivisionInspectionDetailVO;
import com.lutao.cloud.oil.pojo.vo.ProblemRectifyProportionVO;
import com.lutao.cloud.oil.service.DivisionInspectionDetailService;
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;

@Api(value = "分部检查",tags = "分部检查")
@RestController
@RequestMapping("/division-inspection-detail")
public class DivisionInspectionDetailController {

    @Resource
    private DivisionInspectionDetailService divisionInspectionDetailService;

    @ApiOperation(value = "分部检查闭环管理信息分页",notes = "分部检查闭环管理信息分页")
    @PostMapping("/page")
    public MessageInfo<IPage<DivisionInspectionDetailVO>> getDivisionInspectionDetailPage(Page page, @RequestBody DivisionInspectionDetailParam param){
        return divisionInspectionDetailService.getDivisionInspectionDetailPage(page,param);
    }

    @ApiOperation(value = "分部检查隐患整改完成图",notes = "分部检查隐患整改完成图")
    @PostMapping("/getDivisionInspectionDetailChart")
    public MessageInfo<ProblemRectifyProportionVO> getDivisionInspectionDetailChart(@RequestBody BaseParam param){
        return divisionInspectionDetailService.getDivisionInspectionDetailChart(param);
    }
}
