#
Junjie
昨天 d193355c76cfbec572408f9a256c970699c9a542
src/main/java/com/zy/core/thread/impl/ZyStationThread.java
@@ -1,7 +1,7 @@
package com.zy.core.thread.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.Cools;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.service.BasDevpService;
@@ -19,7 +19,6 @@
import com.zy.core.network.ZyStationConnectDriver;
import com.zy.core.cache.MessageQueue;
import com.zy.core.cache.OutputQueue;
import com.zy.core.enums.RedisKeyType;
import com.zy.core.enums.SlaveType;
import com.zy.core.enums.StationCommandType;
import com.zy.core.model.CommandResponse;
@@ -31,6 +30,7 @@
import java.text.MessageFormat;
import java.util.*;
import com.zy.core.utils.DeviceLogRedisKeyBuilder;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -110,7 +110,7 @@
            }
            BasDevp basDevp = basDevpService
                    .selectOne(new EntityWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo()));
                    .getOne(new QueryWrapper<BasDevp>().eq("devp_no", deviceConfig.getDeviceNo()));
            if (basDevp == null) {
                return;
            }
@@ -165,7 +165,7 @@
            deviceDataLog.setDeviceNo(deviceConfig.getDeviceNo());
            deviceDataLog.setCreateTime(new Date());
            redisUtil.set(RedisKeyType.DEVICE_LOG_KEY.key + System.currentTimeMillis(), deviceDataLog, 60 * 60 * 24);
            redisUtil.set(DeviceLogRedisKeyBuilder.build(deviceDataLog), deviceDataLog, 60 * 60 * 24);
            //更新采集时间
            deviceDataLogTime = System.currentTimeMillis();
        }
@@ -236,7 +236,7 @@
                   JSON.toJSONString(commandResponse)
           );
           if (optService != null) {
               optService.insert(basStationOpt);
               optService.save(basStationOpt);
           }
       }
    }