コード例 #1
0
  public String flueSheetDelete() {
    Authority auth =
        checkAuthority(buildResource(Modules.s_flueSheet_model, Operation.s_operation_delete));
    if (auth != null) {
      return auth.getName();
    }
    try {
      m_flueSheet = m_flueSheetService.findByPK(m_flueSheetId);
      m_documentService.deleteDocument(m_flueSheet.getDocumentId());
      m_scheduleService.deleteSchedule(m_flueSheet.getScheduleId());
      int count = m_flueSheetService.deleteFlueSheet(m_flueSheetId);
      if (count > 0) {
        Log log = createLog(Modules.s_flueSheet_model, Operation.s_operation_delete, m_flueSheetId);

        m_logService.insertLog(log);
        return SUCCESS;
      } else {
        return ERROR;
      }
    } catch (Exception e) {
      m_logger.error(e.getMessage(), e);
      return ERROR;
    }
  }
コード例 #2
0
  public String flueSheetUpdate() {
    try {
      m_flueSheet = m_flueSheetService.findByPK(m_flueSheetId);
      m_tunnels = m_tunnelService.queryAllTunnels();
      m_tunnelSections =
          m_tunnelSectionService.queryLimitedTunnelSectionsByTunnelId(
              m_flueSheet.getTunnelId(), 0, Integer.MAX_VALUE);
      m_schedule = m_scheduleService.findByPK(m_flueSheet.getScheduleId());
      m_constructionUnits = m_constructionUnitService.queryAllConstructionUnits();
      int documentId = m_flueSheet.getDocumentId();

      if (documentId > 0) {
        m_flueSheet.setDocument(m_documentService.findByPK(m_flueSheet.getDocumentId()));
      }
      if (m_flueSheet != null) {
        return SUCCESS;
      } else {
        return ERROR;
      }
    } catch (Exception e) {
      m_logger.error(e.getMessage(), e);
      return ERROR;
    }
  }