Class ContractTariffDAO
java.lang.Object
ru.bgcrm.plugin.bgbilling.dao.BillingDAO
ru.bgcrm.plugin.bgbilling.proto.dao.ContractTariffDAO
-
Field Summary
Fields inherited from class BillingDAO
dbInfo, jsonMapper, jsonTypeFactory, transferData, user -
Constructor Summary
ConstructorsConstructorDescriptionContractTariffDAO(User user, String billingId) ContractTariffDAO(User user, DBInfo dbInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateContractOption(int contractId, int optionId, int modeId, boolean web) activateModeList(int contractId, int optionId) voidaddTariffPlan(int contractId, int tariffId, int position) contractAvailableOptionList(int contractId) Returns the list of available tariff optionscontractPersonalTariffList(int contractId) Returns the contract's personal tariffscontractTariffGroupList(int contractId) Deprecated.contractTariffList(int contractId) Returns the contract's tariff listcontractTariffOptionHistory(int contractId) Returns the history of tariff options on the contractcontractTariffOptionList(int contractId) Returns the contract's tariff optionsvoiddeactivateContractOption(int contractId, int id) Deactivates a tariff option on the contractvoiddeleteContractPersonalTariff(int contractId, int id) voiddeleteContractTariffGroup(int tariffId) voiddeleteContractTariffPlan(int contractId, int id) Deletes a contract tariffgetContractTariffGroup(int id) Deprecated.getContractTariffPlan(int id, int moduleId, int contractId, boolean useFilter, boolean showUsed, boolean contractGroupFilter, List<IdTitle> tariffList) Returns the contract's tariff plan and fills the directory of available tariffsgetContractTariffPlan(int id, int moduleId, int contractId, boolean useFilter, boolean showUsed, List<IdTitle> tariffList) Deprecated.getPersonalTariff(int id) Returns a contract's personal tariffvoidreactivateContractOption(int contractId, int id) voidsetTariffPlan(int contractId, int tariffId) voidupdateContractPersonalTariff(int contractId, int tariffId, String title, int position, String dateFrom, String dateTo) voidupdateContractTariffGroup(int contractId, int id, int tariffGroupId, String dateFrom, String dateTo, String comment) Deprecated.voidupdateContractTariffGroup(int id, int contractId, int tariffGroupId, Date dateFrom, Date dateTo, String comment) Deprecated.voidupdateContractTariffPlan(int contractId, int id, int tpid, int position, String dateFrom, String dateTo, String comment) Updates or adds a contract tariffMethods inherited from class BillingDAO
doRequest, getDbInfo, getPage, getVersion, linesToString, readJsonValue, setPage
-
Constructor Details
-
ContractTariffDAO
-
ContractTariffDAO
-
-
Method Details
-
addTariffPlan
public void addTariffPlan(int contractId, int tariffId, int position) -
setTariffPlan
public void setTariffPlan(int contractId, int tariffId) -
contractTariffList
Returns the contract's tariff list- Parameters:
contractId- the contract ID- Returns:
- the tariff list
-
getContractTariffPlan
public ContractTariff getContractTariffPlan(int id, int moduleId, int contractId, boolean useFilter, boolean showUsed, boolean contractGroupFilter, List<IdTitle> tariffList) Returns the contract's tariff plan and fills the directory of available tariffs- Parameters:
id- the record ID, -1 if a new tariff is being added and only the directories are neededmoduleId- the module instance IDcontractId- the contract IDuseFilter- the filter by contracts for the offered tariffsshowUsed- whether to show only used tariffstariffList- the list to load the tariff list into, ornullif not needed- Returns:
- the tariff plan
-
getContractTariffPlan
@Deprecated public ContractTariff getContractTariffPlan(int id, int moduleId, int contractId, boolean useFilter, boolean showUsed, List<IdTitle> tariffList) Deprecated. -
updateContractTariffPlan
public void updateContractTariffPlan(int contractId, int id, int tpid, int position, String dateFrom, String dateTo, String comment) Updates or adds a contract tariff- Parameters:
contractId- the contract IDid- the tariff record ID, -1 to addtpid- the tariff plan IDposition- the positiondateFrom- the start datedateTo- the end datecomment- the comment
-
deleteContractTariffPlan
public void deleteContractTariffPlan(int contractId, int id) Deletes a contract tariff- Parameters:
contractId- the contract IDid- the tariff plan record ID
-
contractTariffGroupList
Deprecated.Returns the list of all tariff groups on the contract- Parameters:
contractId- the contract ID- Returns:
- the tariff group list
-
getContractTariffGroup
Deprecated.Returns the contract's tariff group- Parameters:
id- the record ID- Returns:
- the tariff group
-
updateContractTariffGroup
@Deprecated public void updateContractTariffGroup(int id, int contractId, int tariffGroupId, Date dateFrom, Date dateTo, String comment) Deprecated.Updates or adds a contract tariff group- Parameters:
id- <= 0 to add a tariff group, otherwise the ID of the record being changedcontractId- the contract IDtariffGroupId- the tariff group IDdateFrom- the start datedateTo- the end datecomment- the comment
-
updateContractTariffGroup
@Deprecated public void updateContractTariffGroup(int contractId, int id, int tariffGroupId, String dateFrom, String dateTo, String comment) Deprecated. -
deleteContractTariffGroup
public void deleteContractTariffGroup(int tariffId) -
contractTariffOptionList
Returns the contract's tariff options- Parameters:
contractId- the contract ID- Returns:
- the tariff option list
-
contractTariffOptionHistory
Returns the history of tariff options on the contract- Parameters:
contractId- the contract ID- Returns:
- the tariff option list
-
contractAvailableOptionList
-
activateModeList
-
activateContractOption
public void activateContractOption(int contractId, int optionId, int modeId, boolean web) -
reactivateContractOption
public void reactivateContractOption(int contractId, int id) -
deactivateContractOption
public void deactivateContractOption(int contractId, int id) Deactivates a tariff option on the contract- Parameters:
contractId- the contract IDid- the option ID
-
contractPersonalTariffList
Returns the contract's personal tariffs- Parameters:
contractId- the contract ID- Returns:
- the personal tariff list
-
getPersonalTariff
Returns a contract's personal tariff- Parameters:
id- the tariff ID- Returns:
- the personal tariff
-
deleteContractPersonalTariff
public void deleteContractPersonalTariff(int contractId, int id) -
updateContractPersonalTariff
-