Commit cd524a6a authored by caotao's avatar caotao

场站地图接口修改

parent 521f0a24
...@@ -7,6 +7,6 @@ import java.util.ArrayList; ...@@ -7,6 +7,6 @@ import java.util.ArrayList;
@Data @Data
public class CameraInfo { public class CameraInfo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private ArrayList<Integer> position; private ArrayList<Double> position;
private ArrayList<Integer>target; private ArrayList<Double>target;
} }
...@@ -282,15 +282,10 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio ...@@ -282,15 +282,10 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
StationInfoDto stationInfoDto =new StationInfoDto(); StationInfoDto stationInfoDto =new StationInfoDto();
stationInfoDto.setStationName(stationRecordInfo.getStationName()); stationInfoDto.setStationName(stationRecordInfo.getStationName());
stationInfoDto.setType(stationRecordInfo.getStationType()); stationInfoDto.setType(stationRecordInfo.getStationType());
stationInfoDto.setUrl("https://www.baidu.com"); stationInfoDto.setUrl("https://tse4-mm.cn.bing.net/th/id/OIP-C.ySnewoc464X4Aecg9jl03AAAAA?w=162&h=180&c=7&r=0&o=5&pid=1.7");
stationInfoDto.setJumpPath(stationRecordInfo.getJumpPath()); stationInfoDto.setJumpPath(stationRecordInfo.getJumpPath());
if(stationRecordInfo.getBelongArea()!=null){ if(stationRecordInfo.getBelongArea()!=null){
String [] strings = stationRecordInfo.getBelongArea().replace("[","").replace("]","").split(","); stationInfoDto.setRegion(this.getProviceName(stationRecordInfo.getBelongArea()));
if(strings.length>0){
Region region =regionServiceImpl.getRegionByRegionCode(strings[0]);
stationInfoDto.setRegion(region.getRegionName().replace("省","").replace("市",""));
}
} }
ArrayList<Double> arrayList=MapUtils.geoTo3d(Double.valueOf(stationRecordInfo.getLongitude()),Double.valueOf(stationRecordInfo.getLaitude())); ArrayList<Double> arrayList=MapUtils.geoTo3d(Double.valueOf(stationRecordInfo.getLongitude()),Double.valueOf(stationRecordInfo.getLaitude()));
stationInfoDto.setTitlePos(arrayList); stationInfoDto.setTitlePos(arrayList);
...@@ -305,5 +300,15 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio ...@@ -305,5 +300,15 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
return stationBasicMapper.getStationPersonByStationID(id); return stationBasicMapper.getStationPersonByStationID(id);
} }
public String getProviceName (String belongArea){
String proviceName = "湖北";
if(belongArea!=null){
String [] strings = belongArea.replace("[","").replace("]","").split(",");
if(strings.length>0){
Region region =regionServiceImpl.getRegionByRegionCode(strings[0]);
proviceName = region.getRegionName().replace("省","").replace("市","");
}
}
return proviceName;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment