package com.ruoyi.web.work.api;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.work.domain.Report;
import com.ruoyi.web.work.domain.Result;
import com.ruoyi.web.work.service.IReportService;
import com.ruoyi.web.work.service.IResultService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/app/orcReport")
@Api(tags = "小程序申请报告单")
public class Api_OrcReportController {

    @Autowired
    private IReportService reportService;


    /**
     * 根据检测项目ORC_ID申请报告单
     * @param orcId
     * @return
     */
    @ApiOperation(value = "根据检测项目ORC_ID申请报告单")
    @GetMapping("/{orcId}")
    public AjaxResult getOrcReportByObcId(@PathVariable String orcId){
        Report orcReport = reportService.getOrcReportByObcId(orcId);
        return AjaxResult.success(orcReport);
    }
}
