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
5663def1
Commit
5663def1
authored
Sep 13, 2017
by
Java-李昕颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
举报查看、跟踪各种改
parent
b6e87205
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
38 deletions
+87
-38
ReportDao.java
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
+9
-0
ReportEntity.java
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
+15
-15
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+30
-6
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+12
-0
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+9
-0
reportDetail.jsp
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
+6
-11
reportForm.jsp
src/main/webapp/WEB-INF/views/modules/report/reportForm.jsp
+2
-2
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+4
-4
No files found.
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
View file @
5663def1
...
...
@@ -6,6 +6,8 @@ import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.sys.entity.User
;
import
java.util.List
;
/**
* 举报DAO接口
* @author lixy
...
...
@@ -21,6 +23,13 @@ public interface ReportDao extends CrudDao<ReportEntity> {
public
String
findRole
(
User
user
);
/**
* 查询附件
* @param reportAttachmentEntity
* @return
*/
public
List
<
ReportAttachmentEntity
>
getAttachmentInfo
(
ReportAttachmentEntity
reportAttachmentEntity
);
/**
* 新增举报
* @param reportEntity
* @return
...
...
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
View file @
5663def1
...
...
@@ -40,9 +40,9 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private
List
<
ReportAttachmentEntity
>
reportAttachmentEntityList
;
private
List
<
String
>
reportAttachmentLis
t
;
//举报提交文件
private
List
<
String
>
supplementAttachmentLis
t
;
//补充提交文件
private
List
<
String
>
dealAttachmentLis
t
;
//处理成果文件
private
String
reportAttachmen
t
;
//举报提交文件
private
String
supplementAttachmen
t
;
//补充提交文件
private
String
dealAttachmen
t
;
//处理成果文件
public
String
getReportProject
()
{
...
...
@@ -237,27 +237,27 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
reportAttachmentEntityList
=
reportAttachmentEntityList
;
}
public
List
<
String
>
getReportAttachmentLis
t
()
{
return
reportAttachment
List
;
public
String
getReportAttachmen
t
()
{
return
reportAttachment
;
}
public
void
setReportAttachment
List
(
List
<
String
>
reportAttachmentLis
t
)
{
this
.
reportAttachment
List
=
reportAttachmentLis
t
;
public
void
setReportAttachment
(
String
reportAttachmen
t
)
{
this
.
reportAttachment
=
reportAttachmen
t
;
}
public
List
<
String
>
getSupplementAttachmentLis
t
()
{
return
supplementAttachment
List
;
public
String
getSupplementAttachmen
t
()
{
return
supplementAttachment
;
}
public
void
setSupplementAttachment
List
(
List
<
String
>
supplementAttachmentLis
t
)
{
this
.
supplementAttachment
List
=
supplementAttachmentLis
t
;
public
void
setSupplementAttachment
(
String
supplementAttachmen
t
)
{
this
.
supplementAttachment
=
supplementAttachmen
t
;
}
public
List
<
String
>
getDealAttachmentLis
t
()
{
return
dealAttachment
List
;
public
String
getDealAttachmen
t
()
{
return
dealAttachment
;
}
public
void
setDealAttachment
List
(
List
<
String
>
dealAttachmentLis
t
)
{
this
.
dealAttachment
List
=
dealAttachmentLis
t
;
public
void
setDealAttachment
(
String
dealAttachmen
t
)
{
this
.
dealAttachment
=
dealAttachmen
t
;
}
}
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
5663def1
...
...
@@ -31,6 +31,15 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
private
ReportDao
reportDao
;
/**
* 查询附件
* @param reportAttachmentEntity
* @return
*/
public
List
<
ReportAttachmentEntity
>
getAttachmentInfo
(
ReportAttachmentEntity
reportAttachmentEntity
)
{
return
reportDao
.
getAttachmentInfo
(
reportAttachmentEntity
);
}
/**
* 查询用户角色
* @param user
* @return
...
...
@@ -55,9 +64,13 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportEntity
.
setExchangeAfterUser
(
reportEntity
.
getCreateBy
().
getId
());
dao
.
addReport
(
reportEntity
);
List
<
String
>
reportAttachmentList
=
reportEntity
.
getReportAttachmentList
();
if
(
reportAttachmentList
!=
null
&&
reportAttachmentList
.
size
()
>
0
)
{
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getReportAttachment
()))
{
String
[]
reportAttachmentList
=
new
String
[]{
reportEntity
.
getReportAttachment
()};
if
(
reportEntity
.
getReportAttachment
().
contains
(
"|"
)){
reportAttachmentList
=
reportEntity
.
getReportAttachment
().
split
(
"\\|"
);
}
for
(
String
path
:
reportAttachmentList
)
{
if
(
StringUtils
.
isNotBlank
(
path
))
{
//保存举报提交附件信息
ReportAttachmentEntity
reportAttachmentEntity
=
new
ReportAttachmentEntity
();
reportAttachmentEntity
.
setId
(
IdGen
.
uuid
());
...
...
@@ -75,6 +88,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
}
}
}
/**
* 举报补充
...
...
@@ -88,9 +102,13 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportEntity
.
setDealPersonName
(
user
.
getName
());
dao
.
addTrack
(
reportEntity
);
List
<
String
>
supplementAttachmentList
=
reportEntity
.
getSupplementAttachmentList
();
if
(
supplementAttachmentList
!=
null
&&
supplementAttachmentList
.
size
()
>
0
)
{
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getSupplementAttachment
()))
{
String
[]
supplementAttachmentList
=
new
String
[]{
reportEntity
.
getSupplementAttachment
()};
if
(
reportEntity
.
getSupplementAttachment
().
contains
(
"|"
)){
supplementAttachmentList
=
reportEntity
.
getSupplementAttachment
().
split
(
"\\|"
);
}
for
(
String
path
:
supplementAttachmentList
)
{
if
(
StringUtils
.
isNotBlank
(
path
))
{
//保存补充提交附件信息
ReportAttachmentEntity
reportAttachmentEntity
=
reportAttachmentEntity
=
new
ReportAttachmentEntity
();
reportAttachmentEntity
.
setId
(
IdGen
.
uuid
());
...
...
@@ -107,10 +125,15 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportDao
.
addReportAttachment
(
reportAttachmentEntity
);
}
}
}
List
<
String
>
dealAttachmentList
=
reportEntity
.
getDealAttachmentList
();
if
(
dealAttachmentList
!=
null
&&
dealAttachmentList
.
size
()
>
0
)
{
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getDealAttachment
()))
{
String
[]
dealAttachmentList
=
new
String
[]{
reportEntity
.
getDealAttachment
()};
if
(
reportEntity
.
getDealAttachment
().
contains
(
"|"
)){
dealAttachmentList
=
reportEntity
.
getDealAttachment
().
split
(
"\\|"
);
}
for
(
String
path
:
dealAttachmentList
)
{
if
(
StringUtils
.
isNotBlank
(
path
))
{
//保存处理结果附件信息
ReportAttachmentEntity
reportAttachmentEntity
=
reportAttachmentEntity
=
new
ReportAttachmentEntity
();
reportAttachmentEntity
.
setId
(
IdGen
.
uuid
());
...
...
@@ -127,6 +150,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportDao
.
addReportAttachment
(
reportAttachmentEntity
);
}
}
}
//更新举报状态
reportEntity
.
setReportStatus
(
"1"
);
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getDealResult
())){
...
...
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
5663def1
...
...
@@ -3,6 +3,7 @@ package com.ejweb.modules.report.web;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.service.ReportService
;
import
com.ejweb.modules.sys.entity.User
;
...
...
@@ -18,6 +19,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 举报Controller
...
...
@@ -119,7 +121,17 @@ public class ReportController extends BaseController {
*/
@RequestMapping
(
value
=
"view"
)
public
String
view
(
ReportEntity
reportEntity
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
ReportAttachmentEntity
reportAttachment
=
new
ReportAttachmentEntity
();
reportAttachment
.
setReportId
(
reportEntity
.
getId
());
reportAttachment
.
setAttachmentType
(
"0"
);
List
<
ReportAttachmentEntity
>
reportAttachmentList
=
reportService
.
getAttachmentInfo
(
reportAttachment
);
ReportAttachmentEntity
supplementAttachment
=
new
ReportAttachmentEntity
();
supplementAttachment
.
setReportId
(
reportEntity
.
getId
());
supplementAttachment
.
setAttachmentType
(
"1"
);
List
<
ReportAttachmentEntity
>
supplementAttachmentList
=
reportService
.
getAttachmentInfo
(
supplementAttachment
);
model
.
addAttribute
(
"report"
,
reportEntity
);
model
.
addAttribute
(
"reportAttachmentList"
,
reportAttachmentList
);
model
.
addAttribute
(
"supplementAttachmentList"
,
supplementAttachmentList
);
return
"modules/report/reportDetail"
;
}
...
...
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
5663def1
...
...
@@ -118,6 +118,15 @@
WHERE su.id = #{id}
</select>
<select
id=
"getAttachmentInfo"
resultType=
"ReportAttachmentEntity"
>
SELECT
ra.attachment_name,
ra.attachment_path
FROM report_attachment ra
WHERE ra.report_id = #{reportId}
AND ra.attachment_type = #{attachmentType}
</select>
<insert
id=
"addReport"
>
INSERT INTO report(
id,
...
...
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
View file @
5663def1
...
...
@@ -56,15 +56,12 @@
<form:textarea
id=
"reportContent"
htmlEscape=
"true"
path=
"reportContent"
rows=
"4"
maxlength=
"500"
class=
"input-xxlarge"
disabled=
"true"
/>
</div>
</div>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
附件:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameFile"
path=
"reportAttachmentList"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameFile"
type=
"files"
uploadPath=
"/file"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
<label
id=
"checkFile"
class=
"error"
style=
"display: none;"
>
必填信息
</label>
<c:forEach
items=
"${reportAttachmentList}"
var=
"reportAttachment"
varStatus=
"vs"
>
${vs.count}.
<a
href=
"${reportAttachment.attachmentPath}"
target=
"_blank"
>
${reportAttachment.attachmentName}
</a><br>
</c:forEach>
</div>
</div>
<span
class=
"title"
>
举报人信息
</span>
...
...
@@ -145,11 +142,9 @@
<div
class=
"control-group"
>
<label
class=
"control-label"
>
附件:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameFile"
path=
"supplementAttachmentList"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameFile"
type=
"files"
uploadPath=
"/file"
selectMultiple=
"false"
maxWidth=
"100"
maxHeight=
"100"
/>
<label
id=
"checkFile"
class=
"error"
style=
"display: none;"
>
必填信息
</label>
<c:forEach
items=
"${supplementAttachmentList}"
var=
"supplementAttachment"
varStatus=
"vs"
>
${vs.count}.
<a
href=
"${supplementAttachment.attachmentPath}"
target=
"_blank"
>
${supplementAttachment.attachmentName}
</a><br>
</c:forEach>
</div>
</div>
<li
class=
"btns"
>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportForm.jsp
View file @
5663def1
...
...
@@ -76,10 +76,10 @@
<div
class=
"control-group"
>
<label
class=
"control-label"
>
附件:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameFile"
path=
"reportAttachment
List
"
htmlEscape=
"false"
<form:hidden
id=
"nameFile"
path=
"reportAttachment"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameFile"
type=
"files"
uploadPath=
"/file"
selectMultiple=
"
fals
e"
maxWidth=
"100"
maxHeight=
"100"
/>
selectMultiple=
"
tru
e"
maxWidth=
"100"
maxHeight=
"100"
/>
<label
id=
"checkFile"
class=
"error"
style=
"display: none;"
>
必填信息
</label>
</div>
</div>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
5663def1
...
...
@@ -115,10 +115,10 @@
<div
class=
"control-group"
>
<label
class=
"control-label"
>
附件:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameFile"
path=
"supplementAttachment
List
"
htmlEscape=
"false"
<form:hidden
id=
"nameFile"
path=
"supplementAttachment"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameFile"
type=
"files"
uploadPath=
"/file"
selectMultiple=
"
fals
e"
maxWidth=
"100"
maxHeight=
"100"
/>
selectMultiple=
"
tru
e"
maxWidth=
"100"
maxHeight=
"100"
/>
<label
id=
"checkFile"
class=
"error"
style=
"display: none;"
>
必填信息
</label>
</div>
</div>
...
...
@@ -133,10 +133,10 @@
<div
class=
"control-group"
>
<label
class=
"control-label"
>
处理成果文件:
</label>
<div
class=
"controls"
>
<form:hidden
id=
"nameFile"
path=
"dealAttachment
List
"
htmlEscape=
"false"
<form:hidden
id=
"nameFile"
path=
"dealAttachment"
htmlEscape=
"false"
maxlength=
"255"
class=
"input-xlarge"
/>
<sys:ckfinder
input=
"nameFile"
type=
"files"
uploadPath=
"/file"
selectMultiple=
"
fals
e"
maxWidth=
"100"
maxHeight=
"100"
/>
selectMultiple=
"
tru
e"
maxWidth=
"100"
maxHeight=
"100"
/>
<label
id=
"checkFile"
class=
"error"
style=
"display: none;"
>
必填信息
</label>
</div>
</div>
...
...
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