Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-sunac-report
sunac_report
Commits
c5b54072
Commit
c5b54072
authored
Sep 22, 2017
by
Java-张振楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改几个小bug
parent
70eed284
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
FrontReportService.java
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
+0
-2
ReportToPdfController.java
src/main/java/com/ejweb/modules/report/web/ReportToPdfController.java
+3
-3
ejweb.properties
src/main/resources/ejweb.properties
+2
-2
reportList.jsp
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
+4
-4
No files found.
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
View file @
c5b54072
...
...
@@ -39,8 +39,6 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
Date
date
=
new
Date
();
bean
.
setReportTime
(
DateUtils
.
formatDate
(
date
,
"yyyy-MM-dd HH:mm:ss"
));
// 现在写的是微信公众号,可能不是这个
// bean.setReportSource("wechat");
bean
.
setReportStatus
(
"0"
);
// 查询管理员
...
...
src/main/java/com/ejweb/modules/report/web/ReportToPdfController.java
View file @
c5b54072
package
com
.
ejweb
.
modules
.
report
.
web
;
import
com.ejweb.conf.GConstants
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.report.entity.ReportEntity
;
...
...
@@ -49,7 +50,7 @@ public class ReportToPdfController extends BaseController {
Font
title
=
new
Font
(
bfChinese
,
16
,
Font
.
BOLD
);
//文字加粗
Font
textfont
=
new
Font
(
bfChinese
,
14
,
Font
.
NORMAL
);
//正常文字
//document是创建的文档,FileOutputStream是向文档中输入
PdfWriter
.
getInstance
(
document
,
new
FileOutputStream
(
"C:/举报详情
.pdf"
));
PdfWriter
.
getInstance
(
document
,
new
FileOutputStream
(
GConstants
.
FILE_UPLOAD_DIR
+
"pdf/"
+
reportEntity
.
getReportProject
()+
"_"
+
reportEntity
.
getId
()+
"
.pdf"
));
//打开文档
document
.
open
();
Paragraph
pt1
=
new
Paragraph
(
"举报内容"
,
title
);
...
...
@@ -234,8 +235,7 @@ public class ReportToPdfController extends BaseController {
document
.
close
();
PrintWriter
out
=
response
.
getWriter
();
response
.
setContentType
(
"application/json;charset=utf-8"
);
out
.
write
(
"C:/举报详情
.pdf"
);
out
.
write
(
GConstants
.
FILE_PREFIX_URL
+
"pdf/"
+
reportEntity
.
getReportProject
()+
"_"
+
reportEntity
.
getId
()+
"
.pdf"
);
out
.
close
();
// return "redirect:" + adminPath + "/report/list/?repage&flag="+flag;
}
}
src/main/resources/ejweb.properties
View file @
c5b54072
...
...
@@ -73,7 +73,7 @@ userfiles.prefix=static
#projectPath=D\:\\workspace\\jeesite
# The Upload File DIR, Must End With File Separator
#
# file.upload.dir=/mnt/yunbb
c/
#
file.upload.dir=/mnt/suna
c/
## file.upload.dir=D:\\WorkSapce\\JEESpace\\ejweb-api-1.0\\files\\
file.upload.dir
=
/D:/uploads/
# Max Upload File Size: (default 30M=30*1024*1024(B)=31457280 bytes)
...
...
@@ -94,7 +94,7 @@ file.image.thumb.is.allow=true
file.image.thumb.width
=
640
file.image.thumb.height
=
640
# The Prefix Url
file.prefix.url
=
http://12
7.0.0.1:8080/static
/
file.prefix.url
=
http://12
3.56.146.81:8808
/
# The Prefix separator
file.upload.path.separator
=
/
...
...
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
View file @
c5b54072
...
...
@@ -38,10 +38,10 @@
function
resetPageNo
()
{
$
(
"#pageNo"
).
val
(
0
);
}
function
openDownloadDialog
(){
function
openDownloadDialog
(
id
){
if
(
requestFlag
==
true
){
$
.
ajax
({
url
:
"${ctx}/report/document?id=
${report.id}"
,
url
:
"${ctx}/report/document?id=
"
+
id
,
dataType
:
"text"
,
traditional
:
true
,
//这里设置为true
cache
:
false
,
...
...
@@ -49,7 +49,7 @@
requestFlag
=
false
;
},
success
:
function
(
url
)
{
//登录成功后返回的数据
window
.
location
.
href
=
url
;
window
.
open
(
url
,
"_blank"
)
;
},
error
:
function
(){
alert
(
"数据错误!"
);
...
...
@@ -161,7 +161,7 @@
<td>
<a
href=
"${ctx}/report/view?id=${report.id}"
>
查看
</a>
<c:if
test=
"${report.reportStatus ne '2'}"
><a
href=
"${ctx}/report/track?id=${report.id}"
>
跟踪
</a></c:if>
<a
href=
"#"
onclick=
"openDownloadDialog()"
>
转为文档
</a>
<a
href=
"#"
onclick=
"openDownloadDialog(
'${report.id}'
)"
>
转为文档
</a>
</td>
</tr>
</c:forEach>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment