ZengTao
2024-05-08 b977364facab9c6bf1b92f9815100b15a30443ff
修改plc连接报警条件
2个文件已修改
26 ■■■■ 已修改文件
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -23,16 +23,16 @@
  @Override
  public void run() {
    spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
    while (this != null) {
      try {
        spianService.result=new ArrayList<>();
        Thread.sleep(300);
        // if (S7control.getinstance().CheckConnected() == false) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      // 根据玻璃id获取订单号,单独数据源
      
      // try {
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -62,14 +62,7 @@
    // b.put()
    @Override
    public void run() {
        while (this != null) {
            Short zhi = 0;
            JSONObject jsonObject = new JSONObject();
            jsonObject.append("feedglassid", feedglassid);
            try {
                Thread.sleep(1000);
                // 注入mapper
                homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
        homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
                spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
                spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
                outSliceServive = WebSocketServer.applicationContext.getBean(OutSliceServive.class);
@@ -77,6 +70,15 @@
                        .getBean(North_Glass_Buffer1Service.class);
                storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
                dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
        while (this != null) {
            Short zhi = 0;
            JSONObject jsonObject = new JSONObject();
            jsonObject.append("feedglassid", feedglassid);
            try {
                Thread.sleep(1000);
                // 注入mapper
                // boolean dbconnected = false;
                try {