package com.diagbot.web;

import com.diagbot.annotation.SysLogger;
import com.diagbot.dto.RespDTO;
import com.diagbot.facade.IntroduceTitleConfigFacade;
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:56
 */
@RestController
@RequestMapping("/introduceTitleConfig")
@Api(value = "提示信息标题映射相关API", tags = { "提示信息标题映射相关API" })
public class IntroduceTitleConfigController {
    @Autowired
    IntroduceTitleConfigFacade introduceTitleConfigFacade;

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