|  |  | 
 |  |  |                     updateVistis.setOutInfo("访客正常签离"); | 
 |  |  |                 } | 
 |  |  |                 delRetentionLis.add(visits.getMemberId()); | 
 |  |  |             }else{ | 
 |  |  |                 //如果人员信息存在,切是访客通行,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件) | 
 |  |  |             }else  if(!(request.getData().getParamValues()!=null | 
 |  |  |                         && StringUtils.isNotBlank(request.getData().getParamValues().getPlateNos()) | 
 |  |  |                         && StringUtils.isNotBlank(request.getData().getParamValues().getParkIndex()))){ | 
 |  |  |                 //只处理访客门禁通行通行, | 
 |  |  |                 //如果人员信息存在,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件) | 
 |  |  |                 delRetentionLis.add(visits.getMemberId()); | 
 |  |  |                 InoutRecord record = new InoutRecord(); | 
 |  |  |                 record.setDeviceName((request.getData()!=null &&request.getData().getParamValues()!=null)? | 
 |  |  | 
 |  |  |                 } | 
 |  |  |                 if( request.getData().getParamValues()!=null | 
 |  |  |                         && StringUtils.isNotBlank(request.getData().getParamValues().getPlateNos()) | 
 |  |  |                         && StringUtils.isNotBlank(request.getData().getParamValues().getParkIndex())){ | 
 |  |  |                         && StringUtils.isNotBlank(request.getData().getParamValues().getParkIndex())) { | 
 |  |  |                     //如果是停车场事件,记录车辆类型 | 
 |  |  |                     Category category = null; | 
 |  |  |                     record.setCarCode(request.getData().getParamValues().getPlateNos()); | 
 |  |  |                     if(StringUtils.isNotBlank(record.getCarCode())){ | 
 |  |  |                     if (StringUtils.isNotBlank(record.getCarCode())) { | 
 |  |  |                         category = categoryMapper.selectJoinOne(Category.class, new MPJLambdaWrapper<Category>() | 
 |  |  |                                 .selectAll(Category.class) | 
 |  |  |                                 .select("t4.name",Category::getParentName) | 
 |  |  |                                 .select("t4.name", Category::getParentName) | 
 |  |  |                                 .leftJoin("category t4 on t.parent_id=t4.id") | 
 |  |  |                                 .eq(Category::getIsdeleted,Constants.ZERO) | 
 |  |  |                                 .eq(Category::getBizType,Constants.RetentionCarType.fkCar) | 
 |  |  |                                 .eq(Category::getIsdeleted, Constants.ZERO) | 
 |  |  |                                 .eq(Category::getBizType, Constants.RetentionCarType.fkCar) | 
 |  |  |                                 .last("limit 1")); | 
 |  |  |                         if(category ==null){ | 
 |  |  |                         if (category == null) { | 
 |  |  |                             category = new Category(); | 
 |  |  |                             category.setName("访客车辆"); | 
 |  |  |                         } | 
 |  |  |                         category.setParentName(StringUtils.defaultString(category.getParentName(),"访客车辆")); | 
 |  |  |                         category.setParentName(StringUtils.defaultString(category.getParentName(), "访客车辆")); | 
 |  |  |                     } | 
 |  |  |                     record.setCarBizType(Constants.RetentionCarType.fkCar); | 
 |  |  |                     record.setCategoryId(category.getId()); | 
 |  |  | 
 |  |  |                     record.setCategoryName(category.getName()); | 
 |  |  |                     record.setCategoryParentId(category.getParentId()); | 
 |  |  |                     record.setCategoryParentName(category.getParentName()); | 
 |  |  |                     if(Constants.equalsInteger(record.getInOrOut(),Constants.ONE)){ | 
 |  |  |                     if (Constants.equalsInteger(record.getInOrOut(), Constants.ONE)) { | 
 |  |  |                         record.setRemark("访客跟随车辆离园并自动签离"); | 
 |  |  |                         try { | 
 |  |  |                             //访客申请自动签离 | 
 |  |  |                             visitsService.visitLevelForCarOut(visits); | 
 |  |  |                         }catch (Exception e){ | 
 |  |  |                             log.error("访客跟随车辆出园自动签离失败:==========="+e.getMessage()); | 
 |  |  |                         } catch (Exception e) { | 
 |  |  |                             log.error("访客跟随车辆出园自动签离失败:===========" + e.getMessage()); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |                 inoutRecordList.add(record); | 
 |  |  |                 inoutRecordList.add(record);//进出记录 | 
 |  |  |             } | 
 |  |  |             updateVistis.setEditDate(new Date()); | 
 |  |  |             //更新访客来访或者签离时间信息 | 
 |  |  | 
 |  |  |         String result = null; | 
 |  |  |         log.info("【海康停车场事件推送】========开始=========:\n"+JSONObject.toJSONString(param)); | 
 |  |  |         try { | 
 |  |  |             if(param == null || param.getParams() == null || param.getParams().getEvents()==null){ | 
 |  |  |             if(param == null | 
 |  |  |                     || param.getParams() == null | 
 |  |  |                     || param.getParams().getEvents()==null){ | 
 |  |  |                 return null; | 
 |  |  |             } | 
 |  |  |             //门禁事件集合 | 
 |  |  | 
 |  |  |                     carrecord.setCategoryParentId(category.getParentId()); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             //处理自有车自动签到业务 | 
 |  |  |             dealSelTruckAutoSignBiz(request,event); | 
 |  |  |             if(Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.PARK_PASS_IN.getKey()){ | 
 |  |  |                 //处理自有车自动签到业务 | 
 |  |  |                 dealSelTruckAutoSignBiz(request,event); | 
 |  |  |                 //如果是入厂放行 | 
 |  |  |                 delRetentionList.add(event.getPlateNos()); | 
 |  |  |                 Retention dm = new Retention(); | 
 |  |  | 
 |  |  |                     event.setCarType(Constants.RetentionCarType.fkCar); | 
 |  |  |                     int index =0; | 
 |  |  |                     carrecord.setCarBizType(Constants.RetentionCarType.fkCar); | 
 |  |  |                     if(1==2){ | 
 |  |  |                         Category category =findCategoryByBizType(Constants.RetentionCarType.fkCar,"访客车辆","访客车辆",categoryList); | 
 |  |  |                         carrecord.setCategoryId(category.getId()); | 
 |  |  |                         carrecord.setCategoryName(StringUtils.defaultString(category.getName(),"访客车辆")); | 
 |  |  |                         carrecord.setCategoryParentName(StringUtils.defaultString(category.getParentName(),"访客车辆")); | 
 |  |  |                         carrecord.setCategoryParentId(category.getParentId()); | 
 |  |  |                         for(Visits v :visitsList){ | 
 |  |  |                     Category category =findCategoryByBizType(Constants.RetentionCarType.fkCar,"访客车辆","访客车辆",categoryList); | 
 |  |  |                     carrecord.setCategoryId(category.getId()); | 
 |  |  |                     carrecord.setCategoryName(StringUtils.defaultString(category.getName(),"访客车辆")); | 
 |  |  |                     carrecord.setCategoryParentName(StringUtils.defaultString(category.getParentName(),"访客车辆")); | 
 |  |  |                     carrecord.setCategoryParentId(category.getParentId()); | 
 |  |  |                     for(Visits v :visitsList){ | 
 |  |  | //                        if(v.getEndtime()!=null && v.getEndtime().getTime() < System.currentTimeMillis()){ | 
 |  |  |                             Retention dm = new Retention(); | 
 |  |  |                             dm.setMemberId(event.getMemberId()); | 
 |  |  |                             dm.setPhone(carrecord.getMemberPhone()); | 
 |  |  | 
 |  |  |                                 inoutDayCount.setInVisitorNum(Constants.formatIntegerNum(inoutDayCount.getInVisitorNum())+1); | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  | //                    } | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             if(isCarInOrOutEvent(request) && event.getCarType() !=null && !event.getCarType().equals(Constants.RetentionCarType.fkCar)){ | 
 |  |  | 
 |  |  |         Category category  = new Category(); | 
 |  |  |         category.setName(tempname); | 
 |  |  |         category.setParentName(pName); | 
 |  |  |         return null; | 
 |  |  |         return category; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private void dealSelTruckAutoSignBiz(EventParkInfoRequest request, CarEvent event) { | 
 |  |  | 
 |  |  |                         .in(PlatformJob::getStatus, | 
 |  |  |                                 Constants.PlatformJobStatus.IN_WAIT.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.CALLED.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.WAIT_CALL.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.WORKING.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.TRANSFERING.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.OVER_NUMBER.getKey(), | 
 |  |  |                                 Constants.PlatformJobStatus.EXCEPTION.getKey() | 
 |  |  |                         ) | 
 |  |  |                 )==Constants.ZERO){//如果没进行中任务 |