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

📄 __accountreceivableview.java

📁 一个使用java 写的进销存代码 使用了ejb 等技术 是学习j2ee的好
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
            StockManagementData stockManagementData = new StockManagementData(); //[ /accountreceivableview.jsp; Line: 24]            //创建方法类 //[ /accountreceivableview.jsp; Line: 25]            DataMethod dataMethod = new DataMethod(); //[ /accountreceivableview.jsp; Line: 26]            //根据传入参数取得应收账款数组 //[ /accountreceivableview.jsp; Line: 27]            if(request.getParameter("selectedIndex") != null){ //[ /accountreceivableview.jsp; Line: 28]                int selectedIndex = Integer.parseInt(request.getParameter("selectedIndex")); //[ /accountreceivableview.jsp; Line: 29]                String searchValue = request.getParameter("searchValue"); //[ /accountreceivableview.jsp; Line: 30]                String startDateStr = request.getParameter("startDate"); //[ /accountreceivableview.jsp; Line: 31]                String endDateStr = request.getParameter("endDate"); //[ /accountreceivableview.jsp; Line: 32]                if (selectedIndex == 0 | selectedIndex == 1 | selectedIndex == 2 | //[ /accountreceivableview.jsp; Line: 33]                selectedIndex == 3 | selectedIndex == 4) { //[ /accountreceivableview.jsp; Line: 34]                    if (searchValue.length() == 0) { //[ /accountreceivableview.jsp; Line: 35]                        out.print("<h3>请输入查询值</h3>"); //[ /accountreceivableview.jsp; Line: 36]                        return; //[ /accountreceivableview.jsp; Line: 37]                    } //[ /accountreceivableview.jsp; Line: 38]                    switch (selectedIndex) { //[ /accountreceivableview.jsp; Line: 39]                        case 0: //[ /accountreceivableview.jsp; Line: 40]                        //根据票据编号取得记录 //[ /accountreceivableview.jsp; Line: 41]                        currentAccountLedger = stockManagementData.getCurrentAccountLedgerByStringField( //[ /accountreceivableview.jsp; Line: 42]                        ledgerDate, "currentAccountId", searchValue, 1); //[ /accountreceivableview.jsp; Line: 43]                        break; //[ /accountreceivableview.jsp; Line: 44]                        case 1: //[ /accountreceivableview.jsp; Line: 45]                        //根据客户取得记录 //[ /accountreceivableview.jsp; Line: 46]                        currentAccountLedger = stockManagementData.getCurrentAccountLedgerByStringField( //[ /accountreceivableview.jsp; Line: 47]                        ledgerDate, "receiverName", searchValue, 1); //[ /accountreceivableview.jsp; Line: 48]                        break; //[ /accountreceivableview.jsp; Line: 49]                        case 2: //[ /accountreceivableview.jsp; Line: 50]                        //根据开票据用户取得记录 //[ /accountreceivableview.jsp; Line: 51]                        currentAccountLedger = stockManagementData.getCurrentAccountLedgerByStringField( //[ /accountreceivableview.jsp; Line: 52]                        ledgerDate, "documentFiller", searchValue, 1); //[ /accountreceivableview.jsp; Line: 53]                        break; //[ /accountreceivableview.jsp; Line: 54]                        case 3: //[ /accountreceivableview.jsp; Line: 55]                        //根据现金管理员取得记录 //[ /accountreceivableview.jsp; Line: 56]                        currentAccountLedger = stockManagementData.getCurrentAccountLedgerByStringField( //[ /accountreceivableview.jsp; Line: 57]                        ledgerDate, "cashUser", searchValue, 1); //[ /accountreceivableview.jsp; Line: 58]                        break; //[ /accountreceivableview.jsp; Line: 59]                        case 4: //[ /accountreceivableview.jsp; Line: 60]                        if(dataMethod.checkInt(searchValue) == 0){ //[ /accountreceivableview.jsp; Line: 61]                            out.print("<h3>按完成状态查询时,输入值必须是整数," //[ /accountreceivableview.jsp; Line: 62]                            + "0表示进行,1表示撤消,2表示完成.</h3>"); //[ /accountreceivableview.jsp; Line: 63]                            return; //[ /accountreceivableview.jsp; Line: 64]                        } //[ /accountreceivableview.jsp; Line: 65]                        //根据完成状态取得记录 //[ /accountreceivableview.jsp; Line: 66]                        currentAccountLedger = stockManagementData.getCurrentAccountLedgerByOnProcess( //[ /accountreceivableview.jsp; Line: 67]                        ledgerDate, 1, Integer.parseInt(searchValue)); //[ /accountreceivableview.jsp; Line: 68]                        break; //[ /accountreceivableview.jsp; Line: 69]                    } //[ /accountreceivableview.jsp; Line: 70]                }else{ //[ /accountreceivableview.jsp; Line: 71]                    java.sql.Timestamp startDate = dataMethod.transferDate(startDateStr); //[ /accountreceivableview.jsp; Line: 72]                    java.sql.Timestamp endDate = dataMethod.transferEndDate(endDateStr); //[ /accountreceivableview.jsp; Line: 73]                    if(startDate == null | endDate == null){ //[ /accountreceivableview.jsp; Line: 74]                        out.print("<h3>日期输入错误,正确的日期格式是" //[ /accountreceivableview.jsp; Line: 75]                        + "yyyy-mm-dd(年-月-日),如2004-1-1</h3>"); //[ /accountreceivableview.jsp; Line: 76]                        return; //[ /accountreceivableview.jsp; Line: 77]                    } //[ /accountreceivableview.jsp; Line: 78]                    //根据日期取得记录 //[ /accountreceivableview.jsp; Line: 79]                    currentAccountLedger = stockManagementData.getCurrentAccountLedgerByFillDate(ledgerDate, //[ /accountreceivableview.jsp; Line: 80]                    startDate, endDate, 1); //[ /accountreceivableview.jsp; Line: 81]                } //[ /accountreceivableview.jsp; Line: 82]                //[ /accountreceivableview.jsp; Line: 83]            } //[ /accountreceivableview.jsp; Line: 84]            //创建表格标题数组 //[ /accountreceivableview.jsp; Line: 85]            String[] colNames = {"单据编号", "关联票据标识", "票据类型", "金额", "客户名字", "验收员", "现金管理员", //[ /accountreceivableview.jsp; Line: 86]                "开票据日期", "付款日期", "完成状态", "备注"}; //[ /accountreceivableview.jsp; Line: 87]            out.print("\r\n\r\n<html>\r\n<head>\r\n<title>应收账款查看页面:用户(");            out.print(String.valueOf(userName));  //[ /accountreceivableview.jsp; Line: 92]            out.print("):账套(");            out.print(String.valueOf(ledgerDate));  //[ /accountreceivableview.jsp; Line: 92]            out.print(")</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n<center>\r\n<h3>应收账款查看页面:用户(");            out.print(String.valueOf(userName));  //[ /accountreceivableview.jsp; Line: 96]            out.print("):账套(");            out.print(String.valueOf(ledgerDate));  //[ /accountreceivableview.jsp; Line: 96]            out.print(")</h3>\r\n<form action=\"accountreceivableview.jsp\" method=\"get\">\r\n<p>\r\n  查询条件:\r\n  <select name=\"selectedIndex\">\r\n    <option value=\"0\">根据票据编号查询</option>\r\n    <option value=\"1\">根据客户查询</option>\r\n    <option value=\"2\">根据开票据用户查询</option>\r\n    <option value=\"3\">根据现金管理员查询</option>\r\n    <option value=\"4\">根据完成状态查询</option>\r\n    <option value=\"5\">根据开票据日期查询</option>\r\n  </select>\r\n  查询值:\r\n  <input name=\"searchValue\" type=\"text\" size=\"18\">\r\n</p>\r\n<p>\r\n  开始日期:\r\n  <input name=\"startDate\" type=\"text\" size=\"12\">\r\n  结束日期:\r\n  <input name=\"endDate\" type=\"text\" size=\"12\">\r\n  <input name=\"search\" type=\"submit\" value=\"查询\">\r\n</p>\r\n</form>\r\n<hr size=\"3\" color=\"#0066FF\">\r\n<!--根据应收账款数组显示表格内容-->\r\n<table width=\"100%\" border=\"1\">\r\n  <tr align=\"center\">\r\n    ");            for(int i = 0; i < colNames.length; i++){ //[ /accountreceivableview.jsp; Line: 123]                //[ /accountreceivableview.jsp; Line: 123]                out.print("\r\n      <td><font size=\"-1\">");                out.print(String.valueOf(colNames[i]));  //[ /accountreceivableview.jsp; Line: 124]                out.print("</font></td>\r\n    ");            } //[ /accountreceivableview.jsp; Line: 125]            //[ /accountreceivableview.jsp; Line: 125]            out.print("\r\n  </tr>\r\n  ");            for (int i = 0; i < currentAccountLedger.length; i++){ //[ /accountreceivableview.jsp; Line: 127]                //[ /accountreceivableview.jsp; Line: 127]                out.print("\r\n    <tr align=\"left\">\r\n      ");                for(int j = 0; j < currentAccountLedger[0].length; j++){ //[ /accountreceivableview.jsp; Line: 129]                    if(j == currentAccountLedger[0].length - 1){ //[ /accountreceivableview.jsp; Line: 130]                        //[ /accountreceivableview.jsp; Line: 130]                        out.print("\r\n          <td>\r\n            <font size=\"-1\">\r\n\t      <textarea name=\"remark\" cols=\"10\" rows=\"1\">");                        out.print(String.valueOf(currentAccountLedger[i][j]));  //[ /accountreceivableview.jsp; Line: 133]                        out.print("</textarea>\r\n\t    </font>\r\n          </td>\r\n        ");                    }else{ //[ /accountreceivableview.jsp; Line: 136]                        //[ /accountreceivableview.jsp; Line: 136]                        out.print("\r\n            <td><font size=\"-1\">");                        out.print(String.valueOf(currentAccountLedger[i][j]));  //[ /accountreceivableview.jsp; Line: 137]                        out.print("&nbsp;</font></td>\r\n      ");                    } //[ /accountreceivableview.jsp; Line: 138]                } //[ /accountreceivableview.jsp; Line: 139]                //[ /accountreceivableview.jsp; Line: 139]                out.print("\r\n    </tr>\r\n  ");            } //[ /accountreceivableview.jsp; Line: 141]            //[ /accountreceivableview.jsp; Line: 141]            out.print("\r\n</table>\r\n</center>\r\n</body>\r\n</html>");        } catch (Throwable __ee) {            while (out != null && out != _originalOut) out = pageContext.popBody();            ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);        }                
        //before final close brace...
    }
    
    
}

⌨️ 快捷键说明

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