knpc、etc添加电压字段查询返回;mi威尔普斯openPressure、littleRisePressure数据插入错误问题

This commit is contained in:
wangshilong 2025-03-06 21:05:41 +08:00
parent 0a7a96e637
commit e579a47a10
4 changed files with 19 additions and 8 deletions

View File

@ -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);

View File

@ -83,6 +83,11 @@ public class DeviceHistoryVO extends Model<DeviceHistoryVO> {
*/
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<DeviceHistoryVO> {
this.solarVoltage = NumberScaleUtils.formatTwoScalePositiveNumber(solarVoltage);
}
public void setBatteryVoltage(String batteryVoltage) {
this.batteryVoltage = NumberScaleUtils.formatTwoScalePositiveNumber(batteryVoltage);
}
}

View File

@ -100,12 +100,13 @@
select t.collection_time,t.oil_pressure,t.cas_pressure
<choose>
<when test="deviceProduct!=null and deviceProduct=='knpc'">
,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
</when>
<when test="deviceProduct!=null and deviceProduct=='etc'">
,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
</when>
<when test="deviceProduct!=null and deviceProduct=='scss'">
,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
<choose>
<when test="deviceProduct!=null and deviceProduct=='knpc'">
,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
</when>
<when test="deviceProduct!=null and deviceProduct=='etc'">
,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
</when>
<when test="deviceProduct!=null and deviceProduct=='scss'">
,t.pre_pressure,'scss' as type,t.ctl_model as runMode,t.remaining_time_action as statusEndTime

View File

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