|
|
|
|
@ -93,7 +93,7 @@ public class ModbusProtocolStrategy implements ProtocolStrategy {
|
|
|
|
|
int dataLengthInt = Integer.parseInt(dataLength, 16); |
|
|
|
|
// 截取数据域
|
|
|
|
|
String data = receiveData; |
|
|
|
|
if ("2".equals(deviceCodeParamEntity.getDeviceType())) { |
|
|
|
|
if ("2".equals(deviceCodeParamEntity.getDeviceType()) && !"35".equals(deviceCodeParamEntity.getProjectId())) { |
|
|
|
|
data = data.substring(data.length() - 8, data.length() - 6) |
|
|
|
|
+ data.substring(data.length() - 6, data.length() - 4) |
|
|
|
|
+ data.substring(data.length() - 12, data.length() - 10) |
|
|
|
|
|