| | |
| | | if( data.getHPVehicleStatus() ==null ){ |
| | | continue;//如何推送状态集合为空,不处理跳过 |
| | | } |
| | | //各车道车辆状态 |
| | | EventPlatformCarsStatusInfoRequest status = data.getHPVehicleStatus(); |
| | | PlatformEvent event = initPlatformEventModel(request,data,status); |
| | | if(StringUtils.isBlank(status.getPlateNo())){ |
| | | eventList.add(event);//封装事件(已月台通道为维度) |
| | | continue;//如果车辆信息为空,不处理直接跳过 |
| | | } |
| | | PlatformDevice model = platformDeviceMapper.selectOne(new QueryWrapper<PlatformDevice>().lambda() |
| | | .eq(PlatformDevice::getDeviceId,request.getSrcIndex()) |
| | | .eq(PlatformDevice::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1")); |
| | | if(model ==null){ |
| | | eventList.add(event);//封装事件(已月台通道为维度) |
| | | continue;//监控点未同步,跳过处理 |
| | | |
| | | } |
| | | //各车道车辆状态 |
| | | EventPlatformCarsStatusInfoRequest status = data.getHPVehicleStatus(); |
| | | eventList.add(initPlatformEventModel(request,data,status));//封装事件(已月台通道为维度) |
| | | if(StringUtils.isBlank(status.getPlateNo())){ |
| | | continue;//如果车辆信息为空,不处理直接跳过 |
| | | } |
| | | event.setPlatformId(model.getPlatformId());//月台编码 |
| | | eventList.add(event);//封装事件(已月台通道为维度) |
| | | //截掉第一个颜色汉字,去掉“挂”字 |
| | | status.setPlateNo(status.getPlateNo().substring(1,status.getPlateNo().length()).replace("挂","")); |
| | | PlatformJob job = platformJobMapper.selectJoinOne(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | |
| | | .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//后车牌号 |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO ) |
| | | .last("limit 1 ")); |
| | | if(job == null){ |
| | | continue;//如果作业为空,跳过处理 |
| | | } |
| | | PlatformJob update = new PlatformJob(); |
| | | update.setId(job.getId()); |
| | | update.setEditDate(new Date()); |
| | | if(StringUtils.equals(status.getMotionStatus(),"leave")){ |
| | | //如果是车辆离开,不做相关自动完成作业业务处理 |
| | | /* if(job ==null && !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | /* if(job ==null && !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | continue;//如果没查到对应的作业或者作业并非作业中,不做业务处理 |
| | | } |
| | | if(Constants.equalsInteger(job.getType(), Constants.THREE) || Constants.equalsInteger(job.getType(), Constants.TWO)){ |
| | |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames); |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |
| | |
| | | } |
| | | } |
| | | |
| | | private PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames) { |
| | | /** |
| | | * 广播通知 |
| | | * @param model |
| | | * @param broadcastList |
| | | * @param bNames |
| | | * @param content1 |
| | | * @return |
| | | */ |
| | | public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames , String content1) { |
| | | PlatformBroadcastLog log = new PlatformBroadcastLog(); |
| | | String content1 =Constants.PlatformBroadcastContent.WRONG_IN.getInfo(); |
| | | content1 = content1.replace("${param}",model.getCarCodeFront()); |
| | | |
| | | log.setCreateDate(new Date()); |