From ef5dda6db97f89c09a714b9304f302c00ee4ac6c Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期二, 16 一月 2024 13:53:07 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/service/JdbcConnections.java | 181 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 176 insertions(+), 5 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 5a5c756..6ebdcc0 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
@@ -5,10 +5,13 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
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 {
/**
@@ -24,19 +27,184 @@
private static PreparedStatement ps = null;
private static ResultSet rs = null;
- public Glass selectGlass(int glassid) throws SQLException {
+ public north_glass_buffer1 selectGlass(int glassid) throws SQLException {
conn = getConn();
- Glass glass=new Glass();
- String sql = "select orderid from glass where glassid=?";
+ north_glass_buffer1 glass=new north_glass_buffer1();
+ String sql = "select ordernumber from north_glass_buffer1 where glassid=?";
ps = conn.prepareStatement(sql);
ps.setInt(1, glassid);
rs= ps.executeQuery();
while (rs.next()) {
- glass.setOrderId(rs.getShort("orderid"));
+ glass.setordernumber(rs.getString("ordernumber"));
}
conn.close();
return glass;
}
+
+ public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameId(String glassid,String orderid,String frameid) throws SQLException {
+ conn = getConn();
+ north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
+ 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()) {
+ north_glass_buffer1s.setId(rs.getInt("Id"));
+ north_glass_buffer1s.setordernumber(rs.getString("ordernumber"));
+ north_glass_buffer1s.setlistnumber(rs.getString("listnumber"));
+ north_glass_buffer1s.setboxnumber(rs.getString("boxnumber"));
+ north_glass_buffer1s.setbarcode(rs.getString("barcode"));
+ north_glass_buffer1s.setglasslength(rs.getDouble("glasslength"));
+ north_glass_buffer1s.setglassheight(rs.getDouble("glassheight"));
+ north_glass_buffer1s.setglasslengthmm(rs.getDouble("glasslength_mm"));
+ north_glass_buffer1s.setglassheightmm(rs.getDouble("glassheight_mm"));
+ north_glass_buffer1s.setitemtype(rs.getString("itemtype"));
+ north_glass_buffer1s.setslotnumber(rs.getString("slotnumber"));
+ north_glass_buffer1s.setdatemodified(rs.getString("datemodified"));
+ north_glass_buffer1s.setdatecreated(rs.getString("datecreated"));
+ north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode"));
+ }
+ // 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;
+ }
+
+
+
+ //鏍规嵁鐜荤拑id锛岃鍗昳d锛岄摑妗唅d鏌ヨ瀹㈡埛鐜荤拑淇℃伅
+ 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 position(? in barcode) and position(? in ordernumber) and position(? in FrameBarcode)";
+ ps = conn.prepareStatement(sql);
+ ps.setString(1, glassid);
+ ps.setString(2, orderid);
+ ps.setString(3, frameid);
+ rs= ps.executeQuery();
+ while (rs.next()) {
+ north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
+
+ north_glass_buffer1s.setId(rs.getInt("Id"));
+ north_glass_buffer1s.setordernumber(rs.getString("ordernumber"));
+ north_glass_buffer1s.setlistnumber(rs.getString("listnumber"));
+ north_glass_buffer1s.setboxnumber(rs.getString("boxnumber"));
+ north_glass_buffer1s.setbarcode(rs.getString("barcode"));
+ north_glass_buffer1s.setglasslength(rs.getDouble("glasslength"));
+ north_glass_buffer1s.setglassheight(rs.getDouble("glassheight"));
+ north_glass_buffer1s.setglasslengthmm(rs.getDouble("glasslength_mm"));
+ north_glass_buffer1s.setglassheightmm(rs.getDouble("glassheight_mm"));
+ north_glass_buffer1s.setitemtype(rs.getString("itemtype"));
+ north_glass_buffer1s.setslotnumber(rs.getString("slotnumber"));
+ north_glass_buffer1s.setdatemodified(rs.getString("datemodified"));
+ north_glass_buffer1s.setdatecreated(rs.getString("datecreated"));
+ north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode"));
+
+
+ glass.add(north_glass_buffer1s);
+
+ }
+ // conn.close();
+ return glass;
+ }
+
+ //鏍规嵁閾濇id鏌ヨ瀹㈡埛鐜荤拑淇℃伅
+ public List<north_glass_buffer1> SelectGlassByGlassIdOrderIdFrameIdss(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 FrameBarcode=?";
+ ps = conn.prepareStatement(sql);
+ ps.setString(1, frameid);
+ rs= ps.executeQuery();
+ while (rs.next()) {
+ north_glass_buffer1 north_glass_buffer1s=new north_glass_buffer1();
+
+ north_glass_buffer1s.setId(rs.getInt("Id"));
+ north_glass_buffer1s.setordernumber(rs.getString("ordernumber"));
+ north_glass_buffer1s.setlistnumber(rs.getString("listnumber"));
+ north_glass_buffer1s.setboxnumber(rs.getString("boxnumber"));
+ north_glass_buffer1s.setbarcode(rs.getString("barcode"));
+ north_glass_buffer1s.setglasslength(rs.getDouble("glasslength"));
+ north_glass_buffer1s.setglassheight(rs.getDouble("glassheight"));
+ north_glass_buffer1s.setglasslengthmm(rs.getDouble("glasslength_mm"));
+ north_glass_buffer1s.setglassheightmm(rs.getDouble("glassheight_mm"));
+ north_glass_buffer1s.setitemtype(rs.getString("itemtype"));
+ north_glass_buffer1s.setslotnumber(rs.getString("slotnumber"));
+ north_glass_buffer1s.setdatemodified(rs.getString("datemodified"));
+ north_glass_buffer1s.setdatecreated(rs.getString("datecreated"));
+ north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode"));
+
+
+ glass.add(north_glass_buffer1s);
+
+ }
+ // conn.close();
+ return glass;
+ }
+
+ //鏍规嵁閾濇id鏌ヨl閾濇鏄惁缈昏浆
+ 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;
+ }
+ //鏍规嵁閾濇id鏌ヨ鏄惁閾濇鎽嗘斁
+ public String SelectPositionByFrameBarcode(String frameBarcode) throws SQLException {
+ conn = getConn();
+ // north_glass_buffer1 glass=new north_glass_buffer1();
+ String position="";
+ 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()) {
+ position=rs.getString("position");
+ }
+ // conn.close();
+ return position;
+ }
+
/**
* 1. 鍔犺浇椹卞姩
* 2. 鑾峰彇杩炴帴 conn
@@ -68,5 +236,8 @@
}
}
+
+
+
}
--
Gitblit v1.8.0