Commit c416bc8d by levphon

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

1 parent c753404e
...@@ -61,6 +61,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -61,6 +61,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
@Autowired @Autowired
private DeviceService deviceService; private DeviceService deviceService;
@Autowired
private EShieldService eShieldService;
@Override @Override
public List<GpsBsData> getLastGpsBsBatch(GpsBsLastBatchRequest gpsBsLastBatchRequest) { public List<GpsBsData> getLastGpsBsBatch(GpsBsLastBatchRequest gpsBsLastBatchRequest) {
// 1、调用ICE批量获取数据 // 1、调用ICE批量获取数据
...@@ -180,11 +183,14 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -180,11 +183,14 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
boolean gpsLocationVerify = isGpsBsDataValid(locationRequest.getGpsValidMinute(), gpsLocation); boolean gpsLocationVerify = isGpsBsDataValid(locationRequest.getGpsValidMinute(), gpsLocation);
//基站有效定位验证 //基站有效定位验证
boolean gmsLocationVerify = isGpsBsDataValid(locationRequest.getBsValidMinute(), bsLocation); boolean bsLocationVerify = isGpsBsDataValid(locationRequest.getBsValidMinute(), bsLocation);
gpsBsData.setGpsVerifyResult(gpsLocationVerify);
gpsBsData.setBsVerifyResult(bsLocationVerify);
// 新e盾激活是否也基站激活 ,回填GPS位置点等 // 新e盾激活是否也基站激活 ,回填GPS位置点等
if (gpsLocationVerify || gmsLocationVerify) { if (gpsLocationVerify || bsLocationVerify) {
log.info("设备{} GPS验证{},基站验证{}", sn, gpsLocationVerify, gmsLocationVerify); log.info("设备{} GPS验证{},基站验证{}", sn, gpsLocationVerify, bsLocationVerify);
if (!gpsLocationVerify && locationRequest.getBsBackfillGps()) { if (!gpsLocationVerify && locationRequest.getBsBackfillGps()) {
fillGpsData(sn, gpsBsData.getBsLocation()); fillGpsData(sn, gpsBsData.getBsLocation());
} }
...@@ -222,9 +228,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -222,9 +228,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())) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!