@RequestMapping(value = "/addrecord.html", method = RequestMethod.GET)
 public String addRecord(Map<String, Object> map) {
   map.put("currentuser", getCurrentUser());
   map.put("accesses", accessService.getAccesses());
   map.put("record", new Record());
   return "addrecord";
 }
 @RequestMapping(value = "/editrecord.html", method = RequestMethod.GET)
 public String editRecord(@RequestParam Map<String, Object> map, Map<String, Object> respMap) {
   String id = (String) map.get("id");
   respMap.put("errMesg", map.get("errMesg"));
   Integer recId = Integer.parseInt(id);
   Record record = recordService.getRecord(recId);
   if (record == null || !record.getUser().equals(getCurrentUser())) {
     return "redirect:/records.html";
   }
   List<FileView> fileDescription = fileDescriptionService.getFilesDescription(record);
   respMap.put("fileDescription", fileDescription);
   respMap.put("respMap", respMap);
   respMap.put("currentuser", getCurrentUser());
   respMap.put("accesses", accessService.getAccesses());
   respMap.put("record", record);
   return "addrecord";
 }
 /**
  * @param record
  * @param result
  * @return
  */
 @RequestMapping(value = "/addrecord.html", method = RequestMethod.POST)
 public String addRecord(
     @ModelAttribute("record") Record record, BindingResult result, Map<String, Object> map) {
   System.out.println("print id " + record.getId());
   try {
     record.setDate(new Date());
     record.setUser(getCurrentUser());
     record.setRecType(recordTypeService.getRecordType(1));
     recordService.saveOrUpdateRecord(record);
   } catch (Exception e) {
     e.printStackTrace();
     map.put("currentuser", getCurrentUser());
     map.put("accesses", accessService.getAccesses());
     map.put("record", new Record());
     return "addrecord";
   }
   return "redirect:/records.html";
 }