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
ddc2f410
Commit
ddc2f410
authored
Jan 12, 2018
by
java-lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理人逻辑修改,添加举报属实,工作台添加举报属实
parent
29fa8494
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
79 additions
and
39 deletions
+79
-39
FrontReportController.java
src/main/java/com/ejweb/modules/front/report/api/FrontReportController.java
+4
-2
FrontReportService.java
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
+4
-1
ReportEntity.java
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
+9
-0
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+10
-1
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+10
-3
ReportToWordController.java
src/main/java/com/ejweb/modules/report/web/ReportToWordController.java
+2
-0
WorkbenchBean.java
src/main/java/com/ejweb/modules/workbench/Bean/WorkbenchBean.java
+9
-0
WorkbenchService.java
src/main/java/com/ejweb/modules/workbench/service/WorkbenchService.java
+3
-0
WorkbenchController.java
src/main/java/com/ejweb/modules/workbench/web/WorkbenchController.java
+1
-0
reportDeliver.jsp
src/main/webapp/WEB-INF/views/modules/report/reportDeliver.jsp
+1
-20
reportList.jsp
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
+1
-0
reportTrack.jsp
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
+23
-11
workbench.jsp
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
+2
-1
No files found.
src/main/java/com/ejweb/modules/front/report/api/FrontReportController.java
View file @
ddc2f410
...
...
@@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
* Created by zhangzn on 2017/9/7.
*/
...
...
@@ -44,7 +46,7 @@ public class FrontReportController {
* @return
*/
@RequestMapping
(
"addReport"
)
public
ResponseBean
addReport
(
FrontReportBean
bean
,
String
token
){
public
ResponseBean
addReport
(
FrontReportBean
bean
,
String
token
,
HttpServletRequest
request
){
ResponseBean
responseBean
=
new
ResponseBean
();
if
(
bean
!=
null
){
if
(!
CaptchaUtil
.
validate
(
bean
.
getCaptcha
(),
bean
.
getCode
())){
...
...
@@ -57,7 +59,7 @@ public class FrontReportController {
responseBean
.
setMessage
(
"report_source为空"
);
return
responseBean
;
}
else
{
return
frontReportService
.
addReport
(
bean
,
token
);
return
frontReportService
.
addReport
(
bean
,
token
,
request
);
}
}
responseBean
.
setStatus
(
ErrorCode
.
STATUS_CODE_4001
);
...
...
src/main/java/com/ejweb/modules/front/report/service/FrontReportService.java
View file @
ddc2f410
...
...
@@ -25,6 +25,7 @@ import org.springframework.core.io.Resource;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.URLDecoder
;
import
java.sql.Timestamp
;
import
java.util.Date
;
...
...
@@ -41,7 +42,7 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
private
static
Logger
log
=
LoggerFactory
.
getLogger
(
FrontReportService
.
class
);
// 添加举报信息
@Transactional
(
readOnly
=
false
)
public
ResponseBean
addReport
(
FrontReportBean
bean
,
String
token
){
public
ResponseBean
addReport
(
FrontReportBean
bean
,
String
token
,
HttpServletRequest
request
){
ResponseBean
responseBean
=
new
ResponseBean
();
String
reportId
=
IdWorker
.
getNextId
(
"R"
);
bean
.
setId
(
reportId
);
...
...
@@ -85,6 +86,8 @@ public class FrontReportService extends CrudService<FrontReportDao,FrontReportEn
bean
.
setCreateDate
(
d
);
bean
.
setUpdateDate
(
d
);
int
port
=
request
.
getRemotePort
();
//返回发出请求的客户机的端口号。
// logger.info("port:"+port);
// String ip = StringUtils.getRemoteAddr(Servlets.getRequest());
// /** 根据ip获得城市 */
// String url = "http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=" + ip;
...
...
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
View file @
ddc2f410
...
...
@@ -47,6 +47,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private
String
isSendEmail
;
//是否已经发送过邮件 0未发送 1已发送
private
String
transferName
;
//移交给
private
String
dealPerson
;
public
String
getOaname
()
{
return
oaname
;
...
...
@@ -347,4 +348,12 @@ public class ReportEntity extends DataEntity<ReportEntity> {
public
void
setIsSendEmail
(
String
isSendEmail
)
{
this
.
isSendEmail
=
isSendEmail
;
}
public
String
getDealPerson
()
{
return
dealPerson
;
}
public
void
setDealPerson
(
String
dealPerson
)
{
this
.
dealPerson
=
dealPerson
;
}
}
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
ddc2f410
...
...
@@ -18,10 +18,13 @@ import com.ejweb.modules.sys.entity.Role;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.sys.utils.UserUtils
;
import
com.ejweb.modules.workbench.entity.ReportNotice
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
...
...
@@ -44,6 +47,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
@Autowired
private
RoleDao
roleDao
;
protected
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportService
.
class
);
/**
* 查询附件
* @param reportAttachmentEntity
...
...
@@ -67,7 +72,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
* @param reportEntity
*/
@Transactional
(
readOnly
=
false
)
public
void
saveReport
(
ReportEntity
reportEntity
)
{
public
void
saveReport
(
ReportEntity
reportEntity
,
HttpServletRequest
request
)
{
//保存举报信息
reportEntity
.
preInsert
();
//保存填写人信息
...
...
@@ -83,6 +88,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportEntity
.
setExchangeAfterUser
(
reportEntity
.
getCreateBy
().
getId
());
}
String
ip
=
user
.
getLoginIp
();
int
port
=
request
.
getRemotePort
();
//返回发出请求的客户机的端口号。
// logger.info("port:"+port);
// ip = "183.129.142.154";
String
url
=
"http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip="
+
ip
;
String
ipResult
=
IpUtils
.
getURLContent
(
url
).
replace
(
";"
,
""
);
...
...
@@ -401,6 +408,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
dealResult
=
"举报无效"
;
}
else
if
(
dealResult
.
equals
(
"3"
))
{
dealResult
=
"举报受理"
;
}
else
if
(
dealResult
.
equals
(
"4"
))
{
dealResult
=
"举报属实"
;
}
}
else
{
dealResult
=
"--"
;
...
...
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
ddc2f410
...
...
@@ -149,11 +149,11 @@ public class ReportController extends BaseController {
* @return
*/
@RequestMapping
(
value
=
"addReport"
)
public
String
addReport
(
ReportEntity
reportEntity
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
public
String
addReport
(
ReportEntity
reportEntity
,
HttpServletRequest
request
,
Model
model
,
RedirectAttributes
redirectAttributes
)
{
if
(!
beanValidator
(
model
,
reportEntity
))
{
return
form
(
reportEntity
,
model
);
}
reportService
.
saveReport
(
reportEntity
);
reportService
.
saveReport
(
reportEntity
,
request
);
addMessage
(
redirectAttributes
,
"添加举报"
+
reportEntity
.
getReportProject
()
+
"'成功"
);
return
"redirect:"
+
adminPath
+
"/report/list/?repage&flag=0"
;
}
...
...
@@ -259,8 +259,9 @@ public class ReportController extends BaseController {
}
supplementTypeStr
=
supplementTypeStr
.
substring
(
0
,
supplementTypeStr
.
length
()
-
1
);
}
reportEntity
.
setDealPerson
(
reportEntity
.
getDealPersonName
());
if
(
StringUtils
.
isBlank
(
reportEntity
.
getDealPersonName
())){
reportEntity
.
setDealPerson
Name
(
user
.
getName
());
reportEntity
.
setDealPerson
(
user
.
getName
());
}
String
isSendEmail
=
reportEntity
.
getIsSendEmail
();
if
(
StringUtils
.
isNotBlank
(
isSendEmail
)){
...
...
@@ -315,6 +316,12 @@ public class ReportController extends BaseController {
String
exchangeAfterUser
=
reportService
.
findExchangeUser
(
reportEntity
.
getId
());
reportEntity
.
setExchangeAfterUser
(
exchangeAfterUser
);
}
if
(
reportEntity
.
getDealResult
().
equals
(
"1"
)
||
reportEntity
.
getDealResult
().
equals
(
"2"
)
||
reportEntity
.
getDealResult
().
equals
(
"4"
)
||
(
reportEntity
.
getDealResult
().
equals
(
"3"
)
&&
StringUtils
.
isNotBlank
(
ifDone
)))
{
if
(
StringUtils
.
isBlank
(
reportEntity
.
getDealPersonName
())){
reportEntity
.
setDealPersonName
(
reportEntity
.
getDealPerson
());
}
}
reportService
.
saveTrack
(
reportEntity
,
transferUser
);
if
(
StringUtils
.
isNotBlank
(
transferUser
)
&&
StringUtils
.
isBlank
(
reportEntity
.
getDealResult
())){
...
...
src/main/java/com/ejweb/modules/report/web/ReportToWordController.java
View file @
ddc2f410
...
...
@@ -409,6 +409,8 @@ public class ReportToWordController {
deal_result
=
"举报无效"
;
}
else
if
(
deal_result
.
equals
(
"3"
))
{
deal_result
=
"举报受理"
;
}
else
if
(
deal_result
.
equals
(
"4"
))
{
deal_result
=
"举报属实"
;
}
}
else
{
deal_result
=
""
;
...
...
src/main/java/com/ejweb/modules/workbench/Bean/WorkbenchBean.java
View file @
ddc2f410
...
...
@@ -27,6 +27,7 @@ public class WorkbenchBean {
private
int
repResultTotal
=
0
;
private
int
invalid
=
0
;
private
int
complainNum
=
0
;
private
int
confirmed
=
0
;
private
int
verified
=
0
;
//总体
...
...
@@ -154,6 +155,14 @@ public class WorkbenchBean {
this
.
verified
=
verified
;
}
public
int
getConfirmed
()
{
return
confirmed
;
}
public
void
setConfirmed
(
int
confirmed
)
{
this
.
confirmed
=
confirmed
;
}
public
int
getTotal
()
{
return
total
;
}
...
...
src/main/java/com/ejweb/modules/workbench/service/WorkbenchService.java
View file @
ddc2f410
...
...
@@ -52,6 +52,9 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}
else
if
(
"3"
.
equals
((
String
)
res
.
get
(
"DEAL_RESULT"
))){
//举报受理
workbench
.
setVerified
(
Integer
.
valueOf
(
String
.
valueOf
(
res
.
get
(
"COUNT(DEAL_RESULT)"
))));
}
else
if
(
"4"
.
equals
((
String
)
res
.
get
(
"DEAL_RESULT"
))){
//举报属实
workbench
.
setConfirmed
(
Integer
.
valueOf
(
String
.
valueOf
(
res
.
get
(
"COUNT(DEAL_RESULT)"
))));
}
}
...
...
src/main/java/com/ejweb/modules/workbench/web/WorkbenchController.java
View file @
ddc2f410
...
...
@@ -70,6 +70,7 @@ public class WorkbenchController extends BaseController {
res
.
put
(
"invalid"
,
bean
.
getInvalid
());
res
.
put
(
"complainNum"
,
bean
.
getComplainNum
());
res
.
put
(
"verified"
,
bean
.
getVerified
());
res
.
put
(
"confirmed"
,
bean
.
getConfirmed
());
res
.
put
(
"startDate"
,
bean
.
getStartDate
());
res
.
put
(
"endDate"
,
bean
.
getEndDate
());
//举报类型
...
...
src/main/webapp/WEB-INF/views/modules/report/reportDeliver.jsp
View file @
ddc2f410
...
...
@@ -138,26 +138,6 @@
<td>
${report.supplementTitle}
</td>
<td>
${report.supplementType}
<
%
--
<
c:if
test=
"${fn:contains(report.supplementType,'1')}"
>
--%>
<
%
--
<
c:set
var=
"string1"
value=
"I am from google"
/>
--%>
<
%
--
<
c:set
var=
"string2"
value=
"${fn:replace(string1,--%>
<%--'google', 'runoob')}"
/>
--%>
<
%
--
<
p
>
替换后的字符串 : ${string2}
</p>
--%>
<
%
--
<
c:set
var=
"string1"
value=
"${report.supplement}"
/>
--%>
<
%
--
<
c:set
var=
"deliverSupplementTypes"
value=
"${fn:replace(string1 ,'1', 'ceshiyx')}"
/>
--%>
<
%
--
${
deliverSupplementTypes
}
--
%
>
<
%
--
</
c:if
>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '1'}"
>
营销
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '2'}"
>
工程
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '3'}"
>
成本
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '4'}"
>
招采
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '5'}"
>
人力
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '6'}"
>
物业
</c:if>
--%>
<
%
--
<
c:if
test=
"${report.supplementType eq '7'}"
>
投诉
</c:if>
--%>
</td>
<td>
${report.reportProject}/${report.supplementDepartment}
</td>
<td>
${report.reportPersonName}
</td>
...
...
@@ -189,6 +169,7 @@
<c:if
test=
"${report.dealResult eq '1'}"
>
移交客诉
</c:if>
<c:if
test=
"${report.dealResult eq '2'}"
>
举报无效
</c:if>
<c:if
test=
"${report.dealResult eq '3'}"
>
举报受理
</c:if>
<c:if
test=
"${report.dealResult eq '4'}"
>
举报属实
</c:if>
</td>
<td><c:if
test=
"${report.dealPersonName eq null}"
>
--
</c:if>
<c:if
test=
"${report.dealPersonName ne null}"
>
${report.dealPersonName}
</c:if>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
View file @
ddc2f410
...
...
@@ -199,6 +199,7 @@
<c:if
test=
"${report.dealResult eq '1'}"
>
移交客诉
</c:if>
<c:if
test=
"${report.dealResult eq '2'}"
>
举报无效
</c:if>
<c:if
test=
"${report.dealResult eq '3'}"
>
举报受理
</c:if>
<c:if
test=
"${report.dealResult eq '4'}"
>
举报属实
</c:if>
</td>
<td><c:if
test=
"${report.dealPersonName eq null}"
>
--
</c:if>
<c:if
test=
"${report.dealPersonName ne null}"
>
${report.dealPersonName}
</c:if>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportTrack.jsp
View file @
ddc2f410
...
...
@@ -64,14 +64,11 @@
ck
[
number
[
i
]
-
1
].
checked
=
true
;
}
}
//管理员权限可选择处理结论
<%--
//管理员权限可选择处理结论--%>
<%--
var
isAdmin
=
$
{
isAdmin
};
--%>
<%--
if
(
isAdmin
==
false
)
{
--%>
<%--
$
(
"#dealResult"
).
attr
(
"disabled"
,
true
);
--%>
<%--
}
--%>
// $("#reportDetail input[type='text']").each(function(){
// $(this).attr("disabled",true);
// });
<%--
var
source
=
"${report.reportSource}"
;
--%>
<%--
$
(
":radio[name='reportSource'][value='"
+
source
+
"']"
).
prop
(
"checked"
,
"checked"
);
--%>
var
supplementType
=
$
(
"#supplementType"
).
find
(
"option:selected"
).
text
();
...
...
@@ -79,7 +76,11 @@
if
(
supplementType
==
"请选择"
){
supplementType
=
"${report.reportProject}"
;
}
//判断是否显示是否完成选择框
var
dealResult
=
$
(
"#dealResult"
).
val
();
if
(
dealResult
==
'3'
){
$
(
"#selectDone"
).
show
();
}
});
/**
...
...
@@ -384,7 +385,19 @@
// window.location.href = path;
$
(
"#sendE"
).
attr
(
"href"
,
path
);
}
//显示是否完成选择框
function
showDone
(){
var
dealResult
=
$
(
"#dealResult"
).
val
();
if
(
dealResult
==
'3'
){
$
(
"#selectDone"
).
show
();
}
else
{
$
(
"#selectDone"
).
hide
();
}
}
function
getPersonName
()
{
var
dealPersonName
=
$
(
"#dealPerson"
).
val
();
$
(
"#dealPersonName"
).
val
(
dealPersonName
);
}
</script>
<style
type=
"text/css"
>
.title
{
...
...
@@ -573,7 +586,8 @@
<div
class=
"control-group"
>
<label
class=
"control-label"
>
处理人:
</label>
<div
class=
"controls"
>
<form:input
path=
"dealPersonName"
htmlEscape=
"false"
maxlength=
"200"
class=
"input-xlarge required"
/>
<input
type=
"text"
id=
"dealPersonName"
name=
"dealPersonName"
value=
""
style=
"display:none;"
/>
<form:input
path=
"dealPerson"
id=
"dealPerson"
htmlEscape=
"false"
maxlength=
"200"
class=
"input-xlarge required"
onchange=
"getPersonName();"
/>
<span
class=
"help-inline"
><font
color=
"red"
>
*
</font>
</span>
</div>
</div>
...
...
@@ -594,17 +608,15 @@
<br>
<label
class=
"control-label"
>
处理结论:
</label>
<div
class=
"controls"
>
<form:select
path=
"dealResult"
id=
"dealResult"
class=
"input-small required"
>
<form:select
path=
"dealResult"
id=
"dealResult"
class=
"input-small required"
onchange=
"showDone();"
>
<form:option
value=
" "
>
请选择
</form:option>
<form:options
items=
"${fns:getDictList('deal_result')}"
itemLabel=
"label"
itemValue=
"value"
htmlEscape=
"false"
/>
</form:select>
</div>
<br>
<c:if
test=
"${report.dealResult eq '3'}"
>
<div
class=
"controls"
>
<div
class=
"controls"
id=
"selectDone"
style=
"display:none"
>
<input
type=
"checkbox"
id=
"ifDone"
name=
"ifDone"
value=
"ifDone"
/>
是否完成
</div>
</c:if>
<span
class=
"title"
>
移交他人处理
</span>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
移交:
</label>
...
...
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
View file @
ddc2f410
...
...
@@ -206,7 +206,7 @@
},
subtitle
:
{
//副标题
align
:
'right'
,
text
:
'总数 : '
+
result
.
bench
.
repResultTotal
+
'<br/>
<br/>举报无效 : '
+
result
.
invalid
+
'<br/><br/>移交客诉 : '
+
result
.
complainNum
+
'<br/><br/>举报受理 : '
+
result
.
verifi
ed
,
text
:
'总数 : '
+
result
.
bench
.
repResultTotal
+
'<br/>
举报无效 : '
+
result
.
invalid
+
'<br/>移交客诉 : '
+
result
.
complainNum
+
'<br/>举报受理 : '
+
result
.
verified
+
'<br/>举报属实 : '
+
result
.
confirm
ed
,
useHTML
:
true
,
verticalAlign
:
'top'
,
x
:
-
5
,
...
...
@@ -233,6 +233,7 @@
[
'举报无效'
,
result
.
invalid
],
[
'移交客诉'
,
result
.
complainNum
],
[
'举报受理'
,
result
.
verified
],
[
'举报属实'
,
result
.
confirmed
],
]
}]
});
...
...
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