public String flueSheetAddSubmit() { Authority auth = checkAuthority(buildResource(Modules.s_flueSheet_model, Operation.s_operation_add)); if (auth != null) { return auth.getName(); } try { if (m_uploadFile.getFile() != null) { int documentId = m_documentService.insertDocument(Modules.s_flueSheet_model, m_uploadFile); m_flueSheet.setDocumentId(documentId); } m_schedule.setType(getActionModule()); int scheduleId = m_scheduleService.insertSchedule(m_schedule); m_flueSheet.setScheduleId(scheduleId); int id = m_flueSheetService.insertFlueSheet(m_flueSheet); if (id > 0) { Log log = createLog(Modules.s_flueSheet_model, Operation.s_operation_add, m_flueSheet); m_logService.insertLog(log); return SUCCESS; } else { return ERROR; } } catch (Exception e) { m_logger.error(e.getMessage(), e); return ERROR; } }