コード例 #1
0
 @Login(Login.ResultTypeEnum.json)
 @RequestMapping("/getInfoById")
 @ResponseBody
 public String getInfoById(int id) {
   HospitalBean hospitalBean = this.hospitalService.getHospitalById(id);
   return JsonUtils.ObjtoJson(hospitalBean);
 }
コード例 #2
0
 @Login(Login.ResultTypeEnum.json)
 @RequestMapping("/showList")
 @ResponseBody
 public String showList() {
   EasyUIDateGrid easyUIDateGrid = new EasyUIDateGrid(hospitalService.getAllHospital());
   return JsonUtils.ObjtoJson(easyUIDateGrid);
 }
コード例 #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);
 }