|
@@ -178,51 +178,12 @@ public class LaserService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public void copy(String oldNum ,Long camaraId, String createTime, String newNum, Integer status,
|
|
|
- String path, String sceneKey, Integer location, Long userId,String version,Integer isObj,
|
|
|
- Integer sceneSource,String algorithmTime,Integer shootCount){
|
|
|
- String phone = null;
|
|
|
- String snCode = null;
|
|
|
- if(userId != null){
|
|
|
- User user = userService.getById(userId);
|
|
|
- phone = user == null ? null :user.getUserName();
|
|
|
- }
|
|
|
- if(camaraId != null){
|
|
|
- Camera camera = cameraService.getById(camaraId);
|
|
|
- snCode = camera == null ? null :camera.getSnCode();
|
|
|
- }
|
|
|
-// JSONObject sceneInfo = this.getSceneByNum(oldNum);
|
|
|
-// if(sceneInfo != null){
|
|
|
-// sceneName = sceneInfo.getString("title") +"(copy)";
|
|
|
-// }
|
|
|
+ public void copy(String oldNum , String newNum, String path){
|
|
|
Map<String,Object> params = new HashMap<>();
|
|
|
- params.put("childName",snCode);
|
|
|
- params.put("createTime", createTime);
|
|
|
- params.put("phone", phone);
|
|
|
params.put("sceneCode", newNum);
|
|
|
params.put("oldSceneCode", oldNum);
|
|
|
- params.put("snCode",snCode);
|
|
|
- params.put("status", status);
|
|
|
- params.put("password", sceneKey);
|
|
|
- //params.put("title", sceneName);
|
|
|
- params.put("userId", userId);
|
|
|
- params.put("isCopy", true);
|
|
|
params.put("path",path);
|
|
|
- params.put("version",version);
|
|
|
- params.put("sceneSource",sceneSource);
|
|
|
- params.put("algorithmTime",algorithmTime);
|
|
|
- params.put("shootCount",shootCount);
|
|
|
- if(location != null){
|
|
|
- params.put("location",location);
|
|
|
- }
|
|
|
- if(isObj == 1){
|
|
|
- params.put("buildObjStatus",isObj);
|
|
|
-
|
|
|
- }
|
|
|
- Result result = laserClient.saveOrEdit(newNum, params);
|
|
|
- if( result.getCode() != HttpStatus.OK.value()){
|
|
|
- log.error("激光场景状态同步失败!");
|
|
|
- }
|
|
|
+ rabbitMqProducer.sendByWorkQueue(laserCopyScene,params);
|
|
|
}
|
|
|
|
|
|
public List<SceneBySnCodeVo> getScenesBySnCode(String snCode, String token) {
|
|
@@ -306,6 +267,8 @@ public class LaserService {
|
|
|
private String bucket;
|
|
|
@Value("${queue.application.laser.cloud-point-build:laser-cloud-point-build}")
|
|
|
private String cloudPointBuild;
|
|
|
+ @Value("${queue.application.laser.copy-scene:laser-copy-scene}")
|
|
|
+ private String laserCopyScene;
|
|
|
|
|
|
|
|
|
|