From ee3e57f1947c2bccdb21f8d0dc9ba8d38b539867 Mon Sep 17 00:00:00 2001 From: Kamil Date: Tue, 16 Jan 2024 20:18:37 +0100 Subject: [PATCH] #2806 Fixed counting point values in report --- src/org/scada_lts/dao/report/ReportInstanceDataDAO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/scada_lts/dao/report/ReportInstanceDataDAO.java b/src/org/scada_lts/dao/report/ReportInstanceDataDAO.java index 488754fbea..0766641ec1 100644 --- a/src/org/scada_lts/dao/report/ReportInstanceDataDAO.java +++ b/src/org/scada_lts/dao/report/ReportInstanceDataDAO.java @@ -158,7 +158,7 @@ public int insert(final Object[] params, final int reportPointId, final String t LOG.trace("insertInstanceData(Object[] params, final int reportPointId, final String timestampSql) reportPointId:" + reportPointId + ", timestampSql:" + timestampSql); } - DAO.getInstance().getJdbcTemp().update(new PreparedStatementCreator() { + int value = DAO.getInstance().getJdbcTemp().update(new PreparedStatementCreator() { @Override public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement preparedStatement = connection.prepareStatement(REPORT_INSTANCE_DATA_INSERT_FIRST + reportPointId + REPORT_INSTANCE_DATA_INSERT_SECOND + timestampSql); @@ -167,7 +167,7 @@ public PreparedStatement createPreparedStatement(Connection connection) throws S } }); - return reportPointId; + return value; } @Transactional(readOnly = false,propagation= Propagation.REQUIRES_NEW,isolation= Isolation.READ_COMMITTED,rollbackFor=SQLException.class)