package com.glxp.mipsdl.controller;

import com.glxp.mipsdl.config.HospConfig;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.util.DictUtl;
import com.glxp.mipsdl.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 字典接口
 */
@Slf4j
@RestController
public class DictController {

    @Resource
    private HospConfig hospConfig;

    /**
     * 获取医院字典列表
     *
     * @return
     */
    @GetMapping("/udiwms/erp/getHostDictList")
    public BaseResponse getHostDictList() {
        return ResultVOUtils.success(DictUtl.HOSP_DICT);
    }

    /**
     * 获取当前医院信息
     *
     * @return
     */
    @GetMapping("/udiwms/erp/getCurrentHospInfo")
    public BaseResponse getCurrentHospInfo() {
        return ResultVOUtils.success(hospConfig.getHospConfig());
    }

}
