package com.om.controller.admin;

import com.om.service.IRepairService;
import com.om.utils.Result;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("web")
@Api(tags = "公共控制器")
public class CommonController {

    @Resource
    private IRepairService repairService;

    @GetMapping("report/pdf")
    @ApiOperation("查看诊断报告---导出pdf")
    public Result<String> reportPdf(@RequestParam("id") Integer id){
       return repairService.reportPdf(id);
    }

    @GetMapping("report/h5")
    @ApiOperation("查看诊断报告---导出h5")
    public Result<String> reportH5(@RequestParam("id") Integer id){
        return repairService.reportH5(id);
    }
}
