From e579a47a10ad98f9ff070a6459ab707e5aae62cf Mon Sep 17 00:00:00 2001 From: wangshilong Date: Thu, 6 Mar 2025 21:05:41 +0800 Subject: [PATCH] =?UTF-8?q?knpc=E3=80=81etc=E6=B7=BB=E5=8A=A0=E7=94=B5?= =?UTF-8?q?=E5=8E=8B=E5=AD=97=E6=AE=B5=E6=9F=A5=E8=AF=A2=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=EF=BC=9Bmi=E5=A8=81=E5=B0=94=E6=99=AE=E6=96=AFopenPressure?= =?UTF-8?q?=E3=80=81littleRisePressure=E6=95=B0=E6=8D=AE=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modbus/data/impl/MiWepsPlugPersistenceHandler.java | 4 ++-- .../java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java | 9 +++++++++ src/main/resources/mapper/DeviceDao.xml | 10 ++++++---- src/main/resources/sql/CREATE_MI_WEPS_PLUG.sql | 4 ++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/isu/gaswellwatch/modbus/data/impl/MiWepsPlugPersistenceHandler.java b/src/main/java/com/isu/gaswellwatch/modbus/data/impl/MiWepsPlugPersistenceHandler.java index 42ae6c3..7bbb22c 100644 --- a/src/main/java/com/isu/gaswellwatch/modbus/data/impl/MiWepsPlugPersistenceHandler.java +++ b/src/main/java/com/isu/gaswellwatch/modbus/data/impl/MiWepsPlugPersistenceHandler.java @@ -147,9 +147,9 @@ public class MiWepsPlugPersistenceHandler extends AbstractPersistenceHandler { MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 50, "notReachedFlowTime", Types.VARCHAR); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 51, "closeTime", Types.VARCHAR); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 52, "openTime", Types.VARCHAR); - MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 53, "openPressure", Types.DECIMAL); + MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 53, "openPressure", Types.VARCHAR); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 54, "closePressure", Types.DECIMAL); - MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 55, "littleRisePressure", Types.DECIMAL); + MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 55, "littleRisePressure", Types.VARCHAR); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 56, "gasCollectionMode", Types.INTEGER); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 57, "reserve2", Types.INTEGER); MiWepsPlugPersistenceHandler.this.setValue(ps, newRow, 58, "protectionPressure", Types.DECIMAL); diff --git a/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java b/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java index e5784f3..d1e3b90 100644 --- a/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java +++ b/src/main/java/com/isu/gaswellwatch/vo/DeviceHistoryVO.java @@ -83,6 +83,11 @@ public class DeviceHistoryVO extends Model { */ private String solarVoltage; + /** + * 电池电压 + */ + private String batteryVoltage; + public void setOilPressure(String oilPressure) { this.oilPressure = NumberScaleUtils.formatTwoScalePositiveNumber(oilPressure); } @@ -107,4 +112,8 @@ public class DeviceHistoryVO extends Model { this.solarVoltage = NumberScaleUtils.formatTwoScalePositiveNumber(solarVoltage); } + public void setBatteryVoltage(String batteryVoltage) { + this.batteryVoltage = NumberScaleUtils.formatTwoScalePositiveNumber(batteryVoltage); + } + } diff --git a/src/main/resources/mapper/DeviceDao.xml b/src/main/resources/mapper/DeviceDao.xml index eb7517c..877ecda 100644 --- a/src/main/resources/mapper/DeviceDao.xml +++ b/src/main/resources/mapper/DeviceDao.xml @@ -100,12 +100,13 @@ select t.collection_time,t.oil_pressure,t.cas_pressure - ,t.pre_pressure,'knpc' as - type,t.run_mode,t.status_end_time,t.temperature,t.humidity,t.well_status,t.plug_status + ,t.pre_pressure,'knpc' as type,t.run_mode,t.status_end_time,t.temperature + ,t.humidity,t.well_status,t.plug_status, t.battery_voltage ,t.pre_pressure,'etc' as type,t.current_status_remaining_time as statusEndTime ,t.controller_current_status as runMode,t.solenoid_valve_status as wellStatus + ,t.battery_voltage ,t.pre_pressure,'scss' as type,t.ctl_model as runMode,t.remaining_time_action as statusEndTime @@ -224,12 +225,13 @@ select t.collection_time,t.oil_pressure,t.cas_pressure - ,t.pre_pressure,'knpc' as - type,t.run_mode,t.status_end_time,t.temperature,t.humidity,t.well_status,t.plug_status + ,t.pre_pressure,'knpc' as type,t.run_mode,t.status_end_time,t.temperature,t.humidity + ,t.well_status,t.plug_status,t.battery_voltage ,t.pre_pressure,'etc' as type,t.current_status_remaining_time as statusEndTime ,t.controller_current_status as runMode,t.solenoid_valve_status as wellStatus + ,t.battery_voltage ,t.pre_pressure,'scss' as type,t.ctl_model as runMode,t.remaining_time_action as statusEndTime diff --git a/src/main/resources/sql/CREATE_MI_WEPS_PLUG.sql b/src/main/resources/sql/CREATE_MI_WEPS_PLUG.sql index 3eb737f..1bbf5c4 100644 --- a/src/main/resources/sql/CREATE_MI_WEPS_PLUG.sql +++ b/src/main/resources/sql/CREATE_MI_WEPS_PLUG.sql @@ -53,9 +53,9 @@ CREATE TABLE `$TableName$` `not_reached_flow_time` varchar(20) NULL DEFAULT NULL COMMENT '未到续流时间 - 单位:秒', `close_time` varchar(20) NULL DEFAULT NULL COMMENT '关井时间 - 单位:秒', `open_time` varchar(20) NULL DEFAULT NULL COMMENT '开井时间 - 单位:秒', - `open_pressure` decimal(12, 4) NULL DEFAULT NULL COMMENT '开井压力 - 单位:MPa', + `open_pressure` varchar(100) NULL DEFAULT NULL COMMENT '开井压力 - 单位:MPa', `close_pressure` decimal(12, 4) NULL DEFAULT NULL COMMENT '关井压力 - 单位:MPa', - `little_rise_pressure` decimal(12, 4) NULL DEFAULT NULL COMMENT '微升压力 - 单位:MPa', + `little_rise_pressure` varchar(100) NULL DEFAULT NULL COMMENT '微升压力 - 单位:MPa', `gas_collection_mode` int NULL DEFAULT NULL COMMENT '集气模式 - 0:低压集气模式;1:高压集气模式', `reserve2` int NULL DEFAULT NULL COMMENT '保留', `protection_pressure` decimal(12, 4) NULL DEFAULT NULL COMMENT '保护压力 - 单位:MPa',