#AI
Junjie
1 天以前 58dc0727a11481c127fc6111b73fa309b03505b5
#AI
3个文件已修改
14 ■■■■■ 已修改文件
src/main/java/com/zy/core/ServerBootstrap.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/ServerBootstrap.java
@@ -17,7 +17,6 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.List;
@@ -35,7 +34,6 @@
    @Autowired
    private DeviceConfigService deviceConfigService;
    @PostConstruct
    @Async
    public void init() throws InterruptedException {
        News.info("核心控制层开始初始化...............................................");
src/main/java/com/zy/core/thread/impl/ZySiemensCrnThread.java
@@ -124,7 +124,6 @@
        ZyCrnStatusEntity crnStatus = zyCrnConnectDriver.getStatus();
        if (crnStatus == null) {
            OutputQueue.CRN.offer(MessageFormat.format("【{0}】读取堆垛机plc状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort()));
            News.error("SiemensCrn读取堆垛机plc状态信息失败 ===>> [id:{}] [ip:{}] [port:{}]", deviceConfig.getDeviceNo(), deviceConfig.getIp(), deviceConfig.getPort());
            return;
        }
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -1,6 +1,7 @@
package com.zy.system.entity.license;
import com.core.common.Cools;
import com.zy.core.ServerBootstrap;
import com.zy.system.entity.LicenseInfos;
import com.zy.system.service.LicenseInfosService;
import com.zy.system.timer.LicenseTimer;
@@ -57,6 +58,8 @@
    private LicenseTimer licenseTimer;
    @Autowired
    private LicenseInfosService licenseInfosService;
    @Autowired
    private ServerBootstrap serverBootstrap;
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
@@ -108,9 +111,13 @@
                    Long num = endTime - starTime;//时间戳相差的毫秒数
                    int day = (int) (num / 24 / 60 / 60 / 1000);
                    licenseTimer.setLicenseDays(day);
                    try {
                        serverBootstrap.init();
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                }
                return install != null;
            } catch (Exception e) {
                e.printStackTrace();