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
250701a5
Commit
250701a5
authored
Nov 13, 2017
by
java-lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放开root的退出
parent
1bcfc587
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
55 deletions
+131
-55
ReportController.java
src/main/java/com/ejweb/modules/report/web/ReportController.java
+8
-7
WorkbenchBean.java
src/main/java/com/ejweb/modules/workbench/Bean/WorkbenchBean.java
+45
-0
WorkbenchService.java
src/main/java/com/ejweb/modules/workbench/service/WorkbenchService.java
+36
-24
WorkbenchController.java
src/main/java/com/ejweb/modules/workbench/web/WorkbenchController.java
+5
-0
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+13
-2
reportDetail.jsp
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
+2
-20
reportList.jsp
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
+1
-1
workbench.jsp
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
+21
-1
No files found.
src/main/java/com/ejweb/modules/report/web/ReportController.java
View file @
250701a5
...
...
@@ -229,14 +229,15 @@ public class ReportController extends BaseController {
dealAttachment
.
setAttachmentType
(
"2"
);
List
<
ReportAttachmentEntity
>
dealAttachmentList
=
reportService
.
getAttachmentInfo
(
dealAttachment
);
//业务类型
String
supplementTypeStr
=
""
;
String
[]
supplementTypes
=
{
"营销"
,
"工程"
,
"成本"
,
"招采"
,
"人力"
,
"物业"
,
"投诉"
,
"行政"
,
"财务"
,
"商业管理"
,
"研发"
,
"投资开发"
};
String
typeNumber
[]
=
reportEntity
.
getSupplementType
().
split
(
","
);
for
(
int
i
=
0
;
i
<
typeNumber
.
length
;
i
++)
{
supplementTypeStr
+=
supplementTypes
[
Integer
.
valueOf
(
typeNumber
[
i
])-
1
]+
","
;
String
supplementTypeStr
=
""
;
if
(
StringUtils
.
isNotBlank
(
reportEntity
.
getSupplementType
()))
{
String
[]
supplementTypes
=
{
"营销"
,
"工程"
,
"成本"
,
"招采"
,
"人力"
,
"物业"
,
"投诉"
,
"行政"
,
"财务"
,
"商业管理"
,
"研发"
,
"投资开发"
};
String
typeNumber
[]
=
reportEntity
.
getSupplementType
().
split
(
","
);
for
(
int
i
=
0
;
i
<
typeNumber
.
length
;
i
++)
{
supplementTypeStr
+=
supplementTypes
[
Integer
.
valueOf
(
typeNumber
[
i
])
-
1
]
+
","
;
}
supplementTypeStr
=
supplementTypeStr
.
substring
(
0
,
supplementTypeStr
.
length
()
-
1
);
}
supplementTypeStr
=
supplementTypeStr
.
substring
(
0
,
supplementTypeStr
.
length
()-
1
);
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"user"
,
userEntity
);
model
.
addAttribute
(
"userName"
,
user
.
getName
());
...
...
src/main/java/com/ejweb/modules/workbench/Bean/WorkbenchBean.java
View file @
250701a5
...
...
@@ -49,6 +49,11 @@ public class WorkbenchBean {
private
int
manpower
=
0
;
private
int
tenement
=
0
;
private
int
complain
=
0
;
private
int
administration
=
0
;
private
int
finance
=
0
;
private
int
businessManagement
=
0
;
private
int
rAndD
=
0
;
private
int
iAndD
=
0
;
public
WorkbenchBean
()
{
}
...
...
@@ -292,4 +297,44 @@ public class WorkbenchBean {
public
void
setProcessStatus
(
String
processStatus
)
{
this
.
processStatus
=
processStatus
;
}
public
int
getAdministration
()
{
return
administration
;
}
public
void
setAdministration
(
int
administration
)
{
this
.
administration
=
administration
;
}
public
int
getFinance
()
{
return
finance
;
}
public
void
setFinance
(
int
finance
)
{
this
.
finance
=
finance
;
}
public
int
getBusinessManagement
()
{
return
businessManagement
;
}
public
void
setBusinessManagement
(
int
businessManagement
)
{
this
.
businessManagement
=
businessManagement
;
}
public
int
getrAndD
()
{
return
rAndD
;
}
public
void
setrAndD
(
int
rAndD
)
{
this
.
rAndD
=
rAndD
;
}
public
int
getiAndD
()
{
return
iAndD
;
}
public
void
setiAndD
(
int
iAndD
)
{
this
.
iAndD
=
iAndD
;
}
}
src/main/java/com/ejweb/modules/workbench/service/WorkbenchService.java
View file @
250701a5
...
...
@@ -77,30 +77,42 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
workbench
.
setRepStatusTotal
(
workbench
.
getUnProcess
()+
workbench
.
getProcessing
()+
workbench
.
getProcessed
());
List
<
HashMap
>
types
=
reportDao
.
getReportType
(
workbench
);
for
(
HashMap
type:
types
){
if
(
StringUtils
.
isNotBlank
((
String
)
type
.
get
(
"SUPPLEMENT_TYPE"
))){
if
(
"1"
.
equals
((
String
)
type
.
get
(
"SUPPLEMENT_TYPE"
))){
//营销
workbench
.
setSale
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"2"
.
equals
((
String
)
type
.
get
(
"SUPPLEMENT_TYPE"
))){
//工程
workbench
.
setProject
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"3"
.
equals
(
String
.
valueOf
(
type
.
get
(
"SUPPLEMENT_TYPE"
)))){
//成本
workbench
.
setCost
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"4"
.
equals
(
String
.
valueOf
(
type
.
get
(
"SUPPLEMENT_TYPE"
)))){
//招采
workbench
.
setForMining
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"5"
.
equals
(
String
.
valueOf
(
type
.
get
(
"SUPPLEMENT_TYPE"
)))){
//人力
workbench
.
setManpower
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"6"
.
equals
(
String
.
valueOf
(
type
.
get
(
"SUPPLEMENT_TYPE"
)))){
//物业
workbench
.
setTenement
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
else
if
(
"7"
.
equals
(
String
.
valueOf
(
type
.
get
(
"SUPPLEMENT_TYPE"
)))){
//投诉
workbench
.
setComplain
(
Integer
.
valueOf
(
String
.
valueOf
(
type
.
get
(
"COUNT(SUPPLEMENT_TYPE)"
))));
}
}
//营销
Object
sale
=
type
.
get
(
"sale"
);
workbench
.
setSale
(
Integer
.
valueOf
(
sale
.
toString
()));
//工程
Object
project
=
type
.
get
(
"project"
);
workbench
.
setProject
(
Integer
.
valueOf
(
project
.
toString
()));
//成本
Object
cost
=
type
.
get
(
"cost"
);
workbench
.
setCost
(
Integer
.
valueOf
(
cost
.
toString
()));
//招采
Object
forMining
=
type
.
get
(
"forMining"
);
workbench
.
setForMining
(
Integer
.
valueOf
(
forMining
.
toString
()));
//人力
Object
manpower
=
type
.
get
(
"manpower"
);
workbench
.
setManpower
(
Integer
.
valueOf
(
manpower
.
toString
()));
//物业
Object
tenement
=
type
.
get
(
"tenement"
);
workbench
.
setTenement
(
Integer
.
valueOf
(
tenement
.
toString
()));
//投诉
Object
complain
=
type
.
get
(
"complain"
);
workbench
.
setComplain
(
Integer
.
valueOf
(
complain
.
toString
()));
//行政
Object
administration
=
type
.
get
(
"administration"
);
workbench
.
setAdministration
(
Integer
.
valueOf
(
administration
.
toString
()));
//财务
Object
finance
=
type
.
get
(
"finance"
);
workbench
.
setFinance
(
Integer
.
valueOf
(
finance
.
toString
()));
//商业管理
Object
businessManagement
=
type
.
get
(
"businessManagement"
);
workbench
.
setBusinessManagement
(
Integer
.
valueOf
(
businessManagement
.
toString
()));
//研发
Object
rAndD
=
type
.
get
(
"rAndD"
);
workbench
.
setrAndD
(
Integer
.
valueOf
(
rAndD
.
toString
()));
//投资开发
Object
iAndD
=
type
.
get
(
"iAndD"
);
workbench
.
setiAndD
(
Integer
.
valueOf
(
iAndD
.
toString
()));
}
List
<
HashMap
>
totals
=
reportDao
.
getTotal
(
workbench
);
for
(
HashMap
total:
totals
){
...
...
src/main/java/com/ejweb/modules/workbench/web/WorkbenchController.java
View file @
250701a5
...
...
@@ -80,6 +80,11 @@ public class WorkbenchController extends BaseController {
res
.
put
(
"manpower"
,
bean
.
getManpower
());
res
.
put
(
"tenement"
,
bean
.
getTenement
());
res
.
put
(
"complain"
,
bean
.
getComplain
());
res
.
put
(
"administration"
,
bean
.
getAdministration
());
res
.
put
(
"finance"
,
bean
.
getFinance
());
res
.
put
(
"businessManagement"
,
bean
.
getBusinessManagement
());
res
.
put
(
"rAndD"
,
bean
.
getrAndD
());
res
.
put
(
"iAndD"
,
bean
.
getiAndD
());
res
.
put
(
"startDate"
,
bean
.
getStartDate
());
res
.
put
(
"endDate"
,
bean
.
getEndDate
());
...
...
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
250701a5
...
...
@@ -451,7 +451,19 @@
</select>
<select
id=
"getReportType"
parameterType=
"com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType=
"java.util.HashMap"
>
select supplement_type,COUNT(supplement_type)
SELECT
SUM(CASE WHEN supplement_type||',' LIKE '1,%' OR supplement_type||',' LIKE '%,1,%' THEN 1 ELSE 0 END) AS "sale",
SUM(CASE WHEN supplement_type||',' LIKE '2,%' OR supplement_type||',' LIKE '%,2,%' THEN 1 ELSE 0 END) AS "project",
SUM(CASE WHEN supplement_type||',' LIKE '3,%' OR supplement_type||',' LIKE '%,3,%' THEN 1 ELSE 0 END) AS "cost",
SUM(CASE WHEN supplement_type||',' LIKE '4,%' OR supplement_type||',' LIKE '%,4,%' THEN 1 ELSE 0 END) AS "forMining",
SUM(CASE WHEN supplement_type||',' LIKE '5,%' OR supplement_type||',' LIKE '%,5,%' THEN 1 ELSE 0 END) AS "manpower",
SUM(CASE WHEN supplement_type||',' LIKE '6,%' OR supplement_type||',' LIKE '%,6,%' THEN 1 ELSE 0 END) AS "tenement",
SUM(CASE WHEN supplement_type||',' LIKE '7,%' OR supplement_type||',' LIKE '%,7,%' THEN 1 ELSE 0 END) AS "complain",
SUM(CASE WHEN supplement_type||',' LIKE '8,%' OR supplement_type||',' LIKE '%,8,%' THEN 1 ELSE 0 END) AS "administration",
SUM(CASE WHEN supplement_type||',' LIKE '9,%' OR supplement_type||',' LIKE '%,9,%' THEN 1 ELSE 0 END) AS "finance",
SUM(CASE WHEN supplement_type||',' LIKE '10,%' OR supplement_type||',' LIKE '%,10,%' THEN 1 ELSE 0 END) AS "businessManagement",
SUM(CASE WHEN supplement_type||',' LIKE '11,%' OR supplement_type||',' LIKE '%,11,%' THEN 1 ELSE 0 END) AS "rAndD",
SUM(CASE WHEN supplement_type||',' LIKE '12,%' OR supplement_type||',' LIKE '%,12,%' THEN 1 ELSE 0 END) AS "iAndD"
FROM ct_bbtc_report
WHERE 1=1
<if
test=
"isAdmin != null"
>
...
...
@@ -465,7 +477,6 @@
<if
test=
"dbName == 'oracle'"
>
AND create_date
<
= to_date( #{endDate}|| ' 23:59:59', 'yyyy-MM-dd hh24:mi:ss')
</if>
<if
test=
"dbName == 'mysql'"
>
AND DATE(create_date)
<
= #{endDate}
</if>
</if>
GROUP BY supplement_type
</select>
<select
id=
"getRepList"
parameterType=
"com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType=
"ReportEntity"
>
...
...
src/main/webapp/WEB-INF/views/modules/report/reportDetail.jsp
View file @
250701a5
...
...
@@ -12,24 +12,6 @@
window
.
location
.
href
=
"${ctx}/report/track?id=${report.id}"
;
});
var
supplementType
=
"${report.supplementType}"
;
if
(
supplementType
==
"1"
){
supplementType
=
"营销"
;
}
else
if
(
supplementType
==
"2"
){
supplementType
=
"工程"
;
}
else
if
(
supplementType
==
"3"
){
supplementType
=
"成本"
;
}
else
if
(
supplementType
==
"4"
){
supplementType
=
"招采"
;
}
else
if
(
supplementType
==
"5"
){
supplementType
=
"人力"
;
}
else
if
(
supplementType
==
"6"
){
supplementType
=
"物业"
;
}
else
if
(
supplementType
==
"7"
){
supplementType
=
"投诉"
;
}
$
(
"#supplementType"
).
val
(
supplementType
);
var
supplementArea
=
"${report.supplementArea}"
;
if
(
supplementArea
==
"North China"
){
supplementArea
=
"华北区域公司"
;
...
...
@@ -54,11 +36,11 @@
var
dealResult
=
"${report.dealResult}"
;
if
(
dealResult
==
"1"
){
dealResult
=
"
投
诉"
;
dealResult
=
"
移交客
诉"
;
}
else
if
(
dealResult
==
"2"
){
dealResult
=
"举报无效"
;
}
else
if
(
dealResult
==
"3"
){
dealResult
=
"举报
属实
"
;
dealResult
=
"举报
受理
"
;
}
$
(
"#dealResult"
).
val
(
dealResult
);
});
...
...
src/main/webapp/WEB-INF/views/modules/report/reportList.jsp
View file @
250701a5
...
...
@@ -66,7 +66,7 @@
</head>
<body>
<ul
class=
"nav nav-tabs"
>
<li
<
c:if
test=
"${flag eq null or flag eq ''}"
>
class="active"
</c:if>
>
<a
href=
"${ctx}/report/list"
>
核查
中举报列表
</a></li>
<li
<
c:if
test=
"${flag eq null or flag eq ''}"
>
class="active"
</c:if>
>
<a
href=
"${ctx}/report/list"
>
跟踪
中举报列表
</a></li>
<li
<
c:if
test=
"${flag eq '0'}"
>
class="active"
</c:if>
>
<a
href=
"${ctx}/report/list?flag=0"
>
未处理举报列表
</a></li>
<li
<
c:if
test=
"${flag eq '1'}"
>
class="active"
</c:if>
>
<a
href=
"${ctx}/report/list?flag=1"
>
举报列表
</a></li>
<
%
--
<
li
style=
"float: right;"
><input
id=
"btnAdd"
class=
"btn btn-primary"
type=
"button"
value=
"举报录入"
/></li>
--%>
...
...
src/main/webapp/WEB-INF/views/modules/workbench/workbench.jsp
View file @
250701a5
...
...
@@ -106,7 +106,12 @@
'招采'
,
'人力'
,
'物业'
,
'投诉'
'投诉'
,
'行政'
,
'财务'
,
'商业管理'
,
'研发'
,
'投资开发'
],
labels
:{
enabled
:
false
...
...
@@ -162,6 +167,21 @@
},
{
name
:
'投诉'
,
data
:
[
result
.
complain
]
},
{
name
:
'行政'
,
data
:
[
result
.
administration
]
},
{
name
:
'财务'
,
data
:
[
result
.
finance
]
},
{
name
:
'商业管理'
,
data
:
[
result
.
businessManagement
]
},
{
name
:
'研发'
,
data
:
[
result
.
rAndD
]
},
{
name
:
'投资开发'
,
data
:
[
result
.
iAndD
]
}
]
});
...
...
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