Commit 3e76a32b by levphon

工单标准接口-有效位置点验证

1 parent 490f0aad
...@@ -627,30 +627,27 @@ public class WorkOrderService { ...@@ -627,30 +627,27 @@ public class WorkOrderService {
devices.add(item); devices.add(item);
}); });
//运营激活,不需要验证位置点 //验证位置点
if (isApiCall) { DeviceLocationRequest deviceLocationRequest = new DeviceLocationRequest();
DeviceLocationRequest deviceLocationRequest = new DeviceLocationRequest(); deviceLocationRequest.setVerifyTimeFlag(true);
deviceLocationRequest.setVerifyTimeFlag(true); deviceLocationRequest.setBsBackfillGps(true);
deviceLocationRequest.setBsBackfillGps(true); deviceLocationRequest.setDevices(devices);
deviceLocationRequest.setDevices(devices); R<List<GpsBsData>> listR = gpsBsFeignService.locationCheck(deviceLocationRequest);
R<List<GpsBsData>> listR = gpsBsFeignService.locationCheck(deviceLocationRequest); log.info("工单{}位置点验证结果:{}", verifyBO.getBizWorkOrderNo(), JSONUtil.toJsonStr(listR));
log.info("工单{}位置点验证结果:{}", verifyBO.getBizWorkOrderNo(), JSONUtil.toJsonStr(listR)); if (!listR.isSuccess()) {
if (!listR.isSuccess()) { throw new StdInterfaceException(String.valueOf(listR.getCode()), listR.getMessage());
throw new StdInterfaceException(String.valueOf(listR.getCode()), listR.getMessage()); } else {
} else { List<GpsBsData> gpsBsDataList = listR.getDataList(new TypeToken<List<GpsBsData>>() {
List<GpsBsData> gpsBsDataList = listR.getDataList(new TypeToken<List<GpsBsData>>() { }.getType());
}.getType()); gpsBsDataList.forEach(gdb -> {
gpsBsDataList.forEach(gdb -> { if (!gdb.getGpsVerifyResult() && !gdb.getBsVerifyResult()) {
if (!gdb.getGpsVerifyResult() && !gdb.getBsVerifyResult()) { Map<String, String> errorMap = Maps.newHashMap();
Map<String, String> errorMap = Maps.newHashMap(); errorMap.put(gdb.getSn(), "设备有效位置验证不通过");
errorMap.put(gdb.getSn(), "设备有效位置验证不通过"); throw new StdInterfaceException("2145415", String.format("设备%s有效位置验证不通过", gdb.getSn()), Lists.newArrayList(errorMap));
throw new StdInterfaceException("2145415", String.format("设备%s有效位置验证不通过", gdb.getSn()), Lists.newArrayList(errorMap)); }
} });
}); return gpsBsDataList;
return gpsBsDataList;
}
} }
return Lists.newArrayList();
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!