| | |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | } 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) { |