private void getdocs(int index) { OperateManagerBLService operate = new OperateStatistic(); OperateFormVO vo = operate.getOperateForm(index); ArrayList<ReceiveDocVO> receList = vo.getReceiveDoc(); ArrayList<PaymentItem> payList = vo.getPaymentDoc(); int lenRece = 0; int lenPay = 0; int max = 0; if (receList != null) { lenRece = receList.size(); } if (payList != null) { lenPay = payList.size(); } max = Math.max(lenRece, lenPay); docs = new String[max][5]; for (int i = 0; i < lenRece; i++) { ReceiveDocVO rece = receList.get(i); docs[i][0] = rece.getReceiveDate(); docs[i][1] = rece.getReceivePrice() + ""; } for (int i = 0; i < lenPay; i++) { PaymentItem pay = payList.get(i); docs[i][2] = pay.getDate(); docs[i][3] = pay.getSum() + ""; docs[i][4] = pay.getEntry(); } }
private void exportExcel(int index) { OperateManagerBLService operate = new OperateStatistic(); OperateFormVO vo = operate.getOperateForm(index); boolean succ = operate.exportExcel(vo); if (succ) { JOptionPane.showConfirmDialog( null, "导 出 成 功!", null, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null); } else { JOptionPane.showConfirmDialog( null, "导 出 失 败!", null, JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null); } }