Commit c416bc8d by levphon

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

1 parent c753404e
......@@ -61,6 +61,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
@Autowired
private DeviceService deviceService;
@Autowired
private EShieldService eShieldService;
@Override
public List<GpsBsData> getLastGpsBsBatch(GpsBsLastBatchRequest gpsBsLastBatchRequest) {
// 1、调用ICE批量获取数据
......@@ -180,11 +183,14 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
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位置点等
if (gpsLocationVerify || gmsLocationVerify) {
log.info("设备{} GPS验证{},基站验证{}", sn, gpsLocationVerify, gmsLocationVerify);
if (gpsLocationVerify || bsLocationVerify) {
log.info("设备{} GPS验证{},基站验证{}", sn, gpsLocationVerify, bsLocationVerify);
if (!gpsLocationVerify && locationRequest.getBsBackfillGps()) {
fillGpsData(sn, gpsBsData.getBsLocation());
}
......@@ -222,9 +228,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
throw BusinessException.create(String.format("设备 %s 未入库,请更换其他设备", dli.getSn()));
}
// if (Objects.equals(deviceDTO.getSource(), dli.getWireType())) {
// throw BusinessException.create("设备有线无线类型校验有误");
// }
if (!Objects.equals(deviceDTO.getSource(), dli.getWireType())) {
throw BusinessException.create("设备有线无线类型校验有误");
}
if (StringUtils.isNotEmpty(dli.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!