Commit ee127300 zshaohui

1.增加off指令修改

1 个父辈 96879107
......@@ -58,16 +58,26 @@ public class ReelShelfControlServiceImpl implements ReelShelfControlServiceSoap
storagePosList.add(pos);
}
String smfColor = LightColor.getColor(color);
for (StoragePos pos : storagePosList) {
Storage storage = dataCache.getStorageById(pos.getStorageId());
String cid = storage.getCid();
String opKey = LightAction.getOpName(1);
String opValue = pos.getPosName() + "=" + smfColor;
log.info(cid + "对应的key为:" + opKey + "value为:" + opValue);
DevicesStatusUtil.appendOp(cid, opKey, opValue);
//批量亮灯的时候,如果color为off,则发送close
if (color.equalsIgnoreCase("off")){
for (StoragePos pos : storagePosList) {
Storage storage = dataCache.getStorageById(pos.getStorageId());
String cid = storage.getCid();
String opKey = "open";
String opValue = pos.getPosName() + "=off";
log.info(cid + "对应的key为:" + opKey + "value为:" + opValue);
DevicesStatusUtil.appendOp(cid, opKey, opValue);
}
} else {
String smfColor = LightColor.getColor(color);
for (StoragePos pos : storagePosList) {
Storage storage = dataCache.getStorageById(pos.getStorageId());
String cid = storage.getCid();
String opKey = LightAction.getOpName(1);
String opValue = pos.getPosName() + "=" + smfColor;
log.info(cid + "对应的key为:" + opKey + "value为:" + opValue);
DevicesStatusUtil.appendOp(cid, opKey, opValue);
}
}
return true;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!