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