Class ContractManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
bitel.billing.server.contract.bean.ContractManager
public class ContractManager
extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddContractGroup(int contractId, int groupId) Привязываем договор к группе.booleancheckContractService(int contractId, int serviceId, Date date) Проверка наличия на договоре услуги на указанную датуvoiddeleteContractGroup(int contractId, long groupId) Удаляем договор из группы.getContractById(int contractId) Возвращает договор по его кодуВозвращает Map содержащий коды групп параметров договоров и кол-ва договоров в каждой из них ("SELECT pgid, COUNT(*) FROM contract GROUP BY pgid")ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int cid, Calendar time, String module, int mid, boolean useChache) Deprecated.ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int cid, Calendar time, String module, int mid, int emid, int eid, boolean useChache) Deprecated.ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int cid, Date date, String module, int mid, boolean useChache) Создает TariffTreeSet для обсчета сессийru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int cid, Date time, String module, int mid, int emid, int eid, boolean useChache) Создает TariffTreeSet для обсчета сессийgetSubContracts(int contractId) Получает все субдоговоры данного договора.getSubContracts(int contractId, int subMode) Получает зависимые или независимые субдоговора данного договораru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetTariffTreeSetForDay(int contractId, LocalDate time, String module, int moduleId, boolean useChache) Создает TariffTreeSet для обработки одного дняru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetTariffTreeSetForDay(int contractId, Calendar time, String module, int moduleId, boolean useChache) Deprecated.booleanisSubContract(int cid, int subcid) Проверят зависимый ли контракт один от другого.voidupdateContract(Contract contract) Обновление записи о договореvoidupdateLastTariffChange(int cid) Deprecated.Вместо этого метода теперь будет добавление события на изменение тарифных плановMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLoggererror, error, error, getLogger, logError, logError, warn
- 
Constructor Details- 
ContractManager
 
- 
- 
Method Details- 
getContractByIdВозвращает договор по его коду- Parameters:
- contractId- код договора
- Returns:
 
- 
getRealtimeTariffTreeSetpublic ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int cid, Date date, String module, int mid, boolean useChache) Создает TariffTreeSet для обсчета сессий- Parameters:
- module- String
- mid- int
- useChache- boolean
- contract- BGContract
 
- 
getRealtimeTariffTreeSet@Deprecated public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int cid, Calendar time, String module, int mid, boolean useChache) Deprecated.
- 
getRealtimeTariffTreeSet@Deprecated public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int cid, Calendar time, String module, int mid, int emid, int eid, boolean useChache) Deprecated.
- 
getRealtimeTariffTreeSetpublic ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int cid, Date time, String module, int mid, int emid, int eid, boolean useChache) Создает TariffTreeSet для обсчета сессий- Parameters:
- module- String
- mid- int
- useChache- boolean
- contract- BGContract
 
- 
getTariffTreeSetForDay@Deprecated public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getTariffTreeSetForDay(int contractId, Calendar time, String module, int moduleId, boolean useChache) Deprecated.
- 
getTariffTreeSetForDaypublic ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getTariffTreeSetForDay(int contractId, LocalDate time, String module, int moduleId, boolean useChache) throws Exception Создает TariffTreeSet для обработки одного дня- Throws:
- Exception
 
- 
getSubContractsПолучает все субдоговоры данного договора.- Parameters:
- contractId- код договора.
- Returns:
- список субдоговоров.
- Throws:
- SQLException
 
- 
isSubContractПроверят зависимый ли контракт один от другого.- Parameters:
- cid- договор
- subcid- потенциальный зависимый субконтракт.
- Returns:
- true - зависимость есть.
- Throws:
- SQLException
 
- 
getSubContractsПолучает зависимые или независимые субдоговора данного договора- Parameters:
- contractId-
- subMode- зависимый или независимый режим из KernelConst
- Returns:
 
- 
updateLastTariffChangeDeprecated.Вместо этого метода теперь будет добавление события на изменение тарифных планов- Parameters:
- cid-
 
- 
updateContractОбновление записи о договоре- Parameters:
- contract-
 
- 
addContractGrouppublic void addContractGroup(int contractId, int groupId) throws ru.bitel.bgbilling.common.BGException Привязываем договор к группе.- Parameters:
- contractId- код договора
- groupId- код группы
- Throws:
- SQLException
- ru.bitel.bgbilling.common.BGException
 
- 
deleteContractGrouppublic void deleteContractGroup(int contractId, long groupId) throws ru.bitel.bgbilling.common.BGException Удаляем договор из группы.- Parameters:
- contractId- код договора
- groupId- код группы
- Throws:
- SQLException
- ru.bitel.bgbilling.common.BGException
 
- 
getContractParameterGroupCountMappublic Map<Integer,Integer> getContractParameterGroupCountMap() throws ru.bitel.bgbilling.common.BGExceptionВозвращает Map содержащий коды групп параметров договоров и кол-ва договоров в каждой из них ("SELECT pgid, COUNT(*) FROM contract GROUP BY pgid")- Returns:
- Mapinvalid input: '<'Integer, Integer> в какой группе сколько договоров
- Throws:
- ru.bitel.bgbilling.common.BGException
 
- 
checkContractServicepublic boolean checkContractService(int contractId, int serviceId, Date date) throws ru.bitel.bgbilling.common.BGException Проверка наличия на договоре услуги на указанную дату- Parameters:
- contractId- код договора
- serviceId- код услуги
- date- дата
- Returns:
- true - если услуга есть, false - услуги нет или дата вне периода
- Throws:
- ru.bitel.bgbilling.common.BGException
 
 
-