puzhibing
2025-05-30 35b0088fa28dab8a28758dcbcc056620c1ea5e2c
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/server/WarnMsgService.java
@@ -54,6 +54,9 @@
   private UPExgMsgRealLocationDao upExgMsgRealLocationDao;
   //走川标的公司
   private List<Integer> enterprise = Arrays.asList(17458936, 43984060, 13914394);
   //固定报警类型
   private List<Integer> warnType = Arrays.asList(0x0201, 0x0012, 0x0203, 0x0208, 0x0002, 0x0212, 0x0214, 0x0213, 0x0217, 0x0307);
   
   public void up_warn_msg(ChannelHandlerContext ctx, OuterPacket out) {
      if (!redisTemplate.hasKey("login:" + out.getGnsscenterId())) {
@@ -140,7 +143,7 @@
            upWarnMsgAdptInfo.setLongitude(gnssData.getLon());
            upWarnMsgAdptInfo.setLatitude(gnssData.getLat());
         }
      }else if(2 != upWarnMsgAdptInfo.getLevel()){
      }else if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){
         return;
      }
      upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo);
@@ -207,15 +210,17 @@
         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);
         upWarnMsgAdptInfo.setStatus(data.getStatus());
         upWarnMsgAdptInfo.setDirection(data.getDirection() / 100);
         upWarnMsgAdptInfo.setInfoContent(data.getAlarmInfo());
         if(2 == upWarnMsgAdptInfo.getLevel()){
         upWarnMsgAdptInfo.setInferiorPlatformId(25439966);
         upWarnMsgAdptInfo.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8)));
         if(!warnType.contains(upWarnMsgAdptInfo.getWarnType())){
            return;
         }
         upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo);