package com.lyms.hospital.controller;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.lyms.base.common.entity.organ.Organizations;
import com.lyms.base.common.entity.region.Regions;
import com.lyms.base.common.service.organ.OrganizationsService;
import com.lyms.base.common.service.region.RegionsService;
import com.lyms.hospital.entity.history.HistorySource;
import com.lyms.hospital.enums.business.ServiceStatusEnums;
import com.lyms.hospital.service.history.HistorySourceService;
import com.lyms.hospital.util.trans.OldDictionary;
import com.lyms.hospital.util.trans.XjhMapUtil;
import com.lyms.web.bean.AjaxResult;
import com.lyms.web.controller.BaseController;
/**
*
* 公用接口-前端控制器
*
*
* []查询病史配置
* 查询省市区数据
* 查询字典数据
* []获取当前服务器时间
* []获取医院数据
*
* @author xujiahong
* @since 2017-04-21
*/
@Controller
@RequestMapping("/commonApi")
public class CommonApiController extends BaseController {
@Autowired
private RegionsService regionService;
@Autowired
private HistorySourceService historySourceService;
@Autowired
private OrganizationsService orgService;
/**
* @Description:获取医院数据
* @param name
* @return
* 创建人:xujiahong
* 创建时间:2017年5月15日
* 修改人:
* 修改时间:
*/
@RequestMapping(value = "/queryHospitals", method = RequestMethod.GET)
@ResponseBody
public AjaxResult queryHospital(String name) {
List list = orgService.selectListByName(name);
List