|  |  | 
 |  |  |  | 
 |  |  |         for (String deviceId : keys) { | 
 |  |  |             CatalogData catalogData = data.get(deviceId); | 
 |  |  |             if ( catalogData.getLastTime().isBefore(instantBefore5S)) { // 超过五秒收不到消息任务超时, 只更新这一部分数据 | 
 |  |  |             if ( catalogData.getLastTime().isBefore(instantBefore5S)) { | 
 |  |  |                 // 超过五秒收不到消息任务超时, 只更新这一部分数据, 收到数据与声明的总数一致,则重置通道数据,数据不全则只对收到的数据做更新操作 | 
 |  |  |                 if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.runIng)) { | 
 |  |  |                     storager.resetChannels(catalogData.getDevice().getDeviceId(), catalogData.getChannelList()); | 
 |  |  |                     if (catalogData.getTotal() == catalogData.getChannelList().size()) { | 
 |  |  |                         storager.resetChannels(catalogData.getDevice().getDeviceId(), catalogData.getChannelList()); | 
 |  |  |                     }else { | 
 |  |  |                         storager.updateChannels(catalogData.getDevice().getDeviceId(), catalogData.getChannelList()); | 
 |  |  |                     } | 
 |  |  |                     String errorMsg = "更新成功,共" + catalogData.getTotal() + "条,已更新" + catalogData.getChannelList().size() + "条"; | 
 |  |  |                     catalogData.setErrorMsg(errorMsg); | 
 |  |  |                     if (catalogData.getTotal() != catalogData.getChannelList().size()) { | 
 |  |  |                         String errorMsg = "更新成功,共" + catalogData.getTotal() + "条,已更新" + catalogData.getChannelList().size() + "条"; | 
 |  |  |                         catalogData.setErrorMsg(errorMsg); | 
 |  |  |  | 
 |  |  |                     } | 
 |  |  |                 }else if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.ready)) { | 
 |  |  |                     String errorMsg = "同步失败,等待回复超时"; |