| | |
| | | upWarnMsgFileListAck.setInferiorPlatformId(inferiorPlatformId); |
| | | upWarnMsgFileListAck.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8))); |
| | | upWarnMsgFileListAckDao.save(upWarnMsgFileListAck); |
| | | //修改报警处理结果 |
| | | //修改报警附件数据 |
| | | UPWarnMsgAdptInfo upWarnMsgAdptInfo = upWarnMsgAdptInfoDao.findByInfoIdIs(upWarnMsgFileListAck.getInfoId()); |
| | | if(upWarnMsgFileListAck.getFileList().size() > 0){ |
| | | StringJoiner joiner = new StringJoiner(","); |
| | |
| | | joiner.add(file.getFileUrl()); |
| | | } |
| | | }); |
| | | upWarnMsgAdptInfo.setPicUrl(joiner.length() > 0 ? joiner.toString() : ""); |
| | | upWarnMsgAdptInfo.setPicUrl(joiner.toString()); |
| | | }else{ |
| | | upWarnMsgAdptInfo.setPicUrl("*"); |
| | | } |
| | | upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo); |
| | | } |
| | |
| | | //海康威视直接走接口 |
| | | if(25439966 == inferiorPlatformId){ |
| | | try { |
| | | if(null == upWarnMsgAdptInfo.getPicUrl()){ |
| | | if(!StringUtils.hasLength(upWarnMsgAdptInfo.getPicUrl())){ |
| | | FindPicturesByAlarmIdRequest findPicturesByAlarmIdRequest = new FindPicturesByAlarmIdRequest(); |
| | | findPicturesByAlarmIdRequest.setAlarmId(upWarnMsgAdptInfo.getInfoId()); |
| | | long warnTime = upWarnMsgAdptInfo.getWarnTime(); |
| | |
| | | String url = jsonObject1.getString("url"); |
| | | joiner.add(url); |
| | | } |
| | | upWarnMsgAdptInfo.setPicUrl(joiner.length() > 0 ? joiner.toString() : ""); |
| | | upWarnMsgAdptInfo.setPicUrl(joiner.length() > 0 ? joiner.toString() : "*"); |
| | | upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | //请求报警附件(川标协议) |
| | | if(enterprise.contains(inferiorPlatformId) && null == upWarnMsgAdptInfo.getPicUrl()){ |
| | | if(enterprise.contains(inferiorPlatformId) && !StringUtils.hasLength(upWarnMsgAdptInfo.getPicUrl())){ |
| | | DOWNWarnMsgFileListReq downWarnMsgFileListReq = new DOWNWarnMsgFileListReq(); |
| | | downWarnMsgFileListReq.setVehicleNo(upWarnMsgAdptInfo.getVehicleNo()); |
| | | downWarnMsgFileListReq.setVehicleColor(upWarnMsgAdptInfo.getVehicleColor()); |
| | |
| | | } |
| | | } |
| | | |
| | | down_warn_msg_urge_todo_req(upWarnMsgAdptInfo); |
| | | // down_warn_msg_urge_todo_req(upWarnMsgAdptInfo); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | upWarnMsgAdptInfo.setInfoId(data.getAlarmId()); |
| | | upWarnMsgAdptInfo.setLevel(getLevel(data.getLevel())); |
| | | if(null != data.getLatitude()){ |
| | | upWarnMsgAdptInfo.setLongitude(data.getLatitude().intValue() * 10); |
| | | } |
| | | if(null != data.getLongitude()){ |
| | | upWarnMsgAdptInfo.setLatitude(data.getLongitude().intValue()); |
| | | // if(null != data.getLatitude()){ |
| | | // upWarnMsgAdptInfo.setLongitude(data.getLatitude().intValue() * 10); |
| | | // } |
| | | // if(null != data.getLongitude()){ |
| | | // upWarnMsgAdptInfo.setLatitude(data.getLongitude().intValue()); |
| | | // } |
| | | //调用获取实时定位数据 |
| | | UPExgMsgRealLocation upExgMsgRealLocation = upExgMsgRealLocationDao.findByVehicleNoOrderByCreateTimeDesc(upWarnMsgAdptInfo.getVehicleNo()); |
| | | if (null != upExgMsgRealLocation) { |
| | | GnssData gnssData = upExgMsgRealLocation.getGnssData(); |
| | | upWarnMsgAdptInfo.setSpeed(gnssData.getVec1()); |
| | | upWarnMsgAdptInfo.setLongitude(gnssData.getLon()); |
| | | upWarnMsgAdptInfo.setLatitude(gnssData.getLat()); |
| | | }else{ |
| | | return; |
| | | } |
| | | if(null != data.getHeight()){ |
| | | upWarnMsgAdptInfo.setAltitude(data.getHeight().intValue() / 10); |
| | |
| | | upWarnMsgAdptInfo.setPicUrl(joiner.toString()); |
| | | } |
| | | }else{ |
| | | upWarnMsgAdptInfo.setPicUrl(""); |
| | | upWarnMsgAdptInfo.setPicUrl("*"); |
| | | } |
| | | upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo); |
| | | |