2040 preparation introduce evse#2041
Conversation
Review Summary by QodoIntroduce EVSE model and physical connector layer for OCPP 1 compatibility
WalkthroughsDescription• Refactor connector table/model to evse with renamed columns • Introduce evse_connector table for physical socket layer • Update all repository queries to use EVSE with topology_source filtering • Add OCPP 1 runtime logic to create physical connectors under non-zero EVSEs • Update tests and import/export to support new EVSE/EVSE_CONNECTOR structure Diagramflowchart LR
A["CONNECTOR table"] -->|rename| B["EVSE table"]
B -->|add topology_source| C["EVSE with OCPP1 filtering"]
C -->|create physical layer| D["EVSE_CONNECTOR table"]
E["Repository queries"] -->|refactor| F["Use EVSE + topology_source"]
F -->|auto-create| D
File Changes1. src/main/java/de/rwth/idsg/steve/repository/impl/ChargePointRepositoryImpl.java
|
Code Review by Qodo
1.
|
* previously, we were "insert or ignore"ing connector ids as they come. and then, we were using another SQL query to select the connector pk relating to this connector id, because the initial "insert or ignore" was not able to return the PK. with the new impl of insertIgnoreConnectorInternal, we can return evsePk. as a result, the additional SQL query is NOT necessary at all. subsequent queries that need evsePk can just use the literal value of returned evsePk. * localize all evsePk selection queries that are scattered across multiple repository impl classes. now, we have evsePkSelect methods in Ocpp1ConnectorEvseBridge, which can be referenced by repository impls.
b2810f8 to
ccc54db
Compare
* add them to the ChargePointForm * render them for information purposes * allow select and necesssary fields to be edited

connectoris promoted and renamed toevse.evse_connectoris introduced as the physical socket layer.connector_pkhistory references becomeevse_pk, which matches the “OCPP 1 connector becomes EVSE” transition.topology_source = ocpp1.evse_connector.connector_id = 1.0is correctly left without a physical connector.EVSE_CONNECTOR.EVSE_CONNECTORand cover the OCPP 1 connector-to-EVSE mapping.evse_id/evse_pkfor ocpp1 stations back toconnectorId/connectorPk. as a result, the service and web (api and mvc) layers remain untouched.