支持从第三方读取地图配置
This commit is contained in:
@@ -122,7 +122,6 @@ public class DeviceChannel extends CommonGBChannel {
|
||||
@Schema(description = "经度 WGS-84坐标系")
|
||||
private Double longitude;
|
||||
|
||||
|
||||
@MessageElementForCatalog("Latitude")
|
||||
@Schema(description = ",纬度 WGS-84坐标系")
|
||||
private Double latitude;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RedisGroupMessage {
|
||||
|
||||
/**
|
||||
* 分组国标ID
|
||||
*/
|
||||
private String groupGbId;
|
||||
|
||||
/**
|
||||
* 分组别名
|
||||
*/
|
||||
private String groupAlias;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 分组所属的行政区划
|
||||
*/
|
||||
private String groupCivilCode;
|
||||
|
||||
/**
|
||||
* 分组所属父分组国标ID
|
||||
*/
|
||||
private String parentGroupGbId;
|
||||
|
||||
/**
|
||||
* 分组所属父分组别名
|
||||
*/
|
||||
private String parentGAlias;
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
RedisGroupMessage redisGroupMessage = new RedisGroupMessage();
|
||||
redisGroupMessage.setGroupAlias("100000001");
|
||||
redisGroupMessage.setGroupName("消防大队");
|
||||
System.out.println(JSON.toJSONString(redisGroupMessage));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.redisMsg.IRedisRpcPlayService;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.utils.Coordtransform;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
||||
@@ -434,6 +435,17 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||
|
||||
@Override
|
||||
public void updateChannelGPS(Device device, DeviceChannel deviceChannel, MobilePosition mobilePosition) {
|
||||
|
||||
if (device.getGeoCoordSys().equalsIgnoreCase("GCJ02")) {
|
||||
Double[] wgs84Position = Coordtransform.GCJ02ToWGS84(mobilePosition.getLongitude(), mobilePosition.getLatitude());
|
||||
mobilePosition.setLongitude(wgs84Position[0]);
|
||||
mobilePosition.setLatitude(wgs84Position[1]);
|
||||
|
||||
Double[] wgs84PositionForChannel = Coordtransform.GCJ02ToWGS84(deviceChannel.getLongitude(), deviceChannel.getLatitude());
|
||||
deviceChannel.setGbLongitude(wgs84PositionForChannel[0]);
|
||||
deviceChannel.setGbLatitude(wgs84PositionForChannel[1]);
|
||||
}
|
||||
|
||||
if (userSetting.getSavePositionHistory()) {
|
||||
deviceMobilePositionMapper.insertNewPosition(mobilePosition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user