From d5fbe6fae234bba929401fc8929dc39dbfb01793 Mon Sep 17 00:00:00 2001 From: ga7x Date: Fri, 21 Jul 2023 22:27:54 +0200 Subject: [PATCH] #2555 Fixed error save checkbox Disabled in Maintenance events - * deprecated class CustomSQLEroorCodesTranslator; * fixed get value for disabled column from database; --- src/org/scada_lts/dao/MaintenanceEventDAO.java | 2 +- src/org/scada_lts/dao/error/CustomSQLEroorCodesTranslator.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/scada_lts/dao/MaintenanceEventDAO.java b/src/org/scada_lts/dao/MaintenanceEventDAO.java index bdb7281dec..f8f4956eba 100644 --- a/src/org/scada_lts/dao/MaintenanceEventDAO.java +++ b/src/org/scada_lts/dao/MaintenanceEventDAO.java @@ -188,7 +188,7 @@ public MaintenanceEventVO mapRow(ResultSet rs, int rowNum) throws SQLException { maintenanceEvent.setAlias(rs.getString(COLUMN_NAME_ALIAS)); maintenanceEvent.setAlarmLevel(rs.getInt(COLUMN_NAME_ALARM_LEVEL)); maintenanceEvent.setScheduleType(rs.getInt(COLUMN_NAME_SCHEDULE_TYPE)); - maintenanceEvent.setDisabled(DAO.charToBool(COLUMN_NAME_DISABLED)); + maintenanceEvent.setDisabled(DAO.charToBool(rs.getString(COLUMN_NAME_DISABLED))); maintenanceEvent.setActiveYear(rs.getInt(COLUMN_NAME_ACTIVE_YEAR)); maintenanceEvent.setActiveMonth(rs.getInt(COLUMN_NAME_ACTIVE_MONTH)); maintenanceEvent.setActiveDay(rs.getInt(COLUMN_NAME_ACTIVE_DAY)); diff --git a/src/org/scada_lts/dao/error/CustomSQLEroorCodesTranslator.java b/src/org/scada_lts/dao/error/CustomSQLEroorCodesTranslator.java index be6fcd3e5b..8556f52d28 100644 --- a/src/org/scada_lts/dao/error/CustomSQLEroorCodesTranslator.java +++ b/src/org/scada_lts/dao/error/CustomSQLEroorCodesTranslator.java @@ -5,6 +5,7 @@ import org.springframework.context.MessageSource; import org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator; +@Deprecated(since = "2.7.5.4") public class CustomSQLEroorCodesTranslator extends SQLErrorCodeSQLExceptionTranslator { @Resource