From abda546a9cbcefd5bfe3abb563361f371f36faaa Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 24 四月 2024 02:29:35 +0800
Subject: [PATCH] 根据现场调试增加判断条件
---
springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 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 d0996cf..0a3d5a4 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,5 +1,6 @@
package com.example.springboot.component;
+import java.sql.SQLException;
import java.time.LocalDateTime;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
@@ -39,16 +40,19 @@
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");
+
// 鍑虹墖浠诲姟////////////////////////////////
- spianService.selectout2("X21942613103GV");
+ //spianService.selectout2("X21942613103GV");
List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 鍑虹墖杞︾姸鎬�
List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 鍑虹墖浠诲姟鏄惁鍚姩
@@ -155,13 +159,25 @@
StringBuilder queueid2 = spianService.queGlassid("DB103.58", 14);
int questate = spianMapper.Selectquecount(queueid1.toString());// 鍒ゆ柇鎵爜浣嶆槸鍚︽湁鐜荤拑宸茬‘璁�
- // queueid1.toString().isEmpty()
+ 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=null;
+ // north_glass_buffer1 glass2=null;
+ // String queueid1="123";
+ // String queueid2="123";
+ // int questate=0;
+ 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鐨勬暟鎹埌涓婄墖闃熷垪琛�
- if (glass1 == null) { // 褰撴病鏈夊�兼椂浼犵┖
+ if (glass1 == null ||glass1.getordernumber()==null) { // 褰撴病鏈夊�兼椂浼犵┖
spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 1);
} else {
@@ -174,7 +190,7 @@
if (queueid2 != null) {
// 鍐欏叆D02鐨勬暟鎹埌涓婄墖闃熷垪琛�
- if (glass2 == null) {
+ if (glass2 == null ||glass2.getordernumber()==null) {
spianMapper.Updatequeue(null, null, null, null, 0, null, null, null, null, 2);
} else {
spianMapper.Updatequeue(queueid2.toString(), glass2.getordernumber(), glass2.getlistnumber(),
--
Gitblit v1.8.0