| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.dataInterchange.dao.UPExgMsgRealLocationDao; |
| | | import com.ruoyi.dataInterchange.dao.UPWarnMsgAdptInfoDao; |
| | | import com.ruoyi.dataInterchange.dao.UPWarnMsgOperationInfoDao; |
| | | import com.ruoyi.dataInterchange.dao.UPWarnMsgUrgeTodoAckDao; |
| | | import com.ruoyi.dataInterchange.model.*; |
| | | import com.ruoyi.dataInterchange.model.enu.DataType; |
| | |
| | | private UPWarnMsgAdptInfoDao upWarnMsgAdptInfoDao; |
| | | |
| | | @Resource |
| | | private UPWarnMsgOperationInfoDao upWarnMsgOperationInfoDao; |
| | | |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Resource |
| | |
| | | case UP_WARN_MSG_ADPT_INFO: |
| | | log.info("上报报警信息({}):{}", DataType.UP_WARN_MSG_ADPT_INFO.getCode(), out); |
| | | up_warn_msg_adpt_info(ctx, out.getGnsscenterId(), warnMsg); |
| | | break; |
| | | case UP_WARN_MSG_OPERATION_INFO: |
| | | log.info("上报报警处理信息({}):{}", DataType.UP_WARN_MSG_OPERATION_INFO.getCode(), out); |
| | | up_warn_msg_operation_info(ctx, out.getGnsscenterId(), warnMsg); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | |
| | | |
| | | /** |
| | | * 上报报警处理信息 |
| | | * @param ctx |
| | | * @param inferiorPlatformId |
| | | * @param warnMsg |
| | | */ |
| | | public void up_warn_msg_operation_info(ChannelHandlerContext ctx, int inferiorPlatformId, WarnMsg warnMsg) { |
| | | UPWarnMsgOperationInfo upWarnMsgOperationInfo = new UPWarnMsgOperationInfo().decode(warnMsg); |
| | | upWarnMsgOperationInfo.setInferiorPlatformId(inferiorPlatformId); |
| | | upWarnMsgOperationInfo.setCreateTime(LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8))); |
| | | upWarnMsgOperationInfoDao.save(upWarnMsgOperationInfo); |
| | | //修改报警处理结果 |
| | | UPWarnMsgAdptInfo upWarnMsgAdptInfo = upWarnMsgAdptInfoDao.findByInfoIdIs(upWarnMsgOperationInfo.getInfoId()); |
| | | upWarnMsgAdptInfo.setResult(upWarnMsgOperationInfo.getResult()); |
| | | upWarnMsgAdptInfoDao.save(upWarnMsgAdptInfo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时任务督办报警请求 |
| | | */ |
| | | public void taskUrgeTodo() { |