/** 保存新建工作组信息 */ @Action("work-group-saveWorkGroup") public String saveWorkGroup() throws Exception { boolean logSign = true; // 该字段只是为了标识日志信息:true表示新建工作组、false表示修改工作组 if (id == null) { Company company = companyManager.getCompany(companyId); workGroup.setCompany(company); workGroupManager.saveWorkGroup(workGroup); } else { workGroupManager.saveWorkGroup(workGroup); logSign = false; } if (logSign) { ApiFactory.getBussinessLogService() .log("工作组管理", "新建工作组:" + workGroup.getName(), ContextUtils.getSystemId("acs")); } else { ApiFactory.getBussinessLogService() .log("工作组管理", "修改工作组:" + workGroup.getName(), ContextUtils.getSystemId("acs")); } addSuccessMessage("保存成功"); return null; }
@Override @Action("work-group-delete") public String delete() throws Exception { String logSign = ""; // 该字段只是为了标识日志信息:工作组名称 String[] str = ides.split(","); for (String sid : str) { workGroup = workGroupManager.getWorkGroup(Long.valueOf(sid)); workGroupManager.cleanWorkGroup(workGroup.getId()); if (StringUtils.isNotEmpty(logSign)) { logSign += ","; } logSign += workGroup.getName(); workGroupManager.deleteWorkGroup(Long.valueOf(sid)); } ApiFactory.getBussinessLogService() .log("工作组管理", "删除工作组:" + logSign, ContextUtils.getSystemId("acs")); this.renderText("ok"); return null; }