package thyyxxk.webserver.controller.pacs;

import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
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 thyyxxk.webserver.config.exception.ExceptionEnum;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.pacs.CheckData;
import thyyxxk.webserver.service.pacs.PacsService;
import thyyxxk.webserver.utils.ResultVoUtil;

import java.util.List;

@RestController
@RequestMapping("/Pacs")
public class PacsController {

    @Autowired
    private PacsService pacsService;

    @GetMapping("/getCheckData")
    public ResultVo<CheckData> getCheckData(@RequestParam("reportId") Integer reportId) {
        if (reportId == null) {
            return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "reportId不能为空！");
        }
        return ResultVoUtil.success(pacsService.getCheckData(reportId));
    }
}
