| | |
| | | |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | |
| | | @Component |
| | | public class JdbcConnections { |
| | | /** |
| | |
| | | private static ResultSet rss = null; |
| | | |
| | | public north_glass_buffer1 selectGlass(int glassid) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | String sql = "select ordernumber from north_glass_buffer1 where glassid=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return glass; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameId(String glassid,String orderid,String frameid) throws SQLException { |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameId(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | |
| | | try { |
| | | Connection 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=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return north_glass_buffer1s; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdout(String glassid,String orderid,String frameid) throws SQLException { |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdout(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | try { |
| | | Connection 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=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return north_glass_buffer1s; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdouts(String glassid,String orderid,String frameid) throws SQLException { |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdouts(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | try { |
| | | Connection 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=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return north_glass_buffer1s; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdplchold(String glassid,String orderid,String frameid) throws SQLException { |
| | | } |
| | | |
| | | public north_glass_buffer1 SelectGlassByGlassIdOrderIdFrameIdplchold(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | try { |
| | | Connection 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=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return north_glass_buffer1s; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据玻璃id,订单id,铝框id查询客户玻璃信息 |
| | | public Queue SelectGlassByGlassIdOrderIdFrameIdQueue(String glassid,String orderid,String frameid) throws SQLException { |
| | | public Queue SelectGlassByGlassIdOrderIdFrameIdQueue(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | Queue queue=new Queue(); |
| | | String sql = "select * from north_glass_buffer1 where barcode=? or ordernumber=? or FrameBarcode=?"; |
| | |
| | | } |
| | | conn.close(); |
| | | return queue; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //根据玻璃id,订单id,铝框id查询客户玻璃信息 |
| | | public List<north_glass_buffer1> SelectGlassByGlassIdOrderIdFrameIds(String glassid,String orderid,String frameid) throws SQLException { |
| | | public List<north_glass_buffer1> SelectGlassByGlassIdOrderIdFrameIds(String glassid, String orderid, String frameid) |
| | | throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | List<north_glass_buffer1> glass=new ArrayList<north_glass_buffer1>(); |
| | |
| | | north_glass_buffer1s.setdatecreated(rs.getString("datecreated")); |
| | | north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode")); |
| | | |
| | | |
| | | glass.add(north_glass_buffer1s); |
| | | |
| | | } |
| | | conn.close(); |
| | | return glass; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据铝框id查询客户玻璃信息 |
| | | public List<north_glass_buffer1> SelectGlassByGlassIdOrderIdFrameIdss(String frameid) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | List<north_glass_buffer1> glass=new ArrayList<north_glass_buffer1>(); |
| | |
| | | north_glass_buffer1s.setdatecreated(rs.getString("datecreated")); |
| | | north_glass_buffer1s.setFrameBarcode(rs.getString("FrameBarcode")); |
| | | |
| | | |
| | | glass.add(north_glass_buffer1s); |
| | | |
| | | } |
| | | conn.close(); |
| | | return glass; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据铝框id查询l铝框是否翻转 |
| | | public String SelectFlipByFrameBarcode(String frameBarcode) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | String flip=""; |
| | |
| | | } |
| | | conn.close(); |
| | | return flip; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据铝框id查询是否铝框摆放 |
| | | public String SelectPositionByFrameBarcode(String frameBarcode) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | String position=""; |
| | |
| | | } |
| | | conn.close(); |
| | | return position; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据铝框id查询铝框宽 |
| | | public String SelectFrameLengthByFrameBarcode(String frameBarcode) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | String position=""; |
| | |
| | | } |
| | | conn.close(); |
| | | return position; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | //根据铝框id查询铝框高 |
| | | public String SelectFrameHeightByFrameBarcode(String frameBarcode) throws SQLException { |
| | | try { |
| | | Connection conn = getConn(); |
| | | // north_glass_buffer1 glass=new north_glass_buffer1(); |
| | | String position=""; |
| | |
| | | } |
| | | conn.close(); |
| | | return position; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * 2. 查一组,做成一个对象列表,查全部 |
| | | */ |
| | | public static Connection getConn() throws SQLException { |
| | | try { |
| | | Connection conn = null; |
| | | // conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/canadames?serverTimezone=GMT%2B8&characterEncoding=utf-8", "root", "beibo.123/"); |
| | | conn = DriverManager.getConnection("jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8&useSSL=false", "northglass", "n0rthgla55"); |
| | | // conn = |
| | | // DriverManager.getConnection("jdbc:mysql://localhost:3306/canadames?serverTimezone=GMT%2B8&characterEncoding=utf-8", |
| | | // "root", "beibo.123/"); |
| | | conn = DriverManager.getConnection( |
| | | "jdbc:mysql://192.168.102.9:3306/production?serverTimezone=GMT%2B8&characterEncoding=utf-8&useSSL=false", |
| | | "northglass", "n0rthgla55"); |
| | | return conn; |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | static { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |