puzhibing
2025-05-30 4ad32c37e3317fb6cb7cbfb034b53d3220c27db4
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/WarnMsgService.java
@@ -132,6 +132,9 @@
    */
   public void up_warn_msg_adpt_info(ChannelHandlerContext ctx, int inferiorPlatformId, WarnMsg warnMsg) {
      UPWarnMsgAdptInfo upWarnMsgAdptInfo = enterprise.contains(inferiorPlatformId) ? new UPWarnMsgAdptInfo().decode2(warnMsg) : new UPWarnMsgAdptInfo().decode1(warnMsg);
      if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){
         return;
      }
      upWarnMsgAdptInfo.setResult(0x00);
      upWarnMsgAdptInfo.setInferiorPlatformId(inferiorPlatformId);
      upWarnMsgAdptInfo.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8)));
@@ -143,8 +146,6 @@
            upWarnMsgAdptInfo.setLongitude(gnssData.getLon());
            upWarnMsgAdptInfo.setLatitude(gnssData.getLat());
         }
      }else if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){
         return;
      }
      upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo);
   }
@@ -210,8 +211,8 @@
         upWarnMsgAdptInfo.setWarnTime(LocalDateTime.parse(data.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")).toEpochSecond(ZoneOffset.ofHours(8)));
         upWarnMsgAdptInfo.setInfoId(data.getAlarmId());
         upWarnMsgAdptInfo.setLevel(getLevel(data.getLevel()));
         upWarnMsgAdptInfo.setLongitude(data.getLongitude().intValue());
         upWarnMsgAdptInfo.setLatitude(data.getLatitude().intValue());
         upWarnMsgAdptInfo.setLongitude(data.getLatitude().intValue() * 10);
         upWarnMsgAdptInfo.setLatitude(data.getLongitude().intValue());
         upWarnMsgAdptInfo.setAltitude(data.getHeight().intValue() / 10);
         upWarnMsgAdptInfo.setSpeed(data.getSpeed().intValue() / 100000);
         upWarnMsgAdptInfo.setVec2(data.getSpeed().intValue() / 100000);