|
@@ -38,7 +38,6 @@ public class TaskService {
|
|
|
log.info("没有需要更新GPS数据的场景");
|
|
|
}
|
|
|
|
|
|
- List<ProjectSceneGps> pluslist = new ArrayList<>();
|
|
|
List<ProjectSceneGps> laserssList = new ArrayList<>();
|
|
|
List<ProjectSceneGps> lasersgList = new ArrayList<>();
|
|
|
for (SceneGpsDb sceneGpsDb : numList) {
|
|
@@ -49,42 +48,27 @@ public class TaskService {
|
|
|
laserssList.add(sceneGps);
|
|
|
}else if( sceneGps.getSceneSource() == 5){
|
|
|
lasersgList.add(sceneGps);
|
|
|
- }else {
|
|
|
- pluslist.add(sceneGps);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ addLaserList(laserssList,4);
|
|
|
+ addLaserList(lasersgList,5);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addLaserList(List<ProjectSceneGps> laserssList,Integer sceneSource) {
|
|
|
List<String> sceneMapShowList = new ArrayList<>();
|
|
|
- if(!pluslist.isEmpty()){
|
|
|
- sceneMapShowList.addAll( pluslist.stream().map(ProjectSceneGps::getNum).collect(Collectors.toList()));
|
|
|
- projectSceneGpsService.saveBatch(pluslist);
|
|
|
- }
|
|
|
if(!laserssList.isEmpty()){
|
|
|
List<String> numList1 = laserssList.stream().map(ProjectSceneGps::getNum).collect(Collectors.toList());
|
|
|
- HashMap<String, JSONObject> ssSceneMap = laserService.list(numList1,4);
|
|
|
+ HashMap<String, JSONObject> ssSceneMap = laserService.list(numList1,sceneSource);
|
|
|
for (ProjectSceneGps sceneGps : laserssList) {
|
|
|
JSONObject ssObj = ssSceneMap.get(sceneGps.getNum());
|
|
|
if(ssObj!=null){
|
|
|
sceneGps.setWebSite(ssObj.getString("webSite"));
|
|
|
+ sceneMapShowList.add(sceneGps.getNum());
|
|
|
+ projectSceneGpsService.save(sceneGps);
|
|
|
}
|
|
|
}
|
|
|
- sceneMapShowList.addAll( numList1);
|
|
|
- projectSceneGpsService.saveBatch(laserssList);
|
|
|
- }
|
|
|
- if(!lasersgList.isEmpty()){
|
|
|
- List<String> numList1 = lasersgList.stream().map(ProjectSceneGps::getNum).collect(Collectors.toList());
|
|
|
- HashMap<String, JSONObject> ssSceneMap = laserService.list(numList1,5);
|
|
|
- for (ProjectSceneGps sceneGps : lasersgList) {
|
|
|
- JSONObject ssObj = ssSceneMap.get(sceneGps.getNum());
|
|
|
- if(ssObj!=null){
|
|
|
- sceneGps.setWebSite(ssObj.getString("webSite"));
|
|
|
- }
|
|
|
- }
|
|
|
- sceneMapShowList.addAll( numList1);
|
|
|
- projectSceneGpsService.saveBatch(lasersgList);
|
|
|
}
|
|
|
sceneProService.openMapShow(sceneMapShowList);
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|