Class ContractManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstractDaoConstant
bitel.billing.server.contract.bean.ContractManager
public class ContractManager
extends ru.bitel.bgbilling.common.dao.AbstractDaoConstant
-
Field Summary
Fields inherited from class ru.bitel.bgbilling.common.dao.AbstractDaoConstant
con, ERROR, fields, moduleId, SQL_ALL, SQL_AND, 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, tableName -
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 contractId, Calendar time, String module, int moduleId, boolean useChache) Deprecated.ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int contractId, Calendar time, String module, int moduleId, int emid, int eid, boolean useChache) Deprecated.ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int contractId, Date date, String module, int moduleId, boolean useChache) Создает TariffTreeSet для обсчета сессийru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSetgetRealtimeTariffTreeSet(int contractId, Date time, String module, int moduleId, 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.common.dao.AbstractDaoConstant
getPeriod, getPlaceholders, getSQLOrder, getSQLOrderFields, getTableName, psSetDate, psSetDateOrNull, psSetInt, psSetIntOrNull, psSetPeriod, psSetString, psSetStringOrNull, psSetTimestampOrNull, queryAndIn, setStatementParam, sqlDelete, sqlDeleteBatch, sqlInsert, sqlInsertBatch, sqlInsertGetId, sqlInsertOnDuplicateKeyUpdate, sqlInsertUpdateById, sqlUpdate, sqlUpdateBatchMethods 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 contractId, Date date, String module, int moduleId, boolean useChache) Создает TariffTreeSet для обсчета сессий- Parameters:
module- StringuseChache- booleancontract- BGContractmid- int
-
getRealtimeTariffTreeSet
@Deprecated public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int contractId, Calendar time, String module, int moduleId, boolean useChache) Deprecated. -
getRealtimeTariffTreeSet
@Deprecated public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int contractId, Calendar time, String module, int moduleId, int emid, int eid, boolean useChache) Deprecated. -
getRealtimeTariffTreeSet
public ru.bitel.bgbilling.kernel.tariff.server.tree.TariffTreeSet getRealtimeTariffTreeSet(int contractId, Date time, String module, int moduleId, int emid, int eid, boolean useChache) Создает TariffTreeSet для обсчета сессий- Parameters:
module- StringuseChache- booleancontract- BGContractmid- int
-
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
Привязываем договор к группе.- Parameters:
contractId- код договораgroupId- код группы- Throws:
SQLException
-
deleteContractGroup
Удаляем договор из группы.- Parameters:
contractId- код договораgroupId- код группы- Throws:
SQLException
-
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
-