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

📄 invoice_list.jsp

📁 数据库系统教材中附录的课程设计accomodation宿舍管理系统源码
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="cn.kmp.accommodation.service.*"%>
<%@ page import="cn.kmp.accommodation.domain.*" %>
<%@ page import="com.littleQworks.commons.util.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'invoice_list.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	

  </head>
  
<body bgcolor="#EBF2F4">
<% 
	DateTimeUtils dtime=UtilsFactory.getInstance().getDateTimeUtils();
	String date=dtime.getDate();
	
	InvoiceService is=ServiceFactory.getInvoiceService();
	LeaseService ls=ServiceFactory.getLeaseService();
	StudentService ss=ServiceFactory.getStudentService();
	
	List<Invoice> all=is.getAllInvoices();
	List<Invoice> unpaid=is.getInvoicesUnPaid(date);
%>
<div id="container">
	<div id="all">
	<h3>所有账单</h3>
		<table border="1">
			<tr>
				<td>公寓号</td>
				<td>公寓类别</td>
				<td>床位号</td>
				<td>房间号</td>
				<td>学生号</td>
				<td>学生名</td>
				<td>学期</td>
				<td>截止日期</td>
				<td>付款日期</td>
				<td>付款方式</td>
				<td>第一次催单日期</td>
				<td>第二次催单日期</td>
				<td colspan="2">操作</td>
			</tr>
		<%for(Invoice i:all){
			Lease l=ls.getLeaseByLeaseNum(i.getLeaseNum());
			Student st=ss.getStudentByStudentNum(l.getStudentNum());
			String name=st.getLname()+st.getFname();
			int isPay=i.getIsPay();
		%>
			<tr>
				<td><%=l.getDepartmentNum() %></td>
				<td><%=l.getType() %></td>
				<td><%=l.getPlaceNum() %></td>
				<td><%=l.getRoomNum() %></td>
				<td><%=l.getStudentNum() %></td>
				<td><%=name %></td>
				<td><%=i.getSemester() %></td>
				<td><%=i.getPaymentDue() %></td>
				<td><%if(isPay==0)out.println("未付");else out.println(i.getPayDate()); %></td>
				<td><%=i.getPayMethod() %></td>
				<td><%if(isPay==0)out.println("未付");else out.println(i.getFirstSend()); %></td>
				<td><%if(isPay==0)out.println("未付");else out.println(i.getSecondSend()); %></td>
				<td><a href="<%=basePath%>jsp/edit_invoice.jsp?invoiceNum=<%=i.getInvoiceNum()%>">编辑</a></td>
				<td><a href="<%=basePath%>deleteInvoice.do?invoiceNum=<%=i.getInvoiceNum()%>" onclick="{if(confirm('确定要删除吗?')){return true;}return false;}">删除</a></td>
			</tr>
		<%} %>
		</table>
	</div>
	<div id="unpaid">
	<h3>在<%=date%>之前未付的账单</h3>
		<table border="1">
			<tr>
				<td>公寓号</td>
				<td>公寓类别</td>
				<td>床位号</td>
				<td>房间号</td>
				<td>学生号</td>
				<td>学生名</td>
				<td>学期</td>
				<td>截止日期</td>
			</tr>
		<%for(Invoice i:unpaid){
			Lease l=ls.getLeaseByLeaseNum(i.getLeaseNum());
			Student st=ss.getStudentByStudentNum(l.getStudentNum());
			String name=st.getLname()+st.getFname();
		%>
			<tr>
				<td><%=l.getDepartmentNum() %></td>
				<td><%=l.getType() %></td>
				<td><%=l.getPlaceNum() %></td>
				<td><%=l.getRoomNum() %></td>
				<td><%=l.getStudentNum() %></td>
				<td><%=name %></td>
				<td><%=i.getSemester() %></td>
				<td><%=i.getPaymentDue() %></td>
			<%} %>
		</table>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

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