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',