Class LimitManager
java.lang.Object
ru.bitel.bgbilling.kernel.contract.limit.server.bean.LimitManager
public final class LimitManager
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LimitManager.UserLimitMove
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object
limitMutex
чтобы при одновременном событии восстановления лимита по сроку и по оплате лимит не изменился два разаstatic java.lang.String
TABLE_CONTRACT_LIMIT_MANAGE_MODE_LOG
static int
VPAY_EXPIRED
static int
VPAY_NOT_PAYOFFED
static int
VPAY_PARTIAL_PAYOFFED
static int
VPAY_PAYOFFED
-
Constructor Summary
Constructors Constructor Description LimitManager(java.sql.Connection con)
-
Method Summary
Modifier and Type Method Description int
addMoveTask(LimitChangeTask task)
void
cancelMoveTask(java.util.List<java.lang.Integer> taskIds)
static void
clientPaymentEvent(java.sql.Connection con, PaymentEvent event)
Установка понижений лимита оплаченными по фа.void
deleteMoveTaskAndLog(int taskId, int contractId, int userId)
Отмена задачи, очистка пользовательской статистики и логовvoid
executeRestoreLimitTask(java.util.Calendar now, ContractDao contractDao, java.lang.String comment)
ContractLimitParameters
getContractLimitParameters(Setup setup, Contract contract)
Deprecated.ContractLimitParameters
getContractLimitParameters(Setup setup, Contract contract)
java.util.List<ContractSubPanelManage>
getContractManage(SearchResult<ContractSubPanelManage> searchResult, int contractId)
java.util.List<LimitChangeTask>
getContractMoveTasks(int contractId)
java.util.List<LimitChangeTask>
getFullTaskList()
java.util.List<LimitManager.UserLimitMove>
getUserLimitMove(int contractId, int yy, int mm)
java.util.List<LimitManager.UserLimitMove>
getUserLimitMove(int contractId, java.util.Calendar date1, java.util.Calendar date2)
boolean
initRestoreLimitTask(java.util.Calendar date)
static java.util.List<ContractLimitParameters>
load(Setup setup)
void
lowLimit(int cid, java.math.BigDecimal sum, int days)
Временное понижение лимита.void
searchContractLimitAvto(SearchResult<ContractLimitAvto> searchResult, int contractId, java.lang.String status)
void
setLimitManageMode(int userId, int contractId, int mode)
void
updateContractLimit(int userId, java.math.BigDecimal limitValue, int contractId, java.lang.String comment, int days)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TABLE_CONTRACT_LIMIT_MANAGE_MODE_LOG
public static final java.lang.String TABLE_CONTRACT_LIMIT_MANAGE_MODE_LOG- See Also:
- Constant Field Values
-
VPAY_NOT_PAYOFFED
public static final int VPAY_NOT_PAYOFFED- See Also:
- Constant Field Values
-
VPAY_PARTIAL_PAYOFFED
public static final int VPAY_PARTIAL_PAYOFFED- See Also:
- Constant Field Values
-
VPAY_PAYOFFED
public static final int VPAY_PAYOFFED- See Also:
- Constant Field Values
-
VPAY_EXPIRED
public static final int VPAY_EXPIRED- See Also:
- Constant Field Values
-
limitMutex
public static final java.lang.Object limitMutexчтобы при одновременном событии восстановления лимита по сроку и по оплате лимит не изменился два раза
-
-
Constructor Details
-
LimitManager
public LimitManager(java.sql.Connection con)
-
-
Method Details
-
searchContractLimitAvto
public void searchContractLimitAvto(SearchResult<ContractLimitAvto> searchResult, int contractId, java.lang.String status) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
getContractMoveTasks
-
addMoveTask
- Throws:
ru.bitel.bgbilling.common.BGException
-
cancelMoveTask
public void cancelMoveTask(java.util.List<java.lang.Integer> taskIds) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteMoveTaskAndLog
public void deleteMoveTaskAndLog(int taskId, int contractId, int userId)Отмена задачи, очистка пользовательской статистики и логов- Parameters:
taskId
-contractId
-userId
-
-
getFullTaskList
-
updateContractLimit
public void updateContractLimit(int userId, java.math.BigDecimal limitValue, int contractId, java.lang.String comment, int days) -
initRestoreLimitTask
public boolean initRestoreLimitTask(java.util.Calendar date) -
executeRestoreLimitTask
public void executeRestoreLimitTask(java.util.Calendar now, ContractDao contractDao, java.lang.String comment) -
clientPaymentEvent
public static void clientPaymentEvent(java.sql.Connection con, PaymentEvent event) throws ru.bitel.bgbilling.common.BGExceptionУстановка понижений лимита оплаченными по фа.- Parameters:
con
-event
-- Throws:
ru.bitel.bgbilling.common.BGException
-
load
-
getContractLimitParameters
@Deprecated public ContractLimitParameters getContractLimitParameters(Setup setup, Contract contract) throws ru.bitel.bgbilling.common.BGExceptionDeprecated.ИспользоватьgetContractLimitParameters(Setup, ru.bitel.bgbilling.kernel.contract.api.common.bean.Contract)
- Parameters:
setup
-contract
- старый bean договора- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
getContractLimitParameters
public ContractLimitParameters getContractLimitParameters(Setup setup, Contract contract) throws ru.bitel.bgbilling.common.BGException- Parameters:
setup
-contract
- новый bean договора- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
lowLimit
public void lowLimit(int cid, java.math.BigDecimal sum, int days) throws ru.bitel.bgbilling.common.BGExceptionВременное понижение лимита.- Parameters:
cid
- - код договораsum
- - на какую сумму уменьшить лмиитdays
- - на сколько дней- Throws:
ru.bitel.bgbilling.common.BGException
-
getUserLimitMove
-
getUserLimitMove
public java.util.List<LimitManager.UserLimitMove> getUserLimitMove(int contractId, java.util.Calendar date1, java.util.Calendar date2) -
getContractManage
public java.util.List<ContractSubPanelManage> getContractManage(SearchResult<ContractSubPanelManage> searchResult, int contractId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setLimitManageMode
public void setLimitManageMode(int userId, int contractId, int mode)
-