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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContractGroup(int contractId, int groupId) Привязываем договор к группе.booleancheckContractService(int contractId, int serviceId, Date date) Проверка наличия на договоре услуги на указанную датуvoiddeleteContractGroup(int contractId, long groupId) Удаляем договор из группы.Возвращает 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 для обсчета сессийru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetTariffTreeSetForDay(int contractId, LocalDate time, String module, int moduleId, boolean useChache) Создает TariffTreeSet для обработки одного дняMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warn
-
Constructor Details
-
ContractManager
-
-
Method Details
-
getRealtimeTariffTreeSet
public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int cid, Date date, String module, int mid, boolean useChache) Создает TariffTreeSet для обсчета сессий- Parameters:
module- Stringmid- intuseChache- booleancontract- 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. -
getRealtimeTariffTreeSet
public 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- Stringmid- intuseChache- booleancontract- BGContract
-
getTariffTreeSetForDay
public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getTariffTreeSetForDay(int contractId, LocalDate time, String module, int moduleId, boolean useChache) throws Exception Создает TariffTreeSet для обработки одного дня- Throws:
Exception
-
addContractGroup
public void addContractGroup(int contractId, int groupId) throws ru.bitel.bgbilling.common.BGException Привязываем договор к группе.- Parameters:
contractId- код договораgroupId- код группы- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
deleteContractGroup
public void deleteContractGroup(int contractId, long groupId) throws ru.bitel.bgbilling.common.BGException Удаляем договор из группы.- Parameters:
contractId- код договораgroupId- код группы- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
getContractParameterGroupCountMap
public 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
-
checkContractService
public 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
-