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
59733c3a
Commit
59733c3a
authored
Sep 20, 2017
by
mengxy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
ef3f5673
9f1cd6bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
365 additions
and
150 deletions
+365
-150
ReportDao.java
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
+32
-4
ReportEntity.java
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
+10
-1
ReportExchangeHistory.java
src/main/java/com/ejweb/modules/report/entity/ReportExchangeHistory.java
+49
-0
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+112
-5
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+82
-25
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+78
-4
reportList.jsp
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
+2
-1
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+0
-0
reportTransfer.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTransfer.jsp
+0
-110
No files found.
src/main/java/com/ejweb/modules/report/dao/ReportDao.java
View file @
59733c3a
...
@@ -4,9 +4,11 @@ import com.ejweb.core.persistence.CrudDao;
...
@@ -4,9 +4,11 @@ import com.ejweb.core.persistence.CrudDao;
import
com.ejweb.core.persistence.annotation.MyBatisDao
;
import
com.ejweb.core.persistence.annotation.MyBatisDao
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportExchangeHistory
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.workbench.Bean.WorkbenchBean
;
import
com.ejweb.modules.workbench.Bean.WorkbenchBean
;
import
com.ejweb.modules.workbench.entity.ReportNotice
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -86,12 +88,38 @@ public interface ReportDao extends CrudDao<ReportEntity> {
...
@@ -86,12 +88,38 @@ public interface ReportDao extends CrudDao<ReportEntity> {
public
List
<
User
>
getPositionList
();
public
List
<
User
>
getPositionList
();
/**
/**
* 移交举报
* 根据reportId查询消息表中是否已存在该条记录
* @param userId
* @param reportId
* @param id
* @return
* @return
*/
*/
public
int
modifyExchangeAfterUser
(
String
userId
,
String
id
);
public
ReportNotice
findReportNotice
(
String
reportId
,
String
userId
);
/**
* 新增消息
* @param reportNotice
* @return
*/
public
int
addReportNotice
(
ReportNotice
reportNotice
);
/**
* 更新消息表
* @param reportNotice
* @return
*/
public
int
updateReportNotice
(
ReportNotice
reportNotice
);
/**
* 新增消息
* @param reportExchangeHistory
* @return
*/
public
int
addRecord
(
ReportExchangeHistory
reportExchangeHistory
);
/**
* 查询管理员ID
* @return
*/
public
String
findAdmin
();
/**
/**
* 举报状态数据
* 举报状态数据
...
...
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
View file @
59733c3a
...
@@ -2,6 +2,7 @@ package com.ejweb.modules.report.entity;
...
@@ -2,6 +2,7 @@ package com.ejweb.modules.report.entity;
import
com.ejweb.core.persistence.DataEntity
;
import
com.ejweb.core.persistence.DataEntity
;
import
com.ejweb.core.utils.excel.annotation.ExcelField
;
import
java.util.List
;
import
java.util.List
;
...
@@ -44,7 +45,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -44,7 +45,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private
String
supplementAttachment
;
//补充提交文件
private
String
supplementAttachment
;
//补充提交文件
private
String
dealAttachment
;
//处理成果文件
private
String
dealAttachment
;
//处理成果文件
@ExcelField
(
title
=
"被举报项目"
,
align
=
2
,
sort
=
24
)
public
String
getReportProject
()
{
public
String
getReportProject
()
{
return
reportProject
;
return
reportProject
;
}
}
...
@@ -61,6 +62,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -61,6 +62,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
reportCity
=
reportCity
;
this
.
reportCity
=
reportCity
;
}
}
@ExcelField
(
title
=
"举报时间"
,
align
=
2
,
sort
=
30
)
public
String
getReportTime
()
{
public
String
getReportTime
()
{
return
reportTime
;
return
reportTime
;
}
}
...
@@ -77,6 +79,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -77,6 +79,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
reportContent
=
reportContent
;
this
.
reportContent
=
reportContent
;
}
}
@ExcelField
(
title
=
"举报人"
,
align
=
2
,
sort
=
26
)
public
String
getReportPersonName
()
{
public
String
getReportPersonName
()
{
return
reportPersonName
;
return
reportPersonName
;
}
}
...
@@ -85,6 +88,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -85,6 +88,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
reportPersonName
=
reportPersonName
;
this
.
reportPersonName
=
reportPersonName
;
}
}
@ExcelField
(
title
=
"举报人电话"
,
align
=
2
,
sort
=
28
)
public
String
getReportPersonTel
()
{
public
String
getReportPersonTel
()
{
return
reportPersonTel
;
return
reportPersonTel
;
}
}
...
@@ -109,6 +113,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -109,6 +113,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
reportSource
=
reportSource
;
this
.
reportSource
=
reportSource
;
}
}
@ExcelField
(
title
=
"状态"
,
align
=
2
,
sort
=
32
)
public
String
getReportStatus
()
{
public
String
getReportStatus
()
{
return
reportStatus
;
return
reportStatus
;
}
}
...
@@ -141,6 +146,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -141,6 +146,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
supplementInformant
=
supplementInformant
;
this
.
supplementInformant
=
supplementInformant
;
}
}
@ExcelField
(
title
=
"标题"
,
align
=
2
,
sort
=
20
)
public
String
getSupplementTitle
()
{
public
String
getSupplementTitle
()
{
return
supplementTitle
;
return
supplementTitle
;
}
}
...
@@ -149,6 +155,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -149,6 +155,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
supplementTitle
=
supplementTitle
;
this
.
supplementTitle
=
supplementTitle
;
}
}
@ExcelField
(
title
=
"业务类型"
,
align
=
2
,
sort
=
22
)
public
String
getSupplementType
()
{
public
String
getSupplementType
()
{
return
supplementType
;
return
supplementType
;
}
}
...
@@ -181,6 +188,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -181,6 +188,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
supplementContent
=
supplementContent
;
this
.
supplementContent
=
supplementContent
;
}
}
@ExcelField
(
title
=
"处理人"
,
align
=
2
,
sort
=
36
)
public
String
getDealPersonName
()
{
public
String
getDealPersonName
()
{
return
dealPersonName
;
return
dealPersonName
;
}
}
...
@@ -189,6 +197,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -189,6 +197,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this
.
dealPersonName
=
dealPersonName
;
this
.
dealPersonName
=
dealPersonName
;
}
}
@ExcelField
(
title
=
"处理结论"
,
align
=
2
,
sort
=
34
)
public
String
getDealResult
()
{
public
String
getDealResult
()
{
return
dealResult
;
return
dealResult
;
}
}
...
...
src/main/java/com/ejweb/modules/report/entity/ReportExchangeHistory.java
0 → 100644
View file @
59733c3a
package
com
.
ejweb
.
modules
.
report
.
entity
;
public
class
ReportExchangeHistory
{
private
String
id
;
private
String
oldUserId
;
private
String
newUserId
;
private
String
exchangeType
;
private
String
exchangeTime
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getOldUserId
()
{
return
oldUserId
;
}
public
void
setOldUserId
(
String
oldUserId
)
{
this
.
oldUserId
=
oldUserId
;
}
public
String
getNewUserId
()
{
return
newUserId
;
}
public
void
setNewUserId
(
String
newUserId
)
{
this
.
newUserId
=
newUserId
;
}
public
String
getExchangeType
()
{
return
exchangeType
;
}
public
void
setExchangeType
(
String
exchangeType
)
{
this
.
exchangeType
=
exchangeType
;
}
public
String
getExchangeTime
()
{
return
exchangeTime
;
}
public
void
setExchangeTime
(
String
exchangeTime
)
{
this
.
exchangeTime
=
exchangeTime
;
}
}
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
59733c3a
...
@@ -7,9 +7,11 @@ import com.ejweb.core.utils.StringUtils;
...
@@ -7,9 +7,11 @@ import com.ejweb.core.utils.StringUtils;
import
com.ejweb.modules.report.dao.ReportDao
;
import
com.ejweb.modules.report.dao.ReportDao
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportExchangeHistory
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.sys.utils.UserUtils
;
import
com.ejweb.modules.sys.utils.UserUtils
;
import
com.ejweb.modules.workbench.entity.ReportNotice
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -18,6 +20,7 @@ import java.io.File;
...
@@ -18,6 +20,7 @@ import java.io.File;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.net.URLDecoder
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -214,13 +217,117 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -214,13 +217,117 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
}
/**
/**
* 移交举报
* 管理员移交后发送消息
* @param userId
* @param reportEntity
* @param id
* @return
*/
@Transactional
(
readOnly
=
false
)
public
void
addNotice
(
ReportEntity
reportEntity
,
String
flag
){
User
user
=
UserUtils
.
getUser
();
Date
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
ReportNotice
reportNotice
=
reportDao
.
findReportNotice
(
reportEntity
.
getId
(),
user
.
getId
());
if
(
reportNotice
!=
null
){
//消息表中已存在该条举报的移交信息
if
(
StringUtils
.
isNotBlank
(
user
.
getId
())){
reportNotice
.
setUpdateBy
(
user
.
getId
());
}
reportNotice
.
setUpdateDate
(
date
);
String
sendTime
=
sdf
.
format
(
date
);
reportNotice
.
setSendTime
(
sendTime
);
reportNotice
.
setSendFromId
(
user
.
getId
());
reportNotice
.
setSendToId
(
reportEntity
.
getExchangeAfterUser
());
reportNotice
.
setStatus
(
"0"
);
reportDao
.
updateReportNotice
(
reportNotice
);
}
else
{
reportNotice
.
setId
(
IdGen
.
uuid
());
reportNotice
.
setReportId
(
reportEntity
.
getId
());
if
(
flag
.
equals
(
"answer"
)){
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
dateStr
=
sdf1
.
format
(
date
);
reportNotice
.
setTitle
(
"“"
+
reportEntity
.
getSupplementTitle
()+
"”已由"
+
user
.
getName
()+
"于"
+
dateStr
+
"处理完成"
);
reportNotice
.
setSendToId
(
reportDao
.
findAdmin
());
}
else
{
reportNotice
.
setTitle
(
"请处理-“"
+
reportEntity
.
getSupplementTitle
()+
"”"
);
reportNotice
.
setSendToId
(
reportEntity
.
getExchangeAfterUser
());
}
reportNotice
.
setCreateDate
(
date
);
reportNotice
.
setUpdateDate
(
date
);
String
sendTime
=
sdf
.
format
(
date
);
reportNotice
.
setSendTime
(
sendTime
);
reportNotice
.
setSendFromId
(
user
.
getId
());
reportNotice
.
setStatus
(
"0"
);
reportNotice
.
setCreateBy
(
user
.
getId
());
reportNotice
.
setUpdateBy
(
user
.
getId
());
reportDao
.
addReportNotice
(
reportNotice
);
}
}
/**
* 新增移交记录
* @param reportEntity
* @return
* @return
*/
*/
@Transactional
(
readOnly
=
false
)
@Transactional
(
readOnly
=
false
)
public
int
modifyExchangeAfterUser
(
String
userId
,
String
id
){
public
void
addRecord
(
ReportEntity
reportEntity
,
String
exchangeType
){
return
reportDao
.
modifyExchangeAfterUser
(
userId
,
id
);
ReportExchangeHistory
reportExchangeHistory
=
new
ReportExchangeHistory
();
reportExchangeHistory
.
setId
(
IdGen
.
uuid
());
reportExchangeHistory
.
setOldUserId
(
reportEntity
.
getExchangeBeforeUser
());
reportExchangeHistory
.
setNewUserId
(
reportEntity
.
getExchangeAfterUser
());
reportExchangeHistory
.
setExchangeType
(
exchangeType
);
Date
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
reportExchangeHistory
.
setExchangeTime
(
sdf
.
format
(
date
));
reportDao
.
addRecord
(
reportExchangeHistory
);
}
/**
* 查询举报列表
* @param reportEntity
* @return
*/
public
List
<
ReportEntity
>
getReportList
(
ReportEntity
reportEntity
){
List
<
ReportEntity
>
reportList
=
dao
.
findList
(
reportEntity
);
for
(
ReportEntity
report
:
reportList
)
{
String
supplementType
=
report
.
getSupplementType
();
if
(
supplementType
.
equals
(
"1"
)){
supplementType
=
"营销"
;
}
else
if
(
supplementType
.
equals
(
"2"
)){
supplementType
=
"工程"
;
}
else
if
(
supplementType
.
equals
(
"3"
)){
supplementType
=
"成本"
;
}
else
if
(
supplementType
.
equals
(
"4"
)){
supplementType
=
"招采"
;
}
else
if
(
supplementType
.
equals
(
"5"
)){
supplementType
=
"人力"
;
}
else
if
(
supplementType
.
equals
(
"6"
)){
supplementType
=
"物业"
;
}
else
if
(
supplementType
.
equals
(
"7"
)){
supplementType
=
"投诉"
;
}
report
.
setSupplementType
(
supplementType
);
String
reportStatus
=
report
.
getReportStatus
();
if
(
reportStatus
.
equals
(
"0"
)){
reportStatus
=
"未处理"
;
}
else
if
(
reportStatus
.
equals
(
"1"
)){
reportStatus
=
"处理中"
;
}
else
if
(
reportStatus
.
equals
(
"2"
)){
reportStatus
=
"已处理"
;
}
report
.
setReportStatus
(
reportStatus
);
String
dealResult
=
report
.
getDealResult
();
if
(
dealResult
.
equals
(
"1"
)){
dealResult
=
"投诉"
;
}
else
if
(
dealResult
.
equals
(
"2"
)){
dealResult
=
"举报无效"
;
}
else
if
(
dealResult
.
equals
(
"3"
)){
dealResult
=
"举报属实"
;
}
else
{
dealResult
=
"--"
;
}
report
.
setDealResult
(
dealResult
);
report
.
setDealPersonName
(
report
.
getDealPersonName
()
==
null
?
"--"
:
report
.
getDealPersonName
());
}
return
reportList
;
}
}
}
}
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
59733c3a
package
com
.
ejweb
.
modules
.
report
.
web
;
package
com
.
ejweb
.
modules
.
report
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.base.BaseController
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.persistence.Page
;
import
com.ejweb.core.utils.DateUtils
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.core.utils.StringUtils
;
import
com.ejweb.core.utils.excel.ExportExcel
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportAttachmentEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.entity.ReportEntity
;
import
com.ejweb.modules.report.service.ReportService
;
import
com.ejweb.modules.report.service.ReportService
;
...
@@ -15,11 +18,14 @@ import org.springframework.stereotype.Controller;
...
@@ -15,11 +18,14 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
org.springframework.web.servlet.mvc.support.RedirectAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -144,16 +150,28 @@ public class ReportController extends BaseController {
...
@@ -144,16 +150,28 @@ public class ReportController extends BaseController {
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"track"
)
@RequestMapping
(
value
=
"track"
)
public
String
track
(
ReportEntity
reportEntity
,
Model
model
)
{
public
String
track
(
ReportEntity
reportEntity
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
User
user
=
UserUtils
.
getUser
();
User
user
=
UserUtils
.
getUser
();
String
roleName
=
reportService
.
findRole
(
user
);
String
roleName
=
reportService
.
findRole
(
user
);
String
transferFlag
=
"0"
;
String
transferFlag
=
"0"
;
if
(
roleName
.
equals
(
"系统管理员"
)){
if
(
roleName
.
equals
(
"系统管理员"
)){
transferFlag
=
"1"
;
transferFlag
=
"1"
;
}
}
List
<
Office
>
companyList
=
reportService
.
getCompanyList
();
List
<
Office
>
officeList
=
reportService
.
getOfficeList
();
List
<
User
>
positionList
=
reportService
.
getPositionList
();
Page
<
User
>
page
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
user
);
User
userEntity
=
new
User
();
Page
<
User
>
userPage
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
userEntity
);
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"user"
,
userEntity
);
model
.
addAttribute
(
"currentUser"
,
user
.
getName
());
model
.
addAttribute
(
"currentUser"
,
user
.
getName
());
model
.
addAttribute
(
"transferFlag"
,
transferFlag
);
model
.
addAttribute
(
"transferFlag"
,
transferFlag
);
model
.
addAttribute
(
"report"
,
reportEntity
);
model
.
addAttribute
(
"report"
,
reportEntity
);
model
.
addAttribute
(
"companyList"
,
companyList
);
model
.
addAttribute
(
"officeList"
,
officeList
);
model
.
addAttribute
(
"positionList"
,
positionList
);
model
.
addAttribute
(
"userPage"
,
userPage
);
return
"modules/report/reportTrack"
;
return
"modules/report/reportTrack"
;
}
}
...
@@ -170,6 +188,13 @@ public class ReportController extends BaseController {
...
@@ -170,6 +188,13 @@ public class ReportController extends BaseController {
return
form
(
reportEntity
,
model
);
return
form
(
reportEntity
,
model
);
}
}
reportService
.
saveTrack
(
reportEntity
);
reportService
.
saveTrack
(
reportEntity
);
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getExchangeAfterUser
())){
reportService
.
addNotice
(
reportEntity
,
"transger"
);
reportService
.
addRecord
(
reportEntity
,
"1"
);
}
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getDealResult
())){
reportService
.
addNotice
(
reportEntity
,
"answer"
);
}
addMessage
(
redirectAttributes
,
"补充举报"
+
reportEntity
.
getSupplementTitle
()
+
"'成功"
);
addMessage
(
redirectAttributes
,
"补充举报"
+
reportEntity
.
getSupplementTitle
()
+
"'成功"
);
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
}
}
...
@@ -178,37 +203,69 @@ public class ReportController extends BaseController {
...
@@ -178,37 +203,69 @@ public class ReportController extends BaseController {
* 移交列表
* 移交列表
*
*
* @param user
* @param user
* @param model
* @param request
* @param request
* @param response
* @param response
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"viewTransfer"
)
@RequestMapping
(
value
=
"viewTransfer"
)
public
String
viewTransfer
(
ReportEntity
reportEntity
,
User
user
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
{
public
void
viewTransfer
(
User
user
,
HttpServletRequest
request
,
HttpServletResponse
response
,
Model
model
)
throws
IOException
{
Page
<
User
>
page
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
user
);
Page
<
User
>
page
=
reportService
.
findUserPage
(
new
Page
<
User
>(
request
,
response
),
user
);
List
<
Office
>
companyList
=
reportService
.
getCompanyList
();
StringBuffer
html
=
new
StringBuffer
();
List
<
Office
>
officeList
=
reportService
.
getOfficeList
();
html
.
append
(
"<table id='contentTable' class='table table-striped table-bordered table-condensed'>"
);
List
<
User
>
positionList
=
reportService
.
getPositionList
();
html
.
append
(
" <thead>"
);
model
.
addAttribute
(
"page"
,
page
);
html
.
append
(
" <tr>"
);
model
.
addAttribute
(
"companyList"
,
companyList
);
html
.
append
(
" <th>选择</th>"
);
model
.
addAttribute
(
"officeList"
,
officeList
);
html
.
append
(
" <th>ID</th>"
);
model
.
addAttribute
(
"positionList"
,
positionList
);
html
.
append
(
" <th>员工号</th>"
);
model
.
addAttribute
(
"User"
,
user
);
html
.
append
(
" <th>姓名</th>"
);
model
.
addAttribute
(
"report"
,
reportEntity
);
html
.
append
(
" <th>手机号</th>"
);
return
"modules/report/reportTransfer"
;
html
.
append
(
" <th>所属公司</th>"
);
html
.
append
(
" <th>所属部门</th>"
);
html
.
append
(
" <th>职位</th>"
);
html
.
append
(
" </tr>"
);
html
.
append
(
" </thead>"
);
html
.
append
(
" <tbody>"
);
if
(
page
.
getList
().
size
()
>
0
){
int
i
=
1
;
for
(
User
userEntity
:
page
.
getList
()){
html
.
append
(
" <tr>"
);
html
.
append
(
" <td><input type='radio' value='"
+
userEntity
.
getId
()+
"' onclick='chooseRen(this);'></td>"
);
html
.
append
(
" <td>"
+
i
+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getNo
()==
null
?
""
:
userEntity
.
getNo
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getName
()==
null
?
""
:
userEntity
.
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getMobile
()==
null
?
""
:
userEntity
.
getMobile
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getCompany
()==
null
?
""
:
userEntity
.
getCompany
().
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getOffice
()==
null
?
""
:
userEntity
.
getOffice
().
getName
())+
"</td>"
);
html
.
append
(
" <td>"
+(
userEntity
.
getPositionName
()==
null
?
""
:
userEntity
.
getPositionName
())+
"</td>"
);
html
.
append
(
" </tr>"
);
i
++;
}
}
html
.
append
(
" </tbody>"
);
html
.
append
(
"</table>"
);
html
.
append
(
"<span id='chooseItem'></span>"
);
if
(
page
.
getList
().
size
()
==
0
){
html
.
append
(
" <span style='color: #999999;margin: 20px 0 70px 20px;display: block;'>未查询到相关内容</span>"
);
}
if
(
page
.
getList
().
size
()
>
0
){
html
.
append
(
" <div class='pagination'>"
+
page
+
"</div>"
);
}
PrintWriter
out
=
response
.
getWriter
();
response
.
setContentType
(
"application/json;charset=utf-8"
);
out
.
write
(
html
.
toString
());
out
.
close
();
}
}
/**
@RequestMapping
(
value
=
"export"
,
method
=
RequestMethod
.
POST
)
* 移交操作
public
String
exportParticipantList
(
ReportEntity
reportEntity
,
String
flag
,
HttpServletRequest
request
,
HttpServletResponse
response
,
RedirectAttributes
redirectAttributes
)
{
*
try
{
* @param userId
String
fileName
=
"举报列表"
+
DateUtils
.
getDate
(
"yyyyMMddHHmmss"
)
+
".xlsx"
;
* @param model
List
<
ReportEntity
>
reportList
=
reportService
.
getReportList
(
reportEntity
);
* @return
new
ExportExcel
(
"举报列表"
,
ReportEntity
.
class
).
setDataList
(
reportList
).
write
(
request
,
response
,
fileName
).
dispose
();
*/
return
null
;
@RequestMapping
(
value
=
"transfer"
)
}
catch
(
Exception
e
)
{
public
String
transfer
(
ReportEntity
reportEntity
,
String
userId
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
addMessage
(
redirectAttributes
,
"导出用户失败!失败信息:"
+
e
.
getMessage
());
reportService
.
modifyExchangeAfterUser
(
userId
,
reportEntity
.
getId
());
}
addMessage
(
redirectAttributes
,
"移交举报"
+
reportEntity
.
getReportProject
()
+
"'成功"
);
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag="
+
flag
;
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
}
}
}
}
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
59733c3a
...
@@ -194,6 +194,7 @@
...
@@ -194,6 +194,7 @@
supplement_project = #{supplementProject},
supplement_project = #{supplementProject},
supplement_content = #{supplementContent},
supplement_content = #{supplementContent},
deal_person_name = #{dealPersonName},
deal_person_name = #{dealPersonName},
exchange_after_user = #{exchangeAfterUser},
deal_result = #{dealResult},
deal_result = #{dealResult},
update_by = #{updateBy.id},
update_by = #{updateBy.id},
update_date = #{updateDate}
update_date = #{updateDate}
...
@@ -276,12 +277,85 @@
...
@@ -276,12 +277,85 @@
FROM sys_position
FROM sys_position
</select>
</select>
<update
id=
"modifyExchangeAfterUser"
parameterType=
"HashMap"
>
<insert
id=
"addReportNotice"
>
UPDATE report SET
INSERT INTO report_notice(
exchange_after_user = #{0}
id,
WHERE id = #{1}
report_id,
title,
send_time,
send_from_id,
send_to_id,
status,
create_by,
create_date,
update_by,
update_date
) VALUES (
#{id},
#{reportId},
#{title},
#{sendTime},
#{sendFromId},
#{sendToId},
#{status},
#{createBy},
#{createDate},
#{updateBy},
#{updateDate}
)
</insert>
<update
id=
"updateReportNotice"
>
UPDATE report_notice SET
id = #{id},
report_id = #{reportId},
title = #{title},
send_time = #{sendTime},
send_from_id = #{sendFromId},
send_to_id = #{sendToId},
status = #{status},
create_by = #{createBy},
create_date = #{createDate},
update_by = #{updateBy},
update_date = #{updateDate}
WHERE report_id = #{reportId}
</update>
</update>
<select
id=
"findReportNotice"
resultType=
"ReportNotice"
>
SELECT
*
FROM report_notice
WHERE report_id = #{reportId}
AND send_from_id = #{userId}
</select>
<select
id=
"findAdmin"
resultType=
"String"
>
SELECT
su.id
FROM
sys_user su
LEFT JOIN sys_user2role sur ON su.id = sur.user_id
LEFT JOIN sys_role sr ON sr.id = sur.role_id
WHERE
sr.`name` = '系统管理员'
</select>
<insert
id=
"addRecord"
>
INSERT INTO report_exchange_history(
id,
old_user_id,
new_user_id,
exchange_type,
exchange_time
) VALUES (
#{id},
#{oldUserId},
#{newUserId},
#{exchangeType},
#{exchangeTime}
)
</insert>
<select
id=
"getReportStatus"
parameterType=
"com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType=
"java.util.HashMap"
>
<select
id=
"getReportStatus"
parameterType=
"com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType=
"java.util.HashMap"
>
select report_status,COUNT(report_status)
select report_status,COUNT(report_status)
FROM report
FROM report
...
...
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
View file @
59733c3a
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
$
(
"#btnExport"
).
click
(
function
(){
$
(
"#btnExport"
).
click
(
function
(){
top
.
$
.
jBox
.
confirm
(
"确认要导出数据吗?"
,
"系统提示"
,
function
(
v
,
h
,
f
){
top
.
$
.
jBox
.
confirm
(
"确认要导出数据吗?"
,
"系统提示"
,
function
(
v
,
h
,
f
){
if
(
v
==
"ok"
){
if
(
v
==
"ok"
){
$
(
"#searchForm"
).
attr
(
"action"
,
"${ctx}/cms/report/export"
);
var
flag
=
$
(
"#flag"
).
val
();
$
(
"#searchForm"
).
attr
(
"action"
,
"${ctx}/report/export?flag="
+
flag
);
$
(
"#searchForm"
).
submit
();
$
(
"#searchForm"
).
submit
();
}
}
},{
buttonsFocus
:
1
});
},{
buttonsFocus
:
1
});
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
59733c3a
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/modules/report/reportTransfer.jsp
deleted
100644 → 0
View file @
ef3f5673
<
%@
page
contentType=
"text/html;charset=UTF-8"
%
>
<
%@
include
file=
"/WEB-INF/views/include/taglib.jsp"
%
>
<html>
<head>
<title>
举报管理
</title>
<meta
name=
"decorator"
content=
"default"
/>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"#btnConfirm"
).
click
(
function
()
{
var
userId
=
$
(
'input:radio:checked'
).
val
();
var
id
=
"${report.id}"
;
window
.
location
.
href
=
"${ctx}/report/transfer?id="
+
id
+
"&userId="
+
userId
;
});
$
(
"input:radio"
).
click
(
function
()
{
$
(
"input:radio"
).
attr
(
"checked"
,
false
);
$
(
"#chooseItem"
).
empty
();
$
(
this
).
attr
(
"checked"
,
true
);
$
(
"#chooseItem"
).
html
(
"已选择 "
+
$
(
"input:radio:checked"
).
parent
().
next
().
next
().
next
().
html
()
+
"<span onclick='remove();'><font size='5'> ×</font></span>"
);
});
});
function
remove
(){
$
(
"input:radio"
).
attr
(
"checked"
,
false
);
$
(
"#chooseItem"
).
empty
();
}
function
page
(
n
,
s
){
$
(
"#pageNo"
).
val
(
n
);
$
(
"#pageSize"
).
val
(
s
);
$
(
"#searchForm"
).
attr
(
"action"
,
"${ctx}/report/viewTransfer"
);
$
(
"#searchForm"
).
submit
();
return
false
;
}
function
resetPageNo
()
{
$
(
"#pageNo"
).
val
(
0
);
}
</script>
</head>
<body>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"${ctx}/report/viewTransfer"
>
选择移交人员
</a></li>
</ul>
<form:form
id=
"searchForm"
modelAttribute=
"user"
action=
"${ctx}/report/viewTransfer?id=${report.id}"
method=
"post"
class=
"breadcrumb form-search"
>
<input
id=
"pageNo"
name=
"pageNo"
type=
"hidden"
value=
"${page.pageNo}"
/>
<input
id=
"pageSize"
name=
"pageSize"
type=
"hidden"
value=
"${page.pageSize}"
/>
<ul
class=
"ul-form"
>
<li><label>
员工号:
</label><form:input
onchange=
"resetPageNo();"
path=
"no"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
姓名:
</label><form:input
onchange=
"resetPageNo();"
path=
"name"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
手机号:
</label><form:input
onchange=
"resetPageNo();"
path=
"mobile"
htmlEscape=
"false"
maxlength=
"50"
class=
"input-small"
/></li>
<li><label>
公司:
</label><form:select
onchange=
"resetPageNo();"
path=
"company.id"
class=
"input-small "
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${companyList}"
itemLabel=
"name"
itemValue=
"id"
htmlEscape=
"false"
/>
</form:select></li>
<li
class=
"clearfix"
></li>
<li><label>
部门:
</label><form:select
onchange=
"resetPageNo();"
path=
"office.id"
class=
"input-small"
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${officeList}"
itemLabel=
"name"
itemValue=
"id"
htmlEscape=
"false"
/></form:select></li>
<li><label>
职位:
</label><form:select
onchange=
"resetPageNo();"
path=
"positionName"
class=
"input-small"
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${positionList}"
itemLabel=
"positionName"
itemValue=
"positionName"
htmlEscape=
"false"
/></form:select></li>
<li
class=
"btns"
>
<label
style=
"width:auto;"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"筛选"
/>
</label>
</li>
<li
class=
"clearfix"
></li>
</ul>
</form:form>
<sys:message
content=
"${message}"
/>
<table
id=
"contentTable"
class=
"table table-striped table-bordered table-condensed"
>
<thead>
<tr>
<th>
选择
</th>
<th>
ID
</th>
<th>
员工号
</th>
<th>
姓名
</th>
<th>
手机号
</th>
<th>
所属公司
</th>
<th>
所属部门
</th>
<th>
职位
</th>
</tr>
</thead>
<tbody>
<c:if
test=
"${page.list.size()>0}"
>
<c:forEach
items=
"${page.list}"
var=
"user"
varStatus=
"vs"
>
<tr>
<td><input
type=
"radio"
value=
"${user.id}"
></td>
<td>
${vs.count}
</td>
<td>
${user.no}
</td>
<td>
${user.name}
</td>
<td>
${user.mobile}
</td>
<td>
${user.company.name}
</td>
<td>
${user.office.name}
</td>
<td>
${user.positionName}
</td>
</tr>
</c:forEach>
</c:if>
</tbody>
</table>
<span
id=
"chooseItem"
></span>
<c:if
test=
"${page.list.size()=='0'}"
>
<span
style=
"color: #999999;margin: 20px 0 70px 20px;display: block;"
>
未查询到相关内容
</span>
</c:if>
<c:if
test=
"${page.list.size()>0}"
>
<div
class=
"pagination"
>
${page}
</div>
</c:if>
<li
class=
"btns"
>
<label
style=
"width:auto;"
><input
id=
"btnConfirm"
class=
"btn btn-primary"
type=
"button"
value=
"确定"
/>
<input
id=
"btnClose"
class=
"btn btn-primary"
type=
"button"
value=
"关闭"
onclick=
"javascript:window.close();"
/></label>
</li>
</body>
</html>
\ No newline at end of file
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