Commit 337b6c7c by levphon

设备监控-设备有效位置校验

1 parent 96299015
...@@ -137,14 +137,12 @@ public class HdaoGpsComponent { ...@@ -137,14 +137,12 @@ public class HdaoGpsComponent {
|| StringUtils.isEmpty(poiSearchHolder.value)) { || StringUtils.isEmpty(poiSearchHolder.value)) {
return resultAddress; return resultAddress;
} }
resultAddress = poiSearchHolder.value; resultAddress = poiSearchHolder.value;
} catch (Ice.LocalException e) { } catch (Ice.LocalException e) {
log.error("mapGeoConvert ice localexception" + e.getMessage(), e); log.error("mapGeoConvert ice localexception" + e.getMessage(), e);
} catch (Exception e) { } catch (Exception e) {
log.error("mapGeoConvert ice exception" + e.getMessage(), e); log.error("mapGeoConvert ice exception" + e.getMessage(), e);
} }
log.info("mapGeoConvert ice添加接口调用结束");
return resultAddress; return resultAddress;
} }
...@@ -176,7 +174,7 @@ public class HdaoGpsComponent { ...@@ -176,7 +174,7 @@ public class HdaoGpsComponent {
BsInfo[] bsInfos = res.value.record.bsInfos; BsInfo[] bsInfos = res.value.record.bsInfos;
if (bsInfos != null && bsInfos.length > 0) { if (bsInfos != null && bsInfos.length > 0) {
log.info("基站位置信息:{}", JSON.toJSONString(bsInfos)); //log.info("基站位置信息:{}", JSON.toJSONString(bsInfos));
for (int i = 0; i < bsInfos.length; i++) { for (int i = 0; i < bsInfos.length; i++) {
BsInfo bsInfo = bsInfos[i]; BsInfo bsInfo = bsInfos[i];
if (bsInfo.lac > 0 && bsInfo.cellId > 0) { if (bsInfo.lac > 0 && bsInfo.cellId > 0) {
......
...@@ -204,9 +204,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -204,9 +204,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
throw BusinessException.create(String.format("设备%s已激活", dli.getSn())); throw BusinessException.create(String.format("设备%s已激活", dli.getSn()));
} }
if (Objects.equals(deviceDTO.getSource(), dli.getWireType())) { // if (Objects.equals(deviceDTO.getSource(), dli.getWireType())) {
throw BusinessException.create("设备有线无线类型校验有误"); // throw BusinessException.create("设备有线无线类型校验有误");
} // }
if (StringUtils.isNotEmpty(dli.getCheckCode())) {//如果设备参数带了设备验证码就校验验证码正确性 if (StringUtils.isNotEmpty(dli.getCheckCode())) {//如果设备参数带了设备验证码就校验验证码正确性
if (!dli.getCheckCode().equals(deviceDTO.getCheckCode())) { if (!dli.getCheckCode().equals(deviceDTO.getCheckCode())) {
......
...@@ -64,7 +64,7 @@ public class DeviceUtils { ...@@ -64,7 +64,7 @@ public class DeviceUtils {
} }
//无源设备 在线 //无源设备 在线
// 定位问题 // 定位问题
log.info(deviceStatus.getSn() + "设备source字段为" + deviceStatus.getSource()); //log.info(deviceStatus.getSn() + "设备source字段为" + deviceStatus.getSource());
if (deviceStatus.getSource() != null && ConstantsDevice.SOURCE_NO == deviceStatus.getSource()) { if (deviceStatus.getSource() != null && ConstantsDevice.SOURCE_NO == deviceStatus.getSource()) {
deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_ONLINE); deviceStatus.setStatus(ConstantsDevice.DEVICE_STATUS_ONLINE);
deviceStatus.setStatusTime(DateUtils.formatTimeInSec((now - trackTime) / 1000)); deviceStatus.setStatusTime(DateUtils.formatTimeInSec((now - trackTime) / 1000));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!