Class MassIncidentAction

java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.plugin.bgb.getolt.action.incident.MassIncidentAction

public class MassIncidentAction extends BaseAction
Вкладка «Массовая авария» (ТЗ #11, Этап 1). Тонкий прокси к External API standalone-сервиса GetOLT v2 + сохранение выбора OLT/портов в text-параметр процесса. Никаких DTO — JSON ответы сервиса передаются клиенту как есть, выбор хранится тоже как JSON.
  • Constructor Details

    • MassIncidentAction

      public MassIncidentAction()
  • Method Details

    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception
      Description copied from class: BaseAction
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Overrides:
      unspecified in class BaseAction
      Parameters:
      form -
      conSet -
      Returns:
      Throws:
      Exception
    • oltList

      public org.apache.struts.action.ActionForward oltList(DynActionForm form, ConnectionSet conSet) throws Exception
      AJAX: список OLT с уже встроенными портами и счётчиками ONU. Источник — единый GET /olts/statistics (один HTTP-запрос на всё). Фильтрация по city/operator — на стороне ERP (case-insensitive). Нормализуем поля под фронт: добавляем totalOnu/activeOnu на корень каждого OLT и в каждый порт.
      Throws:
      Exception
    • cities

      public org.apache.struts.action.ActionForward cities(DynActionForm form, ConnectionSet conSet) throws Exception
      AJAX: подсказки по городам — уникальные значения поля city из /olts/statistics, отфильтрованные по substring-запросу. Учитывает оператора процесса (если передан).
      Throws:
      Exception
    • save

      public org.apache.struts.action.ActionForward save(DynActionForm form, ConnectionSet conSet) throws Exception
      AJAX: сохранить JSON-выбор OLT/портов в text-параметр процесса. Тело принимается через POST-параметр selection (URL-encoded JSON).
      Throws:
      Exception
    • refreshOlt

      public org.apache.struts.action.ActionForward refreshOlt(DynActionForm form, ConnectionSet conSet) throws Exception
      AJAX: попросить External API обновить OLT (FULL ключ).
      Throws:
      Exception