|
@ -1,32 +1,6 @@
|
1
|
1
|
package com.ekexiu.portal.util;
|
2
|
2
|
|
3
|
|
import java.io.IOException;
|
4
|
|
import java.io.OutputStream;
|
5
|
|
import java.net.URLEncoder;
|
6
|
|
import java.sql.Connection;
|
7
|
|
import java.sql.PreparedStatement;
|
8
|
|
import java.sql.ResultSet;
|
9
|
|
import java.sql.SQLException;
|
10
|
|
import java.util.Collections;
|
11
|
|
import java.util.Comparator;
|
12
|
|
|
13
|
|
import javax.servlet.ServletException;
|
14
|
|
import javax.servlet.http.HttpServlet;
|
15
|
|
import javax.servlet.http.HttpServletRequest;
|
16
|
|
import javax.servlet.http.HttpServletResponse;
|
17
|
|
import javax.sql.DataSource;
|
18
|
|
|
19
|
|
import org.jfw.util.context.JfwAppContext;
|
20
|
|
import org.jfw.util.jdbc.JdbcUtil;
|
21
|
|
import org.jfw.util.jdbc.PreparedStatementConfig;
|
22
|
|
import org.jfw.util.jdbc.ResultSetExtractor;
|
23
|
|
|
24
|
|
import com.ekexiu.portal.po.Honor;
|
25
|
|
import com.ekexiu.portal.po.PartTimeJob;
|
26
|
|
import com.ekexiu.portal.po.Ppaper;
|
27
|
|
import com.ekexiu.portal.po.Ppatent;
|
28
|
|
import com.ekexiu.portal.po.ProfessorEduBg;
|
29
|
|
import com.ekexiu.portal.po.Project;
|
|
3
|
import com.ekexiu.portal.po.*;
|
30
|
4
|
import com.itextpdf.io.source.ByteArrayOutputStream;
|
31
|
5
|
import com.itextpdf.kernel.color.Color;
|
32
|
6
|
import com.itextpdf.kernel.color.DeviceRgb;
|
|
@ -43,11 +17,26 @@ import com.itextpdf.kernel.pdf.PdfWriter;
|
43
|
17
|
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
|
44
|
18
|
import com.itextpdf.layout.Document;
|
45
|
19
|
import com.itextpdf.layout.border.SolidBorder;
|
46
|
|
import com.itextpdf.layout.element.Div;
|
47
|
|
import com.itextpdf.layout.element.List;
|
48
|
|
import com.itextpdf.layout.element.ListItem;
|
49
|
|
import com.itextpdf.layout.element.Paragraph;
|
50
|
|
import com.itextpdf.layout.element.Text;
|
|
20
|
import com.itextpdf.layout.element.*;
|
|
21
|
import org.jfw.util.context.JfwAppContext;
|
|
22
|
import org.jfw.util.jdbc.JdbcUtil;
|
|
23
|
import org.jfw.util.jdbc.PreparedStatementConfig;
|
|
24
|
import org.jfw.util.jdbc.ResultSetExtractor;
|
|
25
|
|
|
26
|
import javax.servlet.ServletException;
|
|
27
|
import javax.servlet.http.HttpServlet;
|
|
28
|
import javax.servlet.http.HttpServletRequest;
|
|
29
|
import javax.servlet.http.HttpServletResponse;
|
|
30
|
import javax.sql.DataSource;
|
|
31
|
import java.io.IOException;
|
|
32
|
import java.io.OutputStream;
|
|
33
|
import java.net.URLEncoder;
|
|
34
|
import java.sql.Connection;
|
|
35
|
import java.sql.PreparedStatement;
|
|
36
|
import java.sql.ResultSet;
|
|
37
|
import java.sql.SQLException;
|
|
38
|
import java.util.Collections;
|
|
39
|
import java.util.Comparator;
|
51
|
40
|
|
52
|
41
|
/**
|
53
|
42
|
* Servlet implementation class ProfessorPdfServlet
|
|
@ -80,7 +69,11 @@ public class ProfessorPdfServlet extends HttpServlet {
|
80
|
69
|
boolean f1 = (o1.getAuthors().indexOf(',') < 0) || o1.getAuthors().startsWith(name);
|
81
|
70
|
boolean f2 = (o2.getAuthors().indexOf(',') < 0) || o2.getAuthors().startsWith(name);
|
82
|
71
|
if (f1 == f2) {
|
83
|
|
return -(o1.getPubDay().compareTo(o2.getPubDay()));
|
|
72
|
if (o1.getPubDay() == null || o2.getPubDay() == null) {
|
|
73
|
return 0;
|
|
74
|
}else {
|
|
75
|
return -(o1.getPubDay().compareTo(o2.getPubDay()));
|
|
76
|
}
|
84
|
77
|
} else {
|
85
|
78
|
return f1 ? -1 : 1;
|
86
|
79
|
}
|