正在显示
3 个修改的文件
包含
22 行增加
和
5 行删除
lh-modules/lh-alarm/说明.md
0 → 100644
| @@ -130,15 +130,28 @@ public class DeviceCommandListenServiceImpl implements DeviceCommandServiceFacto | @@ -130,15 +130,28 @@ public class DeviceCommandListenServiceImpl implements DeviceCommandServiceFacto | ||
| 130 | */ | 130 | */ |
| 131 | private String reverseKey(String number, String dataIdentifier) | 131 | private String reverseKey(String number, String dataIdentifier) |
| 132 | { | 132 | { |
| 133 | + String area = "A"; // A | ||
| 134 | + String mappedNumber = "0"; // 09 | ||
| 135 | + String index = "0"; // 1 | ||
| 136 | + String probe = null; // 探头编号(如果有) | ||
| 137 | + | ||
| 138 | + if("0".equals(number)) | ||
| 139 | + { | ||
| 140 | + area = "A"; | ||
| 141 | + mappedNumber = "0"; | ||
| 142 | + index = "0"; | ||
| 143 | + }else{ | ||
| 133 | String[] arr = number.split("_"); | 144 | String[] arr = number.split("_"); |
| 134 | if (arr.length < 3) { | 145 | if (arr.length < 3) { |
| 135 | return null; | 146 | return null; |
| 136 | } | 147 | } |
| 137 | 148 | ||
| 138 | - String area = arr[0]; // A | ||
| 139 | - String mappedNumber = arr[1]; // 09 | ||
| 140 | - String index = arr[2]; // 1 | ||
| 141 | - String probe = arr.length > 3 ? arr[3] : null; // 探头编号(如果有) | 149 | + area = arr[0]; // A |
| 150 | + mappedNumber = arr[1]; // 09 | ||
| 151 | + index = arr[2]; // 1 | ||
| 152 | + probe = arr.length > 3 ? arr[3] : null; // 探头编号(如果有) | ||
| 153 | + } | ||
| 154 | + | ||
| 142 | 155 | ||
| 143 | // 反向查找设备类型(identifier) | 156 | // 反向查找设备类型(identifier) |
| 144 | String identifier = getIdentifierByMappedNumber(mappedNumber); | 157 | String identifier = getIdentifierByMappedNumber(mappedNumber); |
-
请 注册 或 登录 后发表评论