@RequestMapping(params = "add")
public ModelAndView add(TSDepart depart, HttpServletRequest req) {
List<TSDepart> departList = systemService.getList(TSDepart.class);
req.setAttribute("departList", departList);
if (StringUtil.isNotEmpty(depart.getId())) {
TSDepart tspDepart = new TSDepart();
TSDepart tsDepart = new TSDepart();
depart = systemService.getEntity(TSDepart.class, depart.getId());
tspDepart.setId(depart.getId());
tspDepart.setDepartname(depart.getDepartname());
tsDepart.setTSPDepart(tspDepart);
req.setAttribute("depart", tsDepart);
}
return new ModelAndView("system/depart/depart");
}