/** * 添加全量统计 * * @param ids * @return */ @RequestMapping(params = "save") @ResponseBody public AjaxJson save(FullStatisticsMonthEntity fullStatisticsMonth, HttpServletRequest request) { AjaxJson j = new AjaxJson(); if (StringUtil.isNotEmpty(fullStatisticsMonth.getId())) { message = "全量统计更新成功"; FullStatisticsMonthEntity t = fullStatisticsMonthService.get( FullStatisticsMonthEntity.class, fullStatisticsMonth.getId()); try { MyBeanUtils.copyBeanNotNull2Bean(fullStatisticsMonth, t); fullStatisticsMonthService.saveOrUpdate(t); systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO); } catch (Exception e) { e.printStackTrace(); message = "全量统计更新失败"; } } else { message = "全量统计添加成功"; fullStatisticsMonthService.save(fullStatisticsMonth); systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO); } j.setMsg(message); return j; }
/** * 全量统计列表页面跳转 * * @return */ @RequestMapping(params = "addorupdate") public ModelAndView addorupdate( FullStatisticsMonthEntity fullStatisticsMonth, HttpServletRequest req) { if (StringUtil.isNotEmpty(fullStatisticsMonth.getId())) { fullStatisticsMonth = fullStatisticsMonthService.getEntity( FullStatisticsMonthEntity.class, fullStatisticsMonth.getId()); req.setAttribute("fullStatisticsMonthPage", fullStatisticsMonth); } return new ModelAndView("com/jason/ddoWeb/statistics/fullStatisticsMonth"); }
/** * 删除全量统计 * * @return */ @RequestMapping(params = "del") @ResponseBody public AjaxJson del(FullStatisticsMonthEntity fullStatisticsMonth, HttpServletRequest request) { AjaxJson j = new AjaxJson(); fullStatisticsMonth = systemService.getEntity(FullStatisticsMonthEntity.class, fullStatisticsMonth.getId()); message = "全量统计删除成功"; fullStatisticsMonthService.delete(fullStatisticsMonth); systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO); j.setMsg(message); return j; }