ZengTao
2024-04-23 a29bf5164c1b8bdd35b48f879673706db88f855f
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -5,6 +5,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import com.example.springboot.service.JdbcConnections;
import com.example.springboot.service.SpianService;
import com.example.springboot.service.SpianServiceNew;
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.AlarmMapper;
import com.example.springboot.mapper.SpianMapper;
@@ -17,6 +18,7 @@
  private JdbcConnections jdbcConnections;
  private SpianMapper spianMapper;
  private SpianService spianService;
  private SpianServiceNew spianServiceNew;
  int aaa;
  @Override
@@ -34,6 +36,7 @@
      // if (S7control.getinstance().CheckConnected() == false) {
      spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
      spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
      spianServiceNew = WebSocketServer.applicationContext.getBean(SpianServiceNew.class);
      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
      // 根据玻璃id获取订单号,单独数据源
      // try {
@@ -45,6 +48,8 @@
      // }
      // 出片任务////////////////////////////////
      spianServiceNew.selectout2("X21942613103GV");
      List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态
      List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动