package com.diagbot.web;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.DoctorAdviceDTO;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.DoctorAdviceFacade;
import com.diagbot.vo.DoctorAdviceVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * @Description:
 * @author: gaodm
 * @time: 2024/7/13 14:56
 */
@RestController
@RequestMapping("/qc/doctoradvice")
@SuppressWarnings("unchecked")
@Api(value = "医嘱信息API", tags = { "医嘱信息API" })
public class DoctorAdviceController {

    @Autowired
    private DoctorAdviceFacade doctorAdviceFacade;


    @ApiOperation(value = "获取医嘱信息[by:gaodm]",
            notes = "behospitalCode：病人住院序号<br>" +
                    "doctorAdviceType：医嘱类型（模糊搜索）<br>" +
                    "daItemName：医嘱项目名称（模糊搜索）<br>" +
                    "daStartDateStart：医嘱开始时间<br>" +
                    "daStartDateEnd：医嘱时间结束时间<br>")
    @PostMapping("/getPage")
    @SysLogger("getPage")
    public RespDTO<IPage<DoctorAdviceDTO>> getPage(@RequestBody @Valid DoctorAdviceVO doctorAdviceVO) {
        return RespDTO.onSuc(doctorAdviceFacade.getPageFac(doctorAdviceVO));
    }
}
