/** * 添加事件流 * * @return */ public String add() { int systemID = form.getSystemIDValue(); String eventFlowName = form.getEventFlowName(); String eventFlowDesc = form.getEventFlowDesc(); String[] ids = form.getEventID(); if (systemID == 0 || null == eventFlowName || "".equals(eventFlowName.trim()) || null == ids || "".equals(ids.length <= 0)) { return Action.SUCCESS; } List<EventFlowDTO> list = new ArrayList<EventFlowDTO>(); EventFlowDTO dto = null; for (int i = 0, len = ids.length; i < len; i++) { dto = new EventFlowDTO(); dto.setSystemID(systemID); dto.setEventFlowName(eventFlowName); dto.setEventFlowDesc(eventFlowDesc == null ? "" : eventFlowDesc); dto.setEventFlowStep(i + 1); dto.setFinalEventID(ids[i]); list.add(dto); } // 添加操作 service.addKVEventFlow(list); LogUtil.log(dto, "事件流-添加"); form.setTips("事件流添加成功!"); return "success_redirect"; }
/** * 删除事件流 * * @return */ public String delete() { int systemID = form.getSystemIDValue(); String eventFlowName = form.getEventFlowName(); if (systemID == 0 || null == eventFlowName || "".equals(eventFlowName.trim())) { return Action.SUCCESS; } EventFlowDTO dto = new EventFlowDTO(); dto.setSystemID(systemID); dto.setEventFlowName(eventFlowName); // 删除操作 service.deleteKVEventFlow(dto); LogUtil.log(dto, "事件流-删除"); return "success_redirect"; }