⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dailpperationsystemmagzinchaxunpanel.java

📁 图书管理系统源代码,05年某人写的,还算不错
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        jPanel2.setBorder(null);
        jPanel2.setBounds(new Rectangle(5, 4, 120, 154));
        jPanel2.setLayout(null);
        jPanel3.setBorder(BorderFactory.createEtchedBorder());
        jPanel3.setBounds(new Rectangle(128, 6, 447, 150));
        jPanel3.addComponentListener(new
                DailPperationSystemMagzinChaXunPanel_jPanel3_componentAdapter(this));

        jPanel3.setLayout(null);
        jScrollPane1.setBounds(new Rectangle(15, 41, 438, 100));
        jButtonB.setBounds(new Rectangle(3, 145, 116, 22));
        jButtonB.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButtonB.setForeground(Color.blue);
        jButtonB.setMargin(new Insets(2, 2, 2, 2));
        jButtonB.setText("再过二天的情况");
        jButtonB.addActionListener(new
                DailPperationSystemMagzinChaXunPanel_jButtonB_actionAdapter(this));

        jButtonC.setBounds(new Rectangle(3, 197, 116, 22));
        jButtonC.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButtonC.setForeground(Color.blue);
        jButtonC.setMargin(new Insets(2, 2, 2, 2));
        jButtonC.setText("再过三天的情况");
        jButtonC.addActionListener(new
                DailPperationSystemMagzinChaXunPanel_jButtonC_actionAdapter(this));

        jButtonA.setBounds(new Rectangle(5, 92, 116, 22));
        jButtonA.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButtonA.setForeground(Color.blue);
        jButtonA.setMargin(new Insets(2, 2, 2, 2));
        jButtonA.setText("再过一天的情况");
        jButtonA.addActionListener(new
                DailPperationSystemMagzinChaXunPanel_jButtonA_actionAdapter(this));

        jLabel4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel4.setForeground(Color.blue);
        jLabel4.setToolTipText("");
        jLabel4.setText("相关查询");
        jLabel4.setBounds(new Rectangle(21, 7, 68, 27));
        jButtonD.setBounds(new Rectangle(5, 42, 116, 22));
        jButtonD.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButtonD.setForeground(Color.magenta);
        jButtonD.setMargin(new Insets(2, 2, 2, 2));
        jButtonD.setText("当天的情况");
        jButtonD.addActionListener(new
                DailPperationSystemMagzinChaXunPanel_jButtonD_actionAdapter(this));
        jScleft.addComponentListener(new
                DailPperationSystemMagzinChaXunPanel_jScleft_componentAdapter(this));
        jScright.addComponentListener(new
                DailPperationSystemMagzinChaXunPanel_jScright_componentAdapter(this));
        jScright.addHierarchyBoundsListener(new
                DailPperationSystemMagzinChaXunPanel_jScright_hierarchyBoundsAdapter(this));
        jLabel5.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jLabel5.setForeground(Color.red);
        jLabel5.setText("借阅期刊编号");
        jLabel5.setBounds(new Rectangle(2, 349, 89, 16));
        jtxMagazineNum.setEnabled(true);
        jtxMagazineNum.setFont(new java.awt.Font("宋体", Font.PLAIN, 14));
        jtxMagazineNum.setForeground(Color.red);
        jtxMagazineNum.setText("");
        jtxMagazineNum.setBounds(new Rectangle(84, 346, 145, 22));

        this.add(jPanelSystemTop);
        jPanelSystemTop.add(jBtyqts);
        this.add(jSpSystemPanel);
        jSpSystemPanel.add(jScleft, JSplitPane.LEFT);
        jScleft.getViewport().add(jPanRight);
        jSpSystemPanel.add(jScright, JSplitPane.RIGHT);
        jScright.getViewport().add(jPanel1);
        jPanel1.add(jLabel11);
        jPanel1.add(jLabel33);
        jPanel1.add(jtxbookTypeX);
        jPanel1.add(jTxReaderNumX);
        jPanel1.add(jtxbooksNumX);
        jPanel1.add(jtxbooksNamex);
        jPanel1.add(jTxNumberX);
        jPanel1.add(jTxpurchaseMoneyX);
        jPanel1.add(jTextField2);
        jPanel1.add(jTxbookAuthorX);
        jPanel1.add(jLabel6);
        jPanel1.add(jTxbookConcernX);
        jPanel1.add(jLabel14);
        jPanel1.add(jLabel27);
        jPanel1.add(jLabel13);
        jPanel1.add(jLabel12);
        jPanel1.add(jLabel3);
        jPanel1.add(jLabel28);
        jPanel1.add(jLabel10);
        jPanel1.add(jButton5);
        jPanel1.add(jButton6);
        jPanel1.add(jTextField1);
        jPanel1.add(jLabel2);
        jPanel1.add(jtxMagazineNum);
        jPanel1.add(jLabel5);
        jPanRight.add(jPanelRightTop);
        jPanelRightTop.add(jPanel2);
        jPanel2.add(jLabel4);
        jPanel2.add(jButtonA);
        jPanel2.add(jButtonC);
        jPanel2.add(jButtonB);
        jPanel2.add(jButtonD);
        jPanelRightTop.add(jPanel3);
        jPanel3.add(jLabelTop);
        jPanel3.add(jScrollPane1);
        jScrollPane1.getViewport().add(jTabBooks);
        jPanRight.add(jPaneRightBottom);
        jPaneRightBottom.add(jTpRightBottom);
        jPaneRightBottom.add(jLabel1);
        jTpRightBottom.add(jScrollPaneBottom);
        jScrollPaneBottom.getViewport().add(jTableReader);
    }

    public void yuqiserchar(int a)
        {
           // Dbcom db = new Dbcom();
            ResultSet re =null;
            Object[][] data;
            String sql="";
            String sql2 = "";
            //到当前的时间 逾期图书查询语句
            if(a==0){
                sql = "select magazineID,snum= count(magazineID) from magazineBorrowInfo where datediff(dd,beginTime,getdate()) >7 and isreturnmagazine = '否'  group by magazineID ";
                sql2 = "select DISTINCT magazineNumber, magazinename,magazineConcern,purchaseMoney,magazineLairage,number from magazineInfo inner join magazineBorrowInfo on magazineNumber = magazineID and datediff(dd,beginTime,getdate())>30 and isreturnmagazine='否' order by magazineNumber";
            }
                //到指定的时间的逾期查询语句
            else{
                sql =  "select magazineID,snum= count(magazineID) from magazineBorrowInfo where datediff(dd,beginTime,dateadd(dd,"+a+",getdate())) >7 and isreturnmagazine = '否'  group by magazineID ";

                sql2 = "select DISTINCT magazineNumber, magazinename,magazineConcern,purchaseMoney,magazineLairage,number from magazineInfo inner join magazineBorrowInfo on magazineNumber = magazineID and datediff(dd,beginTime,dateadd(dd,"+a+",getdate()))>30 and isreturnmagazine='否' order by magazineNumber";


            }
            String str="0";
             db.search(sql);
            if(!(db.rs==null)){
                int size = 0;
                try {
                    while (db.rs.next()) {
                        size++;
                    }
                    data = new Object[size][title.length];
                    boolean temp = db.rs.first();
                    for (int i = 0; temp; i++) {
                        for (int j = 0; j < 2; j++) {
                            data[i][j] = db.rs.getString(j + 1).trim();

                        }

                        str = str + "," + (String) data[i][0];
                        temp = db.rs.next();
                    }
                    db.myClose(1);
                    re = db.search(sql2);
                    temp = re.next();
                    for (int i = 0; temp; i++) {
                        for (int j = 2; j < title.length; j++) {
                            data[i][j] = re.getString(j).trim();
                        }
                        temp = re.next();
                    }
                    DefaultTableModel model = new DefaultTableModel(data, title);
                    jTabBooks.setModel(model);
                    jTabBooks.updateUI();

                } catch (SQLException ex) {
                    System.out.println(ex.toString());
                }
            }
            db.myClose(1);
        }



        public void jScright_ancestorResized(HierarchyEvent e) {
            jPanRight.setSize((jScright.getWidth() - 1), (jScright.getHeight() - 1));
        }


        public void jScright_componentResized(ComponentEvent e) {
            jPanRight.setSize((jSpSystemPanel.getWidth() - jScleft.getWidth()),
                              (jSpSystemPanel.getHeight() - 1));
        }

        public void jPaneRightBottom_componentResized(ComponentEvent e) {
            jLabel1.setBounds((jPaneRightBottom.getWidth() - 140) / 2, 1, 140, 24);
            jTpRightBottom.setSize(jPaneRightBottom.getWidth() - 1,
                                   jPaneRightBottom.getHeight() - 26);

        }

        public void jSpSystemPanel_componentResized(ComponentEvent e) {
            jPanRight.setSize((jSpSystemPanel.getWidth() - jScleft.getWidth()),
                              (jSpSystemPanel.getHeight() - 1));

        }




        public void btnReset_actionPerformed(ActionEvent e) {
        }


        public void jPanRight_componentResized(ComponentEvent e) {
            jPanelRightTop.setBounds(1,1,(jPanRight.getWidth() - 1),(jPanRight.getHeight()) / 2 - 3);

            // jSpSystemPanel.setDividerLocation(0.21);
            jPaneRightBottom.setBounds(jPanRight.getX(),
                                       jPanRight.getHeight() / 2 - 1,
                                       (jPanRight.getWidth() - 1),
                                       (jPanRight.getHeight()) / 2 - 1);
        }

        public void this_componentResized(ComponentEvent e) {

            jSpSystemPanel.setSize((this.getWidth()) - 5, (this.getHeight() - 30));
            jSpSystemPanel.setDividerLocation(0.73);
            jPanRight.setSize((jSpSystemPanel.getWidth() - jScleft.getWidth()),
                              (jSpSystemPanel.getHeight() - 1));
        }

        public void this_ancestorResized(HierarchyEvent e) {
            jSpSystemPanel.setSize((this.getWidth()) - 5, (this.getHeight() - 30));
            jSpSystemPanel.setDividerLocation(0.73);
            jPanRight.setSize((jSpSystemPanel.getWidth() - jScleft.getWidth()),
                              (jSpSystemPanel.getHeight() - 1));
            jPanelSystemTop.setSize(this.getWidth() - 5, 30);
        }

        public void jTpRightBottom_componentResized(ComponentEvent e) {
            jScrollPaneBottom.setBounds(1,1,jTpRightBottom.getWidth() - 1,jTpRightBottom.getHeight() - 1);
            jTableReader.setBounds(0,0,jScrollPaneBottom.getWidth() - 5,
                                 jScrollPaneBottom.getHeight() - 5);
        }

        public void jPanelRightTop_componentResized(ComponentEvent e) {
            jPanel2.setBounds(1,1,120,jPanelRightTop.getHeight()-2);
            jPanel3.setBounds( 130, 1, jPanelRightTop.getWidth()-131, jPanelRightTop.getHeight()-2);
        }

        public void jPanRight_ancestorResized(HierarchyEvent e) {
            jPanelRightTop.setBounds(1,1,(jPanRight.getWidth() - 1),(jPanRight.getHeight()) / 2 - 3);

           // jSpSystemPanel.setDividerLocation(0.21);
           jPaneRightBottom.setBounds(jPanRight.getX(),
                                      jPanRight.getHeight() / 2 - 1,
                                      (jPanRight.getWidth() - 1),
                                      (jPanRight.getHeight()) / 2 - 1);

        }

        public void jPanel3_componentResized(ComponentEvent e) {
            jScrollPane1.setBounds(1,25,(jPanel3.getWidth()),
                                 jPanel3.getHeight()-26);
            jLabelTop.setBounds(( jPanel3.getWidth() - 140) / 2, 1, 140, 24);

        }

        public void jButtonC_actionPerformed(ActionEvent e) {
            yuqiserchar(3);
        }

        public void jButtonB_actionPerformed(ActionEvent e) {
            yuqiserchar(2);
        }

        public void jButtonA_actionPerformed(ActionEvent e) {
            yuqiserchar(1);
        }

        public void jButtonD_actionPerformed(ActionEvent e) {
            yuqiserchar(0);
        }

        public void jTabBooks_mouseClicked(MouseEvent e) {
            if (jTabBooks.getSelectedRow() > -1) {
             String booksNum = jTabBooks.getValueAt(jTabBooks.getSelectedRow(),
                                                    0).toString().trim();
             //JOptionPane.showMessageDialog(null,booksNum);
             String sql =
                     "select * from magazineboorow_readerinfo where magazineID = '" +
                     booksNum + "' and isreturnmagazine ='否'";
             ResultSet re = null;
             re = db.search(sql);
             int size = 0;
             try {
                 while (re.next())
                     size++;
                 dateReader = new Object[size][titleReader.length];
                 dataReader2 = new Object[size][titleReader2.length];
                 boolean temp = re.first();
                 for (int i = 0; i < size; i++) {
                     for (int j = 0; j < titleReader2.length; j++) {
                         Object a = re.getString(j + 1);
                         if (a == null)
                             a = "null";
                         a = a.toString().trim();
                         if (a.equals(new Integer(1)))
                             a = "是";
                         if (a.equals(new Integer(0)))
                             a = "否";
                         dataReader2[i][j] = a;
                     }
                     temp = re.next();
                 }
                 for (int i = 0; i < size; i++) {
                     for (int j = 0; j < titleReader.length; j++) {
                         if (j < 2)
                             dateReader[i][j] = dataReader2[i][j];
                         else
                             dateReader[i][j] = dataReader2[i][j + 3];
                     }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -