From 02af384faaa0572008405037e6e8917c7ad22136 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期四, 10 十月 2024 17:11:48 +0800 Subject: [PATCH] 最新版本 --- server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java | 46 ++++++++++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 16 deletions(-) diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java index c98d012..09ca01d 100644 --- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java +++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java @@ -865,34 +865,44 @@ 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) .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(PlatformJob::getIsdeleted,Constants.ZERO ) +// .eq(StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeFront,status.getPlateNo() )//鍓嶈溅鐗屽彿 +// .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//鍚庤溅鐗屽彿 + .eq(PlatformJob::getPlatformId,Constants.ZERO ) + .eq(PlatformJob::getIsdeleted,model.getPlatformId() ) + .orderByDesc(PlatformJob::getCallDate) .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)){ @@ -909,9 +919,14 @@ update.setDoneDate(update.getEditDate());*/ }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); + } + } if(job.getStartDate() == null){ update.setStartDate(update.getEditDate()); @@ -1074,8 +1089,7 @@ platformBroadcastLogMapper.insert(logList); } } - - private PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames) { + public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames) { PlatformBroadcastLog log = new PlatformBroadcastLog(); String content1 =Constants.PlatformBroadcastContent.WRONG_IN.getInfo(); content1 = content1.replace("${param}",model.getCarCodeFront()); -- Gitblit v1.9.3