package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.MedExamineInfoFacade;
import com.diagbot.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
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;

/**
 * <p>
 * 审核 前端控制器
 * </p>
 *
 * @author dsYun
 * @time: 2024-07-06
 */
@RestController
@RequestMapping("/qc/medExamineInfo")
@Api(value = "审核相关接口API", tags = { "审核相关接口API" })
@SuppressWarnings("unchecked")
public class MedExamineInfoController {

    @Autowired
    MedExamineInfoFacade medExamineInfoFacade;

//    @ApiOperation(value = "核查数据接口[by:wangfeng]",
//            notes = "核查数据接口")
//    @PostMapping("/addMedCheckInfo")
//    @SysLogger("addMedCheckInfo")
//    @ApiIgnore
//    public RespDTO<Boolean> addMedCheckInfo(@RequestBody MedCheckInfoAddVO medCheckInfoAddVO) {
//        Boolean res = medExamineInfoFacade.addMedCheckInfos(medCheckInfoAddVO);
//        return RespDTO.onSuc(res);
//    }

    @ApiOperation(value = "通过审核[by:dsYun]")
    @PostMapping("/passAudit")
    @SysLogger("passAudit")
    @Transactional
    public RespDTO<Boolean> passAudit(@RequestBody BehospitalcodeVO behospitalcodeVO) {
        Boolean res = medExamineInfoFacade.passAudit(behospitalcodeVO);
        return RespDTO.onSuc(res);
    }
}
