clll
2023-09-11 ad2cf148e0bc95f95bb758fe12acc5b664b2def5
springboot-vue3/src/main/java/com/example/springboot/component/Plcsign.java
@@ -16,19 +16,22 @@
      }
      List<Boolean> plclist = S7control.getinstance().ReadBits("DB102.DBX0.0", 58);
      if (plclist == null) {
      JSONObject jsonObject = new JSONObject();
      // jsonObject3.append("sig",
      // new short[] { 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
      // 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
      // 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
      // });
      jsonObject.append("sig", plclist);
      WebSocketServer sendwServer3 = WebSocketServer.sessionMap.get("Sign");
      if (sendwServer3 != null) {
        sendwServer3.sendMessage(jsonObject.toString());
      } else {
        JSONObject jsonObject = new JSONObject();
        // jsonObject3.append("sig",
        // new short[] { 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
        // 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
        // 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
        // });
        jsonObject.append("sig", plclist);
        WebSocketServer sendwServer3 = WebSocketServer.sessionMap.get("Sign");
        if (sendwServer3 != null) {
          sendwServer3.sendMessage(jsonObject.toString());
        }
      }
    }
  }
}