public String pumpingStationAdd() {
    m_tunnels = m_tunnelService.queryAllTunnels();

    if (m_tunnelId == 0) {
      m_tunnelId = m_tunnelService.queryDefaultTunnelId();
    }
    m_tunnelSections =
        m_tunnelSectionService.queryLimitedTunnelSectionsByTunnelId(
            m_tunnelId, 0, Integer.MAX_VALUE);
    m_constructionUnits = m_constructionUnitService.queryAllConstructionUnits();
    return SUCCESS;
  }
  public String pumpingStationList() {
    Authority auth =
        checkAuthority(buildResource(Modules.s_pumpingStation_model, Operation.s_operation_detail));
    if (auth != null) {
      return auth.getName();
    }
    try {
      if (m_tunnelId == 0) {
        m_tunnelId = m_tunnelService.queryDefaultTunnelId();
      }
      m_tunnels = m_tunnelService.queryAllTunnels();
      m_tunnelSections =
          m_tunnelSectionService.queryLimitedTunnelSectionsByTunnelId(
              m_tunnelId, 0, Integer.MAX_VALUE);

      m_totalSize =
          m_pumpingStationService.querySizeByTunnelAndSection(m_tunnelId, m_tunnelSectionId);
      m_totalPages = computeTotalPages(m_totalSize);
      int start = (m_index - 1) * SIZE;
      if (start < 0) {
        start = 0;
      }
      m_pumpingStations =
          m_pumpingStationService.queryLimitedPumpingStations(
              m_tunnelId, m_tunnelSectionId, start, SIZE);
      for (PumpingStation pumpingStation : m_pumpingStations) {
        pumpingStation.setTunnel(m_tunnelService.findByPK(pumpingStation.getTunnelId()));
        int scheduleId = pumpingStation.getScheduleId();
        if (scheduleId > 0) {
          Schedule schedule = m_scheduleService.findByPK(scheduleId);
          if (schedule != null) {
            pumpingStation.setSchedule(schedule);
            schedule.setConstructionUnit(
                m_constructionUnitService.findByPK(schedule.getConstructionUnitId()));
          }
        }
        if (pumpingStation.getDocumentId() > 0) {
          pumpingStation.setDocument(m_documentService.findByPK(pumpingStation.getDocumentId()));
        }
      }
      return SUCCESS;
    } catch (Exception e) {
      m_logger.error(e.getMessage(), e);
      return ERROR;
    }
  }
  public String pumpingStationUpdate() {
    try {
      m_pumpingStation = m_pumpingStationService.findByPK(m_pumpingStationId);
      m_tunnels = m_tunnelService.queryAllTunnels();
      m_tunnelSections =
          m_tunnelSectionService.queryLimitedTunnelSectionsByTunnelId(
              m_pumpingStation.getTunnelId(), 0, Integer.MAX_VALUE);
      m_schedule = m_scheduleService.findByPK(m_pumpingStation.getScheduleId());
      m_constructionUnits = m_constructionUnitService.queryAllConstructionUnits();
      int documentId = m_pumpingStation.getDocumentId();

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