|
@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fdkankan.manage_jp.service.IScenePlusExtService;
|
|
import com.fdkankan.manage_jp.service.IScenePlusExtService;
|
|
import com.fdkankan.manage_jp.service.IScenePlusService;
|
|
import com.fdkankan.manage_jp.service.IScenePlusService;
|
|
import com.fdkankan.manage_jp.vo.response.SceneExtGpsVo;
|
|
import com.fdkankan.manage_jp.vo.response.SceneExtGpsVo;
|
|
|
|
+import com.fdkankan.manage_jp.vo.response.SceneGpsDb;
|
|
import com.fdkankan.manage_jp.vo.response.SceneGpsVo;
|
|
import com.fdkankan.manage_jp.vo.response.SceneGpsVo;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -46,23 +47,20 @@ public class ProjectSceneGpsServiceImpl extends ServiceImpl<IProjectSceneGpsMapp
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<String> getNotGpsScene() {
|
|
|
|
|
|
+ public List<SceneGpsDb> getNotGpsScene() {
|
|
return this.getBaseMapper().getNotGpsScene();
|
|
return this.getBaseMapper().getNotGpsScene();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public ProjectSceneGps addGps(String num) {
|
|
|
|
- ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
|
- ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
|
- String dataSource = scenePlusExt.getDataSource();
|
|
|
|
|
|
+ public ProjectSceneGps addGps(SceneGpsDb sceneGpsDb) {
|
|
SceneGpsVo sceneGpsVo = null;
|
|
SceneGpsVo sceneGpsVo = null;
|
|
- if(scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5){
|
|
|
|
- sceneGpsVo = getByLaserEdit(num);
|
|
|
|
|
|
+ if(sceneGpsDb.getSceneSource() == 4 || sceneGpsDb.getSceneSource() == 5){
|
|
|
|
+ sceneGpsVo = getByLaserEdit(sceneGpsDb.getNum());
|
|
}else {
|
|
}else {
|
|
- sceneGpsVo = getByHomeParameters(dataSource);
|
|
|
|
|
|
+ sceneGpsVo = getByHomeParameters(sceneGpsDb.getDataSource());
|
|
}
|
|
}
|
|
- if(sceneGpsVo == null && StrUtil.isNotBlank(scenePlusExt.getGps())){
|
|
|
|
- String gps = scenePlusExt.getGps();
|
|
|
|
|
|
+ if(sceneGpsVo == null && StrUtil.isNotBlank(sceneGpsDb.getGps())){
|
|
|
|
+ String gps = sceneGpsDb.getGps();
|
|
SceneExtGpsVo extGpsVo = JSONObject.parseObject(gps,SceneExtGpsVo.class);
|
|
SceneExtGpsVo extGpsVo = JSONObject.parseObject(gps,SceneExtGpsVo.class);
|
|
sceneGpsVo = new SceneGpsVo(extGpsVo.getLatitude(),extGpsVo.getLongitude(),extGpsVo.getAltitude(),1);
|
|
sceneGpsVo = new SceneGpsVo(extGpsVo.getLatitude(),extGpsVo.getLongitude(),extGpsVo.getAltitude(),1);
|
|
}
|
|
}
|
|
@@ -72,13 +70,13 @@ public class ProjectSceneGpsServiceImpl extends ServiceImpl<IProjectSceneGpsMapp
|
|
&& StrUtil.isNotBlank(sceneGpsVo.getAlt())){
|
|
&& StrUtil.isNotBlank(sceneGpsVo.getAlt())){
|
|
|
|
|
|
ProjectSceneGps sceneGps = new ProjectSceneGps();
|
|
ProjectSceneGps sceneGps = new ProjectSceneGps();
|
|
- sceneGps.setNum(num);
|
|
|
|
- sceneGps.setWebSite(scenePlusExt.getWebSite());
|
|
|
|
|
|
+ sceneGps.setNum(sceneGpsDb.getNum());
|
|
|
|
+ sceneGps.setWebSite(sceneGpsDb.getWebSite());
|
|
sceneGps.setLat(sceneGpsVo.getLat());
|
|
sceneGps.setLat(sceneGpsVo.getLat());
|
|
sceneGps.setLon(sceneGpsVo.getLon());
|
|
sceneGps.setLon(sceneGpsVo.getLon());
|
|
sceneGps.setAlt(sceneGpsVo.getAlt());
|
|
sceneGps.setAlt(sceneGpsVo.getAlt());
|
|
sceneGps.setGpsSource(sceneGpsVo.getGpsSource());
|
|
sceneGps.setGpsSource(sceneGpsVo.getGpsSource());
|
|
- sceneGps.setSceneSource(scenePlus.getSceneSource());
|
|
|
|
|
|
+ sceneGps.setSceneSource(sceneGpsDb.getSceneSource());
|
|
|
|
|
|
return sceneGps;
|
|
return sceneGps;
|
|
}
|
|
}
|