package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.PacsConfigFacade;
import com.diagbot.vo.HosCodeVO;
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 java.util.Map;

/**
 * @Description:
 * @Author:zhaops
 * @time: 2019/3/12 10:50
 */
@RestController
@RequestMapping("/pacsConfig")
@Api(value = "辅检公表映射配置相关API", tags = { "辅检公表映射配置相关API" })
public class PacsConfigController {

    @Autowired
    PacsConfigFacade pacsConfigFacade;

    @ApiOperation(value = "根据医院编码查询辅检公表映射:[by:zhaops]",
            notes = "hosCode: 医院编码，必填<br>")
    @PostMapping("/getPacsConfigByHosCode")
    @SysLogger("getPacsConfigByHosCode")
    public RespDTO<Map<String, String>> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
        return RespDTO.onSuc(pacsConfigFacade.getPacsConfigByHosCode(hosCodeVO.getHosCode()));
    }
}