ETC数据解析落库异常问题修复
This commit is contained in:
parent
3bd7cc9cdc
commit
59ecfea717
|
@ -41,7 +41,7 @@ public class EtcPersistenceHandler extends AbstractPersistenceHandler {
|
|||
EtcPersistenceHandler.this.setValue(ps, newRow, 5, "solenoidValveStatus", Types.INTEGER);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 6, "controllerCurrentStatus", Types.INTEGER);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 7, "currentStatusRemainingTime", Types.VARCHAR);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 8, "currentStatusStartTime", Types.TIMESTAMP);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 8, "currentStatusStartTime", Types.VARCHAR);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 9, "casPressure", Types.DECIMAL);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 10, "oilPressure", Types.DECIMAL);
|
||||
EtcPersistenceHandler.this.setValue(ps, newRow, 11, "plungerRiseTime", Types.VARCHAR);
|
||||
|
|
|
@ -77,5 +77,10 @@ from `command_points`
|
|||
where `id` in (12002, 12003, 12004);
|
||||
update `command_points`
|
||||
set details = '电磁阀A状态'
|
||||
where `id` = 12001
|
||||
where `id` = 12001;
|
||||
|
||||
UPDATE `command_points`
|
||||
SET `format` = '%s年%s月%s天 %s:%s:%s',
|
||||
`decode_name` = NULL
|
||||
WHERE `id` = 12007;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ CREATE TABLE `$TableName$`
|
|||
`solenoid_valve_status` int NULL DEFAULT NULL COMMENT '电磁阀状态',
|
||||
`controller_current_status` int NULL DEFAULT NULL COMMENT '控制器当前状态',
|
||||
`current_status_remaining_time` varchar(10) NULL DEFAULT NULL COMMENT '当前状态剩余时间',
|
||||
`current_status_start_time` datetime NULL DEFAULT NULL COMMENT '当前状态开始时间',
|
||||
`current_status_start_time` varchar(30) NULL DEFAULT NULL COMMENT '当前状态开始时间',
|
||||
`cas_pressure` decimal(10, 1) NULL DEFAULT NULL COMMENT '套压',
|
||||
`oil_pressure` decimal(10, 1) NULL DEFAULT NULL COMMENT '油压',
|
||||
`plunger_rise_time` varchar(10) NULL DEFAULT NULL COMMENT '柱塞上升时间',
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ModbusTest {
|
|||
|
||||
public static void test() throws Exception {
|
||||
// "01 03 40 0000 0960 0000 0258 0000 0258 0000 0064 000299A0 0000012C0000012C0000012C0000070800002A3000000E1000007E900000000A0000000A0000000A0000000044D0"
|
||||
String collectionMessage = "01034000000960000002580000025800000064000299A00000012C0000012C0000012C0000070800002A3000000E1000007E900000000A0000000A0000000A0000000044D0";
|
||||
String collectionMessage = "01043400020015000C0000000100070001000F001E0016000A00000000000000000000000000000000000002E5000015720000000012039A17";
|
||||
|
||||
ByteQueue byteQueue = new ByteQueue(collectionMessage);
|
||||
RtuMessageParser masterParser = new RtuMessageParser(true);
|
||||
|
@ -47,7 +47,7 @@ public class ModbusTest {
|
|||
}
|
||||
}
|
||||
String address;
|
||||
int startAddress = 150, index = 0, stepSize = 0;
|
||||
int startAddress = 10, index = 0, stepSize = 0;
|
||||
Map<String, Object> messagePointMap = new HashMap<>();
|
||||
for (short value : values) {
|
||||
stepSize = index * 4;
|
||||
|
|
Loading…
Reference in New Issue