| | |
| | | member.setLastVisitDate(updateVistis.getInDate()); |
| | | member.setId(visits.getMemberId()); |
| | | memberMapper.updateById(member); |
| | | }else if (Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_ICCM_OUT.getKey()) { |
| | | }else if (Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_ICCM_OUT.getKey()) { |
| | | //如果是访客签离事件 |
| | | updateVistis.setStatus(Constants.VisitStatus.signout); |
| | | updateVistis.setInDate(DateUtil.getISO8601DateByStr(data.getBeginTime())); |
| | |
| | | updateVistis.setEditDate(new Date()); |
| | | //更新访客来访或者签离时间信息 |
| | | visitsMapper.updateById(updateVistis) ; |
| | | |
| | | } |
| | | } |
| | | private Retention getRetentionModelByVisitRequest(Visits visits, String happentTime,String srcType) { |
| | |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeFront,status.getPlateNo() )//前车牌号 |
| | | .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//后车牌号 |
| | | // .eq(StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeFront,status.getPlateNo() )//前车牌号 |
| | | // .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//后车牌号 |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO ) |
| | | .eq(PlatformJob::getPlatformId,model.getPlatformId() ) |
| | | .orderByDesc(PlatformJob::getCallDate) |
| | | .last("limit 1 ")); |
| | | if(job == null){ |
| | | continue;//如果作业为空,跳过处理 |
| | |
| | | //如果是正在作业的状态,标记作业已完成 |
| | | update.setStatus(Constants.PlatformJobStatus.DONE.getKey());//作业已完成 |
| | | update.setDoneDate(update.getEditDate());*/ |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) || |
| | | Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){ |
| | | if(((StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeFront(),status.getPlateNo())) |
| | | ||(!StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeBack(),status.getPlateNo())) |
| | | )){ |
| | | //说明车辆进错月台 或者还未叫号状态,发起警告 |
| | | // dealCarsInErrorPlatformBiz(job,status); |
| | | update.setInOut(Constants.ZERO);//车辆已经离开 |
| | | platformJobMapper.updateById(update); |
| | | } |
| | | } |
| | | }else if(StringUtils.equals(status.getMotionStatus(),"enter")){ |
| | | //如果是车辆进入 |
| | | if(job ==null || !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | | //说明车辆进错月台 或者还未叫号状态,发起警告 |
| | | dealCarsInErrorPlatformBiz(job,status); |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | | if(!((StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeFront(),status.getPlateNo())) |
| | | ||(!StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeBack(),status.getPlateNo())) |
| | | )){ |
| | | //说明车辆进错月台 或者还未叫号状态,发起警告 |
| | | dealCarsInErrorPlatformBiz(job,status); |
| | | }else{ |
| | | //车辆已经进入 |
| | | update.setInOut(Constants.ONE);//车辆已经进入 |
| | | platformJobMapper.updateById(update); |
| | | } |
| | | } |
| | | if(job.getStartDate() == null){ |
| | | /*if(job.getStartDate() == null){ |
| | | update.setStartDate(update.getEditDate()); |
| | | } |
| | | update.setStatus(Constants.PlatformJobStatus.WORKING.getKey());//开始作业 |
| | | */ |
| | | }else{ |
| | | continue;//其他状态不处理,跳过 |
| | | } |
| | |
| | | return; |
| | | } |
| | | String content =Constants.PlatformLedContent.WRONG_IN.getInfo(); |
| | | content = content.replace("${param}",model.getPlatformName()); |
| | | content = content.replace("${param2}",model.getCarCodeFront()); |
| | | content = content.replace("${param2}",model.getPlatformName()); |
| | | content = content.replace("${param}",status.getPlateNo()); |
| | | List<String> broadcastList = new ArrayList<>(); |
| | | List<String> ledList = new ArrayList<>(); |
| | | String bNames = ""; |
| | | List<PlatformBroadcastLog> logList = new ArrayList<>(); |
| | | for(PlatformDevice device : deviceList){ |
| | | if(StringUtils.isNotBlank(device.getHkId())){ |
| | | if(StringUtils.isBlank(device.getHkId())){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | |
| | | PlatformBroadcastLog log = dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1); |
| | | logList.add(log); |
| | | ledList.add(device.getHkId()); |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.TWO)){ |
| | | //如果是广播点 |
| | | bNames += device.getName()+";"; |
| | | broadcastList.add(device.getHkId()); |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo().replace("${param}",status.getPlateNo())); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |