#
yxFwq
2025-07-28 7e186ce8acbdb0690de064758563d0e58d797d5f
src/main/java/com/zy/core/thread/JarThread.java
@@ -159,6 +159,19 @@
            jarProtocol.setMode( 0);
            jarProtocol.setStatus(JarStatusType.OFF_LINE);
            jarProtocol.setJarErr(0);
            // 根据实时信息更新数据库
            BasJarService service = SpringUtils.getBean(BasJarService.class);
            if (null != service) {
                // 同步pakMk
                BasJar basJar = service.selectById(slave.getId());
                basJar.setJarNo(slave.getId());
                if (!service.updateById(jarProtocol.toSqlModel(basJar))){
                    News.error("硫化罐plc数据库更新失败 ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
                }
            }
        } catch (Exception e){
            log.error("JAR初始化异常!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
        }
@@ -334,6 +347,7 @@
                }
            } else {
                OutputQueue.STE.offer(MessageFormat.format("【{0}】{1}硫化罐plc状态信息失败", DateUtils.convert(new Date()), slave.getId()));
                initSte();
                throw new CoolException(MessageFormat.format( "硫化罐plc状态信息失败 ===>> [id:{0}] [ip:{1}] [port:{2}]", slave.getId(), slave.getIp(), slave.getPort()));
            }
        } catch (Exception e) {