场馆预定列表查询

This commit is contained in:
limqhz
2021-03-05 10:09:08 +08:00
parent 9601e1572e
commit 5afe493b81
2 changed files with 55 additions and 21 deletions

View File

@@ -52,20 +52,53 @@ public class AppVenueLessonController {
private String concatResult(List<VenueLessonStatus> lessonOrder) {
StringBuffer sb = new StringBuffer();
sb.append("<html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><head></head>");
sb.append("<html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />" +
"<meta http-equiv=\"refresh\" content=\"10\"/><head>");
sb.append("<style type=\"text/css\">");
sb.append("table {" +
" border-collapse: collapse;" +
" margin: 0 auto;" +
" text-align: center;" +
"}" +
"" +
"table td," +
"table th {" +
" border: 1px solid #cad9ea;" +
" color: #666;" +
" height: 30px;" +
"}" +
"" +
"table tr th {" +
" background-color: #CCE8EB;" +
" width: 100px;" +
"}" +
"" +
"table tr:nth-child(odd) {" +
" background: #fff;" +
"}" +
"" +
".nl {" +
" text-align: left;" +
"}" +
"" +
"table tr:nth-child(even) {" +
" background: #F5FAFA;" +
"}");
sb.append("</style>");
sb.append("</head>");
sb.append("<body>");
sb.append("<h1 align=\"center\">【" + lessonOrder.get(0).getVenueName() + "(" + lessonOrder.get(0).getSearchDate() + ")预订信息一览表" + "<h1>");
sb.append("<table width = 100% bgcolor=\"#FFFFFF\" align=\"center\" border=\"1\">");
sb.append("<tr bgcolor=\"#3399ff\" align=\"center\">" +
// "<td width = 10% style=\"font-size: 20px;\">场馆</td>" +
"<td width = 10% style=\"font-size: 20px;\">课程</td>" +
// "<td width = 8% style=\"font-size: 20px;\">日期</td>" +
"<td width = 10% style=\"font-size: 20px;\">时间</td>" +
"<td width = 4% style=\"font-size: 20px;\">总量</td>" +
"<td width = 4% style=\"font-size: 20px;\">预订</td>" +
"<td width = 4% style=\"font-size: 20px;\">剩余</td>" +
"<td width = 20% style=\"font-size: 20px;\">预约用户</td>" +
"<td width = 38% style=\"font-size: 20px;\">说明</td>" +
sb.append("<h1 align=\"center\">【" + lessonOrder.get(0).getVenueName() + "】预订信息" + "<h1>");
sb.append("<table cellspacing=\"0\" cellpadding=\"0\" width = 100% align=\"center\">");
sb.append("<tr align=\"center\">" +
// "<td width = 10%>场馆</td>" +
"<th width = 10%>课程</th>" +
"<th width = 10%>日期</th>" +
"<th width = 10%>时间</th>" +
"<th width = 6%>总量</th>" +
"<th width = 6%>预订</th>" +
"<th width = 6%>剩余</th>" +
"<th width = 22%>预约用户</th>" +
"<th width = 30%>说明</th>" +
"</tr>");
// boolean firstLine = true;
for (VenueLessonStatus s : lessonOrder){
@@ -74,14 +107,15 @@ public class AppVenueLessonController {
// sb.append( "<td width = 10% rowspan=" + lessonOrder.size() + ">"+ s.getVenueName() + "</td>");
// firstLine = false;
// }
sb.append( "<td width = 10% >"+ s.getLessonName() + "</td>");
// sb.append( "<td width = 8% >"+ s.getSearchDate() + "</td>");
sb.append( "<td width = 10%>"+ s.getLessonName() + "</td>");
sb.append( "<td width = 10%>"+ s.getSearchDate() + "</td>");
sb.append( "<td width = 10%>"+ s.getStartTime() + "-" + s.getEndTime() + "</td>");
sb.append( "<td width = 4%>"+ s.getNum() + "</td>");
sb.append( "<td width = 4%>"+ s.getSaleNum() + "</td>");
sb.append( "<td width = 4%>"+ s.getLimitNum() + "</td>");
sb.append( "<td width = 20%>"+ s.getOrderUsers() + "</td>");
sb.append( "<td width = 38%>"+ s.getNote() + "</td>");
sb.append( "<td width = 6%>"+ s.getNum() + "</td>");
sb.append( "<td width = 6%>"+ s.getSaleNum() + "</td>");
sb.append( "<td width = 6%>"+ s.getLimitNum() + "</td>");
sb.append( "<td class=\"nl\" width = 22%>"+ s.getOrderUsers() + "</td>");
String note = s.getNote().replaceAll("<br data-mce-bogus=\"1\">","").replaceAll("<br>","").replaceAll("<p>", "").replaceAll("</p>", "<br/>");
sb.append( "<td class=\"nl\" width = 30%>"+ note + "</td>");
sb.append("</tr>");
}
sb.append("</table></body></html>");