From 3c74551a7f5d9f2ead6cc4a22fe8a7ec4696d8f5 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 30 十一月 2023 08:16:35 +0800
Subject: [PATCH] 完善主界面功能,添加手动任务到出片队列

---
 springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java |   50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
index 30c135e..ebd7eeb 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java
@@ -11,6 +11,7 @@
 import org.springframework.stereotype.Component;
 
 import com.example.springboot.entity.Glass;
+import com.example.springboot.entity.Queue;
 import com.example.springboot.entity.north_glass_buffer1;
 @Component
 public class JdbcConnections {
@@ -69,12 +70,41 @@
 		//  conn.close();
          return north_glass_buffer1s;
     }
+	//鏍规嵁鐜荤拑id锛岃鍗昳d锛岄摑妗唅d鏌ヨ瀹㈡埛鐜荤拑淇℃伅
+	public  Queue SelectGlassByGlassIdOrderIdFrameIdQueue(String glassid,String orderid,String frameid) throws SQLException {
+        conn = getConn();
+        Queue queue=new Queue();
+        String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?";
+         ps = conn.prepareStatement(sql);
+         ps.setString(1, glassid);
+		 ps.setString(2, orderid);
+		 ps.setString(3, frameid);
+         rs= ps.executeQuery();
+         while (rs.next()) {
+			queue.setid(rs.getInt("Id"));
+			queue.setorderId(rs.getString("ordernumber"));
+			queue.setlistId(rs.getString("listnumber"));
+			queue.setboxId(rs.getString("boxnumber"));
+			queue.setglassId(rs.getString("barcode"));
+			queue.setglasswidthmm(rs.getDouble("glasslength"));
+			queue.setglassheightmm(rs.getDouble("glassheight"));
+			queue.setglasswidth(rs.getDouble("glasslength_mm"));
+			queue.setglassheight(rs.getDouble("glassheight_mm"));
+			// queue.setitemtype(rs.getString("itemtype"));
+			// queue.setslotnumber(rs.getString("slotnumber"));
+			// queue.setdatemodified(rs.getString("datemodified"));
+			// queue.setdatecreated(rs.getString("datecreated"));
+			// queue.setFrameBarcode(rs.getString("FrameBarcode"));
+         }
+		//  conn.close();
+         return queue;
+    }
 
 	public  List<north_glass_buffer1> SelectGlassByGlassIdOrderIdFrameIds(String glassid,String orderid,String frameid) throws SQLException {
         conn = getConn();
         // north_glass_buffer1 glass=new north_glass_buffer1();
 		List<north_glass_buffer1> glass=new ArrayList<north_glass_buffer1>();
-        String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?";
+        String sql = "select * from north_glass_buffer1 where position(? in barcode) and position(? in ordernumber) and position(? in FrameBarcode)";
          ps = conn.prepareStatement(sql);
          ps.setString(1, glassid);
 		 ps.setString(2, orderid);
@@ -105,6 +135,23 @@
 		//  conn.close();
          return glass;
     }
+
+	
+	public String SelectFlipByFrameBarcode(String frameBarcode) throws SQLException {
+		conn = getConn();
+        // north_glass_buffer1 glass=new north_glass_buffer1();
+		String flip="";
+        String sql1 = "select * from north_glass_buffer1_frames where Barcode=? limit 1";
+         ps = conn.prepareStatement(sql1);
+		 ps.setString(1, frameBarcode);
+         rs= ps.executeQuery();
+         while (rs.next()) {
+			flip=rs.getString("Flip");
+			
+         }
+		//  conn.close();
+         return flip;
+	}
 	
 	/**
 	 * 1. 鍔犺浇椹卞姩
@@ -138,4 +185,5 @@
 	}
 
 
+
 }

--
Gitblit v1.8.0