Class ContractDAO
java.lang.Object
ru.bgcrm.plugin.bgbilling.dao.BillingDAO
ru.bgcrm.plugin.bgbilling.proto.dao.ContractDAO
- Direct Known Subclasses:
ContractDAO8x
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static enum
static class
static class
static class
-
Field Summary
Fields inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO
COMMENT, DATE_1, DATE_2, dbInfo, jsonMapper, jsonTypeFactory, PARAMETERS, TITLE, transferData, user, VALUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
ContractDAO
(User user, String billingId) protected
ContractDAO
(User user, DBInfo dbInfo) -
Method Summary
Modifier and TypeMethodDescriptionadditionalActionList
(int contractId) void
addSearchResult
(Pageable<Contract> result, Page page, Request req) void
addSubcontract
(int superContractId, int subContractId) Deprecated.void
bgbillingOpenContract
(int contractId) void
bgbillingUpdateContractTitleAndComment
(int contractId, String comment, int patid) void
copyObjectParamsToContract
(Connection con, String copyParamsMapping, int objectId, int contractId, Customer customer) static void
copyParametersToAllContracts
(Connection con, User user, int customerId) void
copyParametersToBilling
(Connection con, int customerId, int contractId, String title) createContract
(int patternId, String date, String title, String titlePattern) createContract
(int patternId, String date, String title, String titlePattern, int superId) void
deleteLimitTask
(int contractId, int id) void
deleteMemo
(int contractId, int memoId) executeAdditionalAction
(int contractId, int actionId) void
faceLog
(Pageable<ContractFace> result, int contractId) getAdditionalActionList
(int contractId) Deprecated.getContractAddress
(int contractId) getContractById
(int contractId) byte[]
getContractCard2Pdf
(int contractId, String type) getContractCardDoc
(int contractId) getContractCardTypes
(int contractId) getContractFullCard
(int contractId) getContractInfo
(int contractId) getContractLabelTreeItemList
(int contractId) int
getContractLimitManage
(int contractId) Определение текущего режима управления лимитом по договору из страницы статистикиgetContractStatisticPassword
(int contractId) static ContractDAO
getInstance
(User user, String billingId) static ContractDAO
getInstance
(User user, DBInfo dbInfo) getMemo
(int contractId, int memoId) getMemoList
(int contractId) Возвращает большиство актуальных данных о договоре.getParameterList
(int parameterTypeId) getStreetsByCity
(int cityId) getSubContracts
(int contractId) Deprecated.void
getWebContractLogonLog
(Pageable<ContractDAO.WebContractLogonLogEntry> searchResult, int contractId, ContractDAO.WebContractLogonLogType type, Date date1, Date date2) groupsGet
(int contractId) limit
(int contractId, Pageable<LimitLogItem> log, List<LimitChangeTask> taskList) void
modeLog
(Pageable<ContractMode> result, int contractId) moduleList
(int contractId) void
searchContractByAddressParam
(Pageable<ParameterSearchedObject<Contract>> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, int streetId, int houseId, String house, String flat, String room) void
searchContractByDateParam
(Pageable<Contract> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, Date dateFrom, Date dateTo) void
searchContractByEmailParam
(Pageable<Contract> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, String email) void
searchContractByObjectAddressParam
(Pageable<ParameterSearchedObject<Contract>> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, int streetId, String house, String flat, String room) Осуществляет поиск договоров по адресным параметам объекта, либо заданным аргументом, либо, если таковых нет, определяет адресный параметр объекта в конфигурции биллинга.void
searchContractByPhoneParam
(Pageable<Contract> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, String phone) void
searchContractByTextParam
(Pageable<Contract> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, String value) void
searchContractByTitleComment
(Pageable<IdTitle> searchResult, String title, String comment, ContractDAO.SearchOptions searchOptions) void
updateContractDateTo
(int contractId, Date date) void
updateContractLimitManage
(int contractId, int mode) Изменение текущего режима управления лимитом по договору из страницы статистики.void
updateContractPassword
(int contractId, String value, boolean generate) void
updateFace
(int contractId, int face) void
updateGroup
(String command, int contractId, int groupId) void
updateLimit
(int contractId, BigDecimal limit, int days, String comment) void
updateMemo
(int contractId, int memoId, String memoTitle, String memoText) void
updateMemo
(int contractId, int memoId, String memoTitle, String memoText, boolean visible) void
updateMode
(int contractId, int mode) void
updateModule
(int contractId, int moduleId, String command) Methods inherited from class ru.bgcrm.plugin.bgbilling.dao.BillingDAO
doRequest, getDbInfo, getPage, getParameterId, getVersion, linesToString, readJsonValue, setPage
-
Field Details
-
KERNEL_CONTRACT_API
- See Also:
-
KERNEL_CONTRACT_LIMIT
- See Also:
-
-
Constructor Details
-
ContractDAO
-
ContractDAO
-
-
Method Details
-
getInstance
-
getInstance
-
getContractById
-
searchContractByTitleComment
public void searchContractByTitleComment(Pageable<IdTitle> searchResult, String title, String comment, ContractDAO.SearchOptions searchOptions) -
updateContractDateTo
-
searchContractByObjectAddressParam
public void searchContractByObjectAddressParam(Pageable<ParameterSearchedObject<Contract>> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, int streetId, String house, String flat, String room) Осуществляет поиск договоров по адресным параметам объекта, либо заданным аргументом, либо, если таковых нет, определяет адресный параметр объекта в конфигурции биллинга.- Parameters:
result
-options
-paramIds
- - необязательный параметр, коды адресных параметровstreetId
-house
-flat
-room
-
-
searchContractByAddressParam
public void searchContractByAddressParam(Pageable<ParameterSearchedObject<Contract>> result, ContractDAO.SearchOptions options, Set<Integer> paramIds, int streetId, int houseId, String house, String flat, String room) -
searchContractByTextParam
-
searchContractByPhoneParam
-
searchContractByDateParam
-
searchContractByEmailParam
-
addSearchResult
-
createContract
public Contract createContract(int patternId, String date, String title, String titlePattern) throws BGMessageException - Throws:
BGMessageException
-
createContract
public Contract createContract(int patternId, String date, String title, String titlePattern, int superId) throws BGMessageException - Throws:
BGMessageException
-
getMemoList
Возвращает большиство актуальных данных о договоре.- Parameters:
contractId
-- Returns:
-
getMemo
-
updateMemo
-
updateMemo
-
deleteMemo
public void deleteMemo(int contractId, int memoId) -
faceLog
-
updateFace
public void updateFace(int contractId, int face) -
modeLog
-
updateMode
public void updateMode(int contractId, int mode) -
getContractLabelTreeItemList
-
groupsGet
-
updateGroup
-
additionalActionList
-
executeAdditionalAction
-
moduleList
-
updateModule
- Throws:
BGMessageException
-
limit
-
updateLimit
-
deleteLimitTask
public void deleteLimitTask(int contractId, int id) -
getContractStatisticPassword
-
getContractAddress
-
updateContractPassword
-
getContractFullCard
-
getContractCardDoc
-
getContractCardTypes
-
getContractCard2Pdf
-
bgbillingOpenContract
public void bgbillingOpenContract(int contractId) -
bgbillingUpdateContractTitleAndComment
-
bgbillingGetContractPatternList
-
getSubContracts
Deprecated.ИспользоватьContractHierarchyDAO.getSubContracts(int)
. -
addSubcontract
Deprecated.ИспользоватьContractHierarchyDAO.addSubcontract(int, int)
. -
getAdditionalActionList
Deprecated. -
getStreetsByCity
-
openContract
-
getContractLimitManage
public int getContractLimitManage(int contractId) Определение текущего режима управления лимитом по договору из страницы статистики- Returns:
- 0 - управление разблокировано, 1 - управление заблокировано
-
updateContractLimitManage
public void updateContractLimitManage(int contractId, int mode) Изменение текущего режима управления лимитом по договору из страницы статистики.- Parameters:
mode
- 0 - управление разблокировано, 1 - управление заблокировано
-
getWebContractLogonLog
public void getWebContractLogonLog(Pageable<ContractDAO.WebContractLogonLogEntry> searchResult, int contractId, ContractDAO.WebContractLogonLogType type, Date date1, Date date2) -
getParameterList
-
getContractInfo
-
getList
-
getList
-
copyParametersToBilling
public void copyParametersToBilling(Connection con, int customerId, int contractId, String title) throws Exception - Throws:
Exception
-
copyObjectParamsToContract
public void copyObjectParamsToContract(Connection con, String copyParamsMapping, int objectId, int contractId, Customer customer) throws SQLException, BGMessageException - Throws:
SQLException
BGMessageException
-
copyParametersToAllContracts
public static void copyParametersToAllContracts(Connection con, User user, int customerId) throws Exception - Throws:
Exception
-