Exemplo n.º 1
0
 @Login(Login.ResultTypeEnum.json)
 @RequestMapping("/getInfoById")
 @ResponseBody
 public String getInfoById(int id) {
   HospitalBean hospitalBean = this.hospitalService.getHospitalById(id);
   return JsonUtils.ObjtoJson(hospitalBean);
 }
Exemplo n.º 2
0
 @Login(Login.ResultTypeEnum.json)
 @RequestMapping("/showList")
 @ResponseBody
 public String showList() {
   EasyUIDateGrid easyUIDateGrid = new EasyUIDateGrid(hospitalService.getAllHospital());
   return JsonUtils.ObjtoJson(easyUIDateGrid);
 }
Exemplo n.º 3
0
 @Login(Login.ResultTypeEnum.json)
 @RequestMapping("/showComboBoxList")
 @ResponseBody
 public String showComboBoxList(
     @RequestParam(value = "currentId", defaultValue = "-1") int currentId) {
   List<HospitalBean> hospitalBeanList = this.hospitalService.getAllHospital();
   List<EasyUIComboBox> easyUIComboBoxList = new ArrayList<EasyUIComboBox>();
   for (HospitalBean hospitalBean : hospitalBeanList) {
     EasyUIComboBox easyUIComboBox =
         new EasyUIComboBox(hospitalBean.getId() + "", hospitalBean.getName());
     if (currentId > 0 && hospitalBean.getId() == currentId) {
       easyUIComboBox.setSelected(true);
     }
     easyUIComboBoxList.add(easyUIComboBox);
   }
   return JsonUtils.ObjtoJson(easyUIComboBoxList);
 }