package com.prolog.cs.base.gsp.controller;

import com.prolog.cs.base.gsp.QueryDTO;
import com.prolog.cs.base.gsp.service.GspUpkeepCheckService;
import com.prolog.cs.base.gsp.vo.GspUpkeepCheckVO;
import com.prolog.cs.base.gsp.vo.RfGspUpkeepCheckVO;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description 质量管理
 * @Date 2021-05-08
 */

@Api(tags = "RF质量管理")
@RestController
@RequestMapping("/gspUpkeepCheck")
public class RfGspUpkeepCheckController {

    @Resource
    private GspUpkeepCheckService gspUpkeepCheckService;


    @ApiOperation("获取所有待养护记录")
    @GetMapping("/rf/findUpkeepPage")
    public RestMessage<Page<RfGspUpkeepCheckVO>> findUpkeepPageByRf(QueryDTO dto) {
        return RestMessage.querySuccess(gspUpkeepCheckService.findUpkeepPageByRf(dto));
    }

    @ApiOperation("获取所有待养护记录")
    @GetMapping("/rf/findUpkeepDtl")
    public RestMessage<GspUpkeepCheckVO> findUpkeepDtlByRf(QueryDTO dto) {
        return RestMessage.querySuccess(gspUpkeepCheckService.findUpkeepDtlByRf(dto));
    }

}
