Commit 18d2c3ce by levphon

激活设备有效位置验证规则调整

1 parent ad14bbef
......@@ -886,11 +886,24 @@ public class WorkOrderService {
});
//验证位置点
DeviceLocationRequest deviceLocationRequest = new DeviceLocationRequest();
deviceLocationRequest.setVerifyTimeFlag(true);
deviceLocationRequest.setBsBackfillGps(true);
deviceLocationRequest.setDevices(devices);
R<List<GpsBsData>> listR = gpsBsFeignService.locationCheck(deviceLocationRequest);
DeviceLocationRequest locationRequest = new DeviceLocationRequest();
locationRequest.setVerifyTimeFlag(true);
locationRequest.setBsBackfillGps(true);
// V1.6.0需求
// 包活干请求新E盾平台,激活车辆档案时效,更新为3小时
// 新E盾审核工单时效,更新为24小时。
// 时效开始时间,以设备最新定位时间为准。
if (isApiCall) {
locationRequest.setGpsValidMinute(3 * 60);
locationRequest.setBsValidMinute(24 * 60);
} else {
locationRequest.setGpsValidMinute(24 * 60);
locationRequest.setBsValidMinute(24 * 60);
}
locationRequest.setDevices(devices);
R<List<GpsBsData>> listR = gpsBsFeignService.locationCheck(locationRequest);
log.info("工单{}位置点验证结果:{}", workOrder.getOrderNo(), JSONUtil.toJsonStr(listR));
if (!listR.isSuccess()) {
throw new StdInterfaceException(String.valueOf(listR.getCode()), listR.getMessage());
......@@ -1104,6 +1117,7 @@ public class WorkOrderService {
/**
* 激活和审核工单时 更新车架号和工单号
*
* @param workOrder
* @param orderReq
* @return
......@@ -1111,7 +1125,7 @@ public class WorkOrderService {
public Boolean updateWorkOrderVin(WorkOrder workOrder, WorkOrderActivateBO orderReq) {
boolean updateFlag = false;
WorkOrderVehicle workOrderVehicle = workOrderVehicleMapper.selectOneByOrderId(workOrder.getId());
if (workOrderVehicle==null) {
if (workOrderVehicle == null) {
return updateFlag;
}
......@@ -1138,11 +1152,11 @@ public class WorkOrderService {
private Boolean validUpdateVehicle(Long id, String vin) {
Boolean updateRes = false;
if (id==null || StringUtils.isBlank(vin)) {
if (id == null || StringUtils.isBlank(vin)) {
return updateRes;
}
Vehicle vehicle = vehicleService.getVehicleInfoByWorkOrderIdAndVin(id, vin);
updateRes = (vehicle==null)?true:false;
updateRes = (vehicle == null) ? true : false;
return updateRes;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!