@RequestMapping("xzKzList-info-input") public String input(@RequestParam(value = "id", required = false) Long id, Model model) { if (id != null) { XzKzList xzKzList = xzKzListManager.get(id); model.addAttribute("model", xzKzList); } // model.addAttribute("deptList",orgDepartmentManager.getAll()); model.addAttribute("ryMap", CommRyMapUtil.getRyMap()); model.addAttribute("xmMap", PjXmMapUtil.getXmMap()); return "xz/xzKzList-info-input"; }
@RequestMapping("xzKzList-info-save") public String save( @ModelAttribute XzKzList xzKzList, @RequestParam Map<String, Object> parameterMap, RedirectAttributes redirectAttributes) { XzKzList dest = null; Long id = xzKzList.getFid(); if (id != null) { dest = xzKzListManager.get(id); beanMapper.copy(xzKzList, dest); } else { dest = xzKzList; } xzKzListManager.save(dest); // yinzhangManager.save(entity); messageHelper.addFlashMessage(redirectAttributes, "core.success.save", "保存成功"); return "redirect:/xz/xzKzList-info-list.do"; }