From 6f271cc93b7992ae4613ac2fe2dad81c34630296 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期二, 23 四月 2024 16:46:13 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 35 ++++++++++++++++++++++++----------- 1 files changed, 24 insertions(+), 11 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java index 30061c1..c988d3a 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java +++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java @@ -1,11 +1,12 @@ package com.example.springboot.component; +import java.sql.SQLException; import java.time.LocalDateTime; import java.util.List; 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; @@ -18,7 +19,7 @@ private JdbcConnections jdbcConnections; private SpianMapper spianMapper; private SpianService spianService; - private SpianServiceNew spianServiceNew; + int aaa; @Override @@ -32,23 +33,26 @@ // \\ TODO Auto-generated catch block e.printStackTrace(); } - + // 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 { - // north_glass_buffer1 glass = jdbcConnections.selectGlass(112); - // // System.out.println(glass.getOrderId()); + // spianService.selectAll(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId("X12345610102GV","","")); + // } catch (SQLException e) { - // // TODO Auto-generated catch block - // e.printStackTrace(); + // // TODO Auto-generated catch block + // e.printStackTrace(); // } + spianService.selectout2("X12345610102GV"); + // 鍑虹墖浠诲姟//////////////////////////////// - spianServiceNew.selectout2("X21942613103GV"); + //spianService.selectout2("X21942613103GV"); List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 鍑虹墖杞︾姸鎬� List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 鍑虹墖浠诲姟鏄惁鍚姩 @@ -156,8 +160,17 @@ int questate = spianMapper.Selectquecount(queueid1.toString());// 鍒ゆ柇鎵爜浣嶆槸鍚︽湁鐜荤拑宸茬‘璁� // queueid1.toString().isEmpty() - north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01鐨勭幓鐠冧俊鎭� - north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02鐜荤拑淇℃伅 + // north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01鐨勭幓鐠冧俊鎭� + // north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02鐜荤拑淇℃伅 + north_glass_buffer1 glass1=null; + north_glass_buffer1 glass2=null; + try { + glass1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queueid1.toString(),"","");// D01鐜荤拑淇℃伅 + glass2 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queueid2.toString(),"","");// D02鐜荤拑淇℃伅 + } catch (SQLException e) { + e.printStackTrace(); + } + // 褰撴壂鐮佷綅鐜荤拑id涓虹┖鏃� 瀹藉害涓�0 if (queueid1 != null && questate == 0) { // 鍐欏叆D01鐨勬暟鎹埌涓婄墖闃熷垪琛� -- Gitblit v1.8.0