Class RegisterTaskManager

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<B>
ru.bitel.bgbilling.common.dao.AbstractIdDao<RegisterTask>
ru.bitel.bgbilling.plugins.crm.server.dao.RegisterTaskManager

public class RegisterTaskManager extends ru.bitel.bgbilling.common.dao.AbstractIdDao<RegisterTask>
  • Field Summary

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    con, moduleId, orderByPattern, tableName

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    ERROR, fields, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteTask(int id)
    Удаление задачи из БД
    void
    deleteTasksByContractId(int contractId)
     
    getAfterDateTaskList(int contractId, Calendar fromDate)
    Получение списка задач договора с датой открытие более или равной fromDate
    protected RegisterTask
     
    getNoClosedTaskList(int contractId)
    Получение списка не закрытых задач для договора
    getRegisterTaskLog(int taskId)
    Получение лога изменений статусов задач
     
     
    getTaskById(int id)
    Получение задачи по ее коду в БД
    int
    getTaskCount(ru.bitel.bgbilling.plugins.crm.server.model.TaskFilter filter)
    Получение количества задач по определенному фильтру
    getTaskList(ru.bitel.bgbilling.plugins.crm.server.model.TaskFilter filter, Page page)
     
    void
    Загрузка кодов исполнителей для задачи, далее доступны по методу getExecutors()
    void
    Обновление исполнителей задачи
    protected void
    updateImpl(RegisterTask registerTask)
     
    void
    updateTask(RegisterTask task, int userId)
    Обновление задачи в БД
    void
    updateTaskLog(RegisterTask task, int userId)
    метод обновления таблицы логов задачи

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractIdDao

    delete, executeUpdate, get, getAndDelete, getAndUpdate, opt, sqlCommand, sqlCommandAndTable, sqlQuery, sqlWhereId

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, setStatementParam, update

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    getSQLOrder

    Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

    error, error, error, getLogger, logError, logError

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RegisterTaskManager

      public RegisterTaskManager(Connection con)
  • Method Details

    • getTaskById

      public RegisterTask getTaskById(int id) throws SQLException
      Получение задачи по ее коду в БД
      Parameters:
      id - - код задачи
      Returns:
      объект с данными о задаче с указанным id
      Throws:
      SQLException
    • loadExecutorList

      public void loadExecutorList(RegisterTask task) throws SQLException
      Загрузка кодов исполнителей для задачи, далее доступны по методу getExecutors()
      Parameters:
      task -
      Throws:
      SQLException
    • getStatusMap

      public static Map<Integer,String> getStatusMap(String values)
    • updateExecutorList

      public void updateExecutorList(RegisterTask task) throws SQLException
      Обновление исполнителей задачи
      Parameters:
      task - - задача, список исполнителей должен быть установлен через task.setExecutors()
      Throws:
      SQLException
    • updateTask

      public void updateTask(RegisterTask task, int userId) throws SQLException
      Обновление задачи в БД
      Parameters:
      task - - код с id существующей задачи либо -1 - для создаваемой
      Throws:
      SQLException
    • updateTaskLog

      public void updateTaskLog(RegisterTask task, int userId) throws SQLException
      метод обновления таблицы логов задачи
      Parameters:
      task - Задача, у которой изменился статус
      userId - Пользователь, изменивший статус задачи
      Throws:
      SQLException
    • getRegisterTaskLog

      public List<RegisterTask> getRegisterTaskLog(int taskId) throws SQLException
      Получение лога изменений статусов задач
      Parameters:
      taskId - код задачи
      Returns:
      Список измений статусов
      Throws:
      SQLException
    • deleteTask

      public void deleteTask(int id) throws SQLException
      Удаление задачи из БД
      Parameters:
      id -
      Throws:
      SQLException
    • deleteTasksByContractId

      public void deleteTasksByContractId(int contractId) throws SQLException
      Throws:
      SQLException
    • getTaskCount

      public int getTaskCount(ru.bitel.bgbilling.plugins.crm.server.model.TaskFilter filter) throws SQLException
      Получение количества задач по определенному фильтру
      Parameters:
      filter -
      Returns:
      количество задач соответствующих заданому фильтру
      Throws:
      SQLException
    • getAfterDateTaskList

      public List<RegisterTask> getAfterDateTaskList(int contractId, Calendar fromDate) throws SQLException
      Получение списка задач договора с датой открытие более или равной fromDate
      Parameters:
      contractId - - код договора
      fromDate -
      Returns:
      список задач
      Throws:
      SQLException
    • getNoClosedTaskList

      public List<RegisterTask> getNoClosedTaskList(int contractId) throws SQLException
      Получение списка не закрытых задач для договора
      Parameters:
      contractId -
      Returns:
      список задач
      Throws:
      SQLException
    • getTaskList

      public List<PersonalRegisterTask> getTaskList(ru.bitel.bgbilling.plugins.crm.server.model.TaskFilter filter, Page page) throws Exception
      Throws:
      Exception
    • getRegisterTaskTypeList

      public List<RegisterTaskType> getRegisterTaskTypeList(Set<Integer> groups) throws Exception
      Throws:
      Exception
    • getFromRS

      protected RegisterTask getFromRS(ResultSet rs) throws SQLException
      Specified by:
      getFromRS in class ru.bitel.bgbilling.common.dao.AbstractDao<RegisterTask>
      Throws:
      SQLException
    • updateImpl

      protected void updateImpl(RegisterTask registerTask) throws SQLException
      Specified by:
      updateImpl in class ru.bitel.bgbilling.common.dao.AbstractDao<RegisterTask>
      Throws:
      SQLException