机库注册适配蛙跳机库

This commit is contained in:
sdy 2026-06-09 11:29:17 +08:00
parent 388cfd2845
commit 139e2eff46
1 changed files with 9 additions and 9 deletions

View File

@ -117,7 +117,7 @@ public class RequestsHandler implements MessageHandler {
log.debug("requests step3--> 查询设备绑定对应的组织信息成功");
} else if (BusinessConstant.AIRPORT_ORGANIZATION_BIND.equals(method)) {//第四步 设备绑定组织信息
JSONArray bindDevices = data.getJSONArray("bind_devices");
if (bindDevices.size() == 2) {
if (bindDevices.size() == 2 || bindDevices.size() == 1) {//1 为了适配蛙跳机库蛙跳机库注册没有飞机
List<DockDeviceEntity> bindDeviceList = new ArrayList<>();
for (Object bindDevice : bindDevices) {
JSONObject deviceJson = (JSONObject) bindDevice;
@ -152,7 +152,7 @@ public class RequestsHandler implements MessageHandler {
device.setDeviceName(deviceDicEntity != null ? deviceDicEntity.getDeviceName() : "unknown");
bindDeviceList.add(device);
}
if (CollUtil.isEmpty(bindDeviceList) || bindDeviceList.size() != 2) {
if (CollUtil.isEmpty(bindDeviceList) /*|| bindDeviceList.size() != 2*/) {
data.set("result", 3);
mqttPushService.pushMessageByClient1(topic + BusinessConstant._REPLY, message.toString());
log.debug("requests step4--> 设备绑定组织信息失败设备绑定数量不为2");