|
@@ -23,6 +23,7 @@ import java.io.IOException;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -113,7 +114,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public void saveScene(ScenePlus scenePlus, String scenePassword, Camera cameraEntity, String phone, boolean rebuild) {
|
|
|
|
|
|
+ public void saveScene(ScenePlus scenePlus, JSONObject fdageJson, Camera cameraEntity, String phone, boolean rebuild) {
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
params.put("childName", cameraEntity.getChildName());
|
|
params.put("childName", cameraEntity.getChildName());
|
|
params.put("createTime", DateUtil.date2String(scenePlus.getCreateTime(), null));
|
|
params.put("createTime", DateUtil.date2String(scenePlus.getCreateTime(), null));
|
|
@@ -122,7 +123,9 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
params.put("snCode", cameraEntity.getSnCode());
|
|
params.put("snCode", cameraEntity.getSnCode());
|
|
params.put("status", scenePlus.getSceneStatus());
|
|
params.put("status", scenePlus.getSceneStatus());
|
|
if (!rebuild) {
|
|
if (!rebuild) {
|
|
- params.put("password", scenePassword);
|
|
|
|
|
|
+ if(Objects.nonNull(fdageJson)){
|
|
|
|
+ params.put("password", fdageJson.getString("pwd"));
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
params.put("status", 4);
|
|
params.put("status", 4);
|
|
}
|
|
}
|
|
@@ -130,6 +133,9 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
params.put("title", scenePlus.getTitle());
|
|
params.put("title", scenePlus.getTitle());
|
|
params.put("userId", scenePlus.getUserId());
|
|
params.put("userId", scenePlus.getUserId());
|
|
params.put("sceneSource", scenePlus.getSceneSource());
|
|
params.put("sceneSource", scenePlus.getSceneSource());
|
|
|
|
+ if(Objects.nonNull(fdageJson)){
|
|
|
|
+ params.put("location", fdageJson.getInteger("localtion"));
|
|
|
|
+ }
|
|
rabbitMqProducer.sendByWorkQueue(updateScene, params);
|
|
rabbitMqProducer.sendByWorkQueue(updateScene, params);
|
|
}
|
|
}
|
|
|
|
|