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
f388d123
Commit
f388d123
authored
Sep 12, 2017
by
Java-李昕颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
举报查看、跟踪
parent
3f339e50
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
5 deletions
+57
-5
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+2
-0
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+54
-4
reportForm.jsp
src/main/webapp/WEB-INF/views/modules/report/reportForm.jsp
+1
-1
No files found.
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
f388d123
...
...
@@ -42,6 +42,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
*/
@Transactional
(
readOnly
=
false
)
public
void
save
(
ReportEntity
reportEntity
)
{
//保存举报信息
reportEntity
.
preInsert
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
reportTime
=
sdf
.
format
(
reportEntity
.
getCreateDate
());
...
...
@@ -51,6 +52,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportEntity
.
setExchangeAfterUser
(
reportEntity
.
getCreateBy
().
getId
());
dao
.
addReport
(
reportEntity
);
//保存附件信息
ReportAttachmentEntity
reportAttachmentEntity
=
reportEntity
.
getReportAttachmentEntity
();
reportAttachmentEntity
.
setId
(
IdGen
.
uuid
());
reportAttachmentEntity
.
setReportId
(
reportEntity
.
getId
());
...
...
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
f388d123
...
...
@@ -40,7 +40,15 @@ public class ReportController extends BaseController {
}
}
// 举报列表
/**
* 举报列表
*
* @param reportEntity
* @param model
* @param request
* @param response
* @return
*/
@RequiresPermissions
(
"report:view"
)
@RequestMapping
(
value
=
{
"list"
,
""
})
public
String
list
(
ReportEntity
reportEntity
,
String
flag
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
...
...
@@ -72,12 +80,26 @@ public class ReportController extends BaseController {
return
"modules/report/reportList"
;
}
@RequestMapping
(
value
=
"/form"
)
/**
* 举报添加
*
* @param reportEntity
* @param model
* @return
*/
@RequestMapping
(
value
=
"form"
)
public
String
form
(
ReportEntity
reportEntity
,
Model
model
)
{
model
.
addAttribute
(
"report
Entity
"
,
reportEntity
);
model
.
addAttribute
(
"report"
,
reportEntity
);
return
"modules/report/reportForm"
;
}
/**
* 举报保存
*
* @param reportEntity
* @param model
* @return
*/
@RequestMapping
(
value
=
"addReport"
)
public
String
addReport
(
ReportEntity
reportEntity
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
if
(!
beanValidator
(
model
,
reportEntity
))
{
...
...
@@ -88,10 +110,38 @@ public class ReportController extends BaseController {
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
}
/**
* 举报详情
*
* @param reportEntity
* @param model
* @return
*/
@RequestMapping
(
value
=
"view"
)
public
String
view
(
ReportEntity
reportEntity
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
model
.
addAttribute
(
"report
Entity
"
,
reportEntity
);
model
.
addAttribute
(
"report"
,
reportEntity
);
return
"modules/report/reportDetail"
;
}
/**
* 举报跟踪
*
* @param reportEntity
* @param model
* @return
*/
@RequestMapping
(
value
=
"track"
)
public
String
track
(
ReportEntity
reportEntity
,
Model
model
)
{
User
user
=
UserUtils
.
getUser
();
String
roleName
=
reportService
.
findRole
(
user
);
String
transferFlag
=
"0"
;
if
(
roleName
.
equals
(
"系统管理员"
)){
transferFlag
=
"1"
;
}
model
.
addAttribute
(
"currentUser"
,
user
.
getName
());
model
.
addAttribute
(
"transferFlag"
,
transferFlag
);
model
.
addAttribute
(
"report"
,
reportEntity
);
return
"modules/report/reportTrack"
;
}
}
src/main/webapp/WEB-INF/views/modules/report/reportForm.jsp
View file @
f388d123
...
...
@@ -46,7 +46,7 @@
<li
class=
"active"
><a
href=
"${ctx}/report/form"
>
举报录入
</a></li>
</ul>
<br/>
<form:form
id=
"inputForm"
modelAttribute=
"report
Entity
"
action=
"${ctx}/report/addReport"
method=
"post"
class=
"form-horizontal"
>
<form:form
id=
"inputForm"
modelAttribute=
"report"
action=
"${ctx}/report/addReport"
method=
"post"
class=
"form-horizontal"
>
<sys:message
content=
"${message}"
/>
<span
class=
"title"
>
举报内容
</span>
<div
class=
"control-group"
>
...
...
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