Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebApi of remote start, remote stop and connector status #1291

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
be40edd
set webapi.value in dev
Oct 20, 2023
9d79bdd
add constructor with "caller" value at tasks RemoteStart, RemoteStop …
Oct 20, 2023
d2f54b5
ChargePointRepository: add method getChargePointSelect(String ChageBo…
Oct 20, 2023
cdcb3ee
TransactionRepository: add methods getActiveTransactionId(String char…
Oct 20, 2023
3a3e575
TaskOverview: added swagger.annotations
Oct 20, 2023
08d7fa6
ChargePointService12_Client: add methods which uses new task construc…
Oct 20, 2023
9b580be
Added a first draft of RemoteStartStopREstController, also added data…
Oct 20, 2023
1771e16
Removed tailing spaces
Oct 20, 2023
7417a9e
ConnectorStatusForm: added ApiModelProperty annotation;
Oct 20, 2023
59b31cc
OcppJsonStatus: added ApiModelProperty annotation and JasonIgnor anno…
Oct 20, 2023
bf14cb1
ConnectorStatus: added ApiModelProperty annotation to all fields and …
Oct 20, 2023
55ac2ec
no functional changes
Oct 20, 2023
7fc9c5b
added dto list of connector status for Api
Oct 20, 2023
c39fafa
added connector REST controller
Oct 20, 2023
5a04018
RemoteStartStopController: methode postRemoteStartTx now checks if th…
Oct 25, 2023
ed42990
RemoteStartStopController: moved the task related methods to the new …
Oct 25, 2023
0e724a4
TaskReskController: removed unused import BadRequest...
Oct 25, 2023
9a58541
style
Oct 25, 2023
41017aa
removed unused dto ApiConnectorList
Oct 25, 2023
9b708c8
ApiTaskInfo: removed unused/out commented imports
Oct 25, 2023
e09d14c
REmoteStartStopREstController: added check for active tasks on charge…
Oct 25, 2023
5517cd1
add dto ApiConnectorList
Oct 25, 2023
bc02600
ConnectorRestController: rename method
Oct 25, 2023
770c594
ApiConnectorList: removed unnessesary semicolon
Oct 25, 2023
b5211f7
ApiChargePointStart: correct ApiModelProperty value
Nov 2, 2023
8a56922
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Nov 2, 2023
6b77e92
ConnectorStatusForm add menber for Strategy of listing the connector
Nov 5, 2023
4c01d02
HomeController & ConnectorRestController: option to choose between Pr…
Nov 5, 2023
703867b
connectorStatus.jsp: add query field for strategy the connector listing
Nov 5, 2023
d41e059
style improvement
Nov 6, 2023
5de4edf
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Nov 28, 2023
86cef45
typo and trailing spaces
Dec 6, 2023
875e4fa
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Dec 13, 2023
9908064
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Dec 24, 2023
de45bb3
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Jan 15, 2024
b358166
TaskRestController: changed address to /api/v1/tasks;
Jan 16, 2024
cb7576d
Update license headers
Jan 16, 2024
f087287
getActiveTransactionId(String chargeBox, Integer connectorId) method,…
Jan 23, 2024
85ccc66
TransactionRepository: add method getTransaction(int transactionPk); …
Jan 23, 2024
b46859a
RemoteStartStopRestController adapt to methode changes at Transaction…
Jan 23, 2024
a790ef6
RemoteStartStopRestController: changed style of switch case
Jan 23, 2024
b3da4c3
TransactionRepository: methode getTransaction(int transactionPk) usin…
Jan 23, 2024
52c07da
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Feb 1, 2024
c30d163
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Feb 6, 2024
83efc74
smaller style improvements
Feb 6, 2024
a2dbd95
RemoteStartStopController: removed trailing spaces
Feb 6, 2024
7a34ce7
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Feb 19, 2024
7aaa690
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Mar 28, 2024
c7e795d
Resolve Conflicts: Caused by removing the flag firstArrivingMeterValu…
fnkbsi Apr 3, 2024
e13a6aa
Merge branch 'master' into ApiRemoteStartStop
fnkbsi Apr 3, 2024
aec19e3
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Apr 19, 2024
7c0c773
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi May 13, 2024
fd4f789
Merge branch 'steve-community:master' into ApiRemoteStartStop
fnkbsi Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
getActiveTransactionId(String chargeBox, Integer connectorId) method,…
… add .orderBy(TRANSACTION.TRANSACTION_PK.desc()) to avoid fetching ghost transactions, fetch the latest
  • Loading branch information
fnkbsi committed Jan 23, 2024
commit f087287271de21b2314d3dc7ba85d4365224603e
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ public TransactionRepositoryImpl(DSLContext ctx) {
this.ctx = ctx;
}

@Override
public Transaction getTransaction(int transactionPk) {
TransactionQueryForm form = new TransactionQueryForm();
form.setTransactionPk(transactionPk);
form.setReturnCSV(false);
form.setType(TransactionQueryForm.QueryType.ALL);
return getInternal(form).fetch()
.map(new TransactionMapper()).get(0);
}

@Override
public List<Transaction> getTransactions(TransactionQueryForm form) {
return getInternal(form).fetch()
Expand Down Expand Up @@ -97,19 +107,10 @@ public Integer getActiveTransactionId(String chargeBoxId, Integer connectorId) {
.and(CONNECTOR.CHARGE_BOX_ID.equal(chargeBoxId))
.where(TRANSACTION.STOP_TIMESTAMP.isNull())
.and(CONNECTOR.CONNECTOR_ID.equal(connectorId))
.orderBy(TRANSACTION.TRANSACTION_PK.desc()) // to avoid fetching ghost transactions, fetch the latest
.fetchAny(TRANSACTION.TRANSACTION_PK);
}

@Override
public String getOcppTagOfTransaction(Integer transactionPk) {
return ctx.select(TRANSACTION.ID_TAG)
.from(TRANSACTION)
.where(TRANSACTION.TRANSACTION_PK.eq(transactionPk))
.fetchAny(TRANSACTION.ID_TAG);
/* .fetch().sortDesc(TRANSACTION.START_TIMESTAMP).getValue(0, TRANSACTION.ID_TAG);
if TRANSACTION has sometimes errors an more then one open/active transaction per connector */
}

@Override
public TransactionDetails getDetails(int transactionPk, boolean firstArrivingMeterValueIfMultiple) {

Expand Down