package com.diagbot.web;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.CheckInfoDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.MedPacsInfoFacade;
import com.diagbot.vo.CheckInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.validation.Valid;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author cy
 * @time: 2024-09-04
 */
@RestController
@RequestMapping("/qc/medPacsInfo")
@Api(value = "检查信息API", tags = {"检查信息API"})
public class MedPacsInfoController {
    @Autowired
    private MedPacsInfoFacade medPacsInfoFacade;

    @ApiOperation(value = "获取检查信息[by:cy]",
            notes = "behospitalCode：病人住院序号<br>" +
                    "checkType：检查项类型缺陷判别<br>" +
                    "checkItemType：检查类型（模糊搜索）<br>" +
                    "checkItemName：检查项目名称（模糊搜索）<br>" +
                    "jxDateStart：检查时间开始<br>" +
                    "jxDateEnd：检查时间结束<br>")
    @PostMapping("/getCheckPage")
    @SysLogger("getCheckPage")
    public RespDTO<IPage<CheckInfoDTO>> getCheckPage(@RequestBody @Valid CheckInfoVO checkInfoVO) {
        return RespDTO.onSuc(medPacsInfoFacade.getCheckPage(checkInfoVO));
    }

}
