Package org.bgerp.plugin.bgb.getolt.dao
Class OltOnuDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
org.bgerp.plugin.bgb.getolt.dao.OltOnuDAO
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordONU entry with MAC addresses and billing data presence flag.Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id> -
Field Summary
Fields inherited from class ru.bgcrm.dao.CommonDAO
con, log, SQL_AND, SQL_DELETE, SQL_DELETE_FROM, SQL_DESC, SQL_DISTINCT, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT_IGNORE_INTO, SQL_INSERT_INTO, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UNION_ALL, SQL_UPDATE, SQL_VALUES, SQL_VALUES_1, SQL_VALUES_2, SQL_VALUES_3, SQL_VALUES_4, SQL_VALUES_5, SQL_WHERE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbatchUpdateBillingData(Map<Integer, Object[]> updates) Batch update billing data for matched ONUs.intcountActiveByOltId(int oltId) intcountByOltId(int oltId) voiddeleteByOltId(int oltId) voiddeleteByOltPortId(int oltPortId) voiddeleteStale(int oltId, int oltPortId, List<Integer> activeOnuNums) Get all ONU MAC entries for billing mapping.getByContract(int contractId, String numDogovor) getByOltId(int oltId) getByPortId(int oltPortId) voidinsertOrUpdate(OltOnu onu) searchOltIds(String query) Search ONU by mac, num_dogovor, abon_fio, abon_addr.Methods inherited from class ru.bgcrm.dao.CommonDAO
deleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert
-
Constructor Details
-
OltOnuDAO
-
-
Method Details
-
getByPortId
- Throws:
SQLException
-
countByOltId
- Throws:
SQLException
-
countActiveByOltId
- Throws:
SQLException
-
getByOltId
- Throws:
SQLException
-
getByContract
- Throws:
SQLException
-
searchOltIds
Search ONU by mac, num_dogovor, abon_fio, abon_addr. Returns distinct OLT IDs containing matching ONUs.- Throws:
SQLException
-
getByMac
- Throws:
SQLException
-
insertOrUpdate
- Throws:
SQLException
-
deleteByOltId
- Throws:
SQLException
-
deleteByOltPortId
- Throws:
SQLException
-
deleteStale
- Throws:
SQLException
-
getAllMacEntries
Get all ONU MAC entries for billing mapping. Returns id, mac, macTo, and whether billing data is already present.- Throws:
SQLException
-
batchUpdateBillingData
Batch update billing data for matched ONUs. Uses PreparedStatement.addBatch() for efficiency.- Parameters:
updates- map of ONU id → billing data array [operator, serviceId, contractId, numDogovor, login, abonFio, abonAddr]- Returns:
- number of updated rows
- Throws:
SQLException
-