Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
Hgs
Project
Project
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
徐州
Hgs
Commits
55dab5de
Commit
55dab5de
authored
Nov 25, 2021
by
huagnxiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回访报表跟踪统计修改权限
parent
8c2c2eaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
128 additions
and
96 deletions
+128
-96
StatisticController.java
...java/com/house365/web/controller/StatisticController.java
+84
-66
topbar.jsp
...hgs-web/src/main/webapp/WEB-INF/common/layouts/topbar.jsp
+5
-3
callBackTraceStatistic.jsp
.../WEB-INF/views/statistic/pages/callBackTraceStatistic.jsp
+39
-27
No files found.
house365-hgs-web/src/main/java/com/house365/web/controller/StatisticController.java
View file @
55dab5de
...
...
@@ -3594,29 +3594,28 @@ public class StatisticController extends BaseController {
public
String
callBackTraceStatistic
(
Integer
number
,
Integer
pageSize
,
Model
model
,
HttpServletRequest
request
)
{
UserEntity
userEntity
=
(
UserEntity
)
request
.
getSession
().
getAttribute
(
SessionConstants
.
THREAD_USER_KEY
);
boolean
isDirector
=
user
.
isDirector
(
userEntity
.
getId
());
List
<
DepartmentEntity
>
departmentEntities
=
user
.
getChildDepartList
(
userEntity
.
getDeptId
());
//默认返回合肥的数据,只有合肥(deptid=243)需要这个报表
List
<
DepartmentEntity
>
hfDepartmentEntityList
=
new
ArrayList
<>();
for
(
DepartmentEntity
dep
:
departmentEntities
)
{
if
(
isValidDept
(
dep
.
getUrlPath
(),
"243"
)){
hfDepartmentEntityList
.
add
(
dep
);
}
}
departmentEntities
.
clear
();
departmentEntities
.
addAll
(
hfDepartmentEntityList
);
if
(
departmentEntities
!=
null
&&
departmentEntities
.
isEmpty
())
{
model
.
addAttribute
(
"departments"
,
departmentEntities
);
return
getAutoUrl
();
}
//get user list
Page
page
=
new
Page
(
pageSize
==
null
?
20
:
pageSize
);
if
(
null
!=
number
)
{
page
.
setCurrentPage
(
number
);
}
//默认返回合肥的数据,只有合肥(deptid=243)需要这个报表
DepartmentEntity
depet
=
null
;
for
(
DepartmentEntity
dep
:
departmentEntities
)
{
if
(
dep
.
getId
()
==
243
)
{
depet
=
dep
;
}
}
if
(
depet
==
null
)
{
model
.
addAttribute
(
"department"
,
null
);
return
getAutoUrl
();
}
// 获取查询条件
String
startTime
=
request
.
getParameter
(
"startTime"
);
String
endTime
=
request
.
getParameter
(
"endTime"
);
...
...
@@ -3636,65 +3635,84 @@ public class StatisticController extends BaseController {
endTime
=
endTime
+
" 23:59:59"
;
}
Map
<
String
,
Object
>
searchParams
=
Servlets
.
getParametersStartingWith
(
request
,
"search_"
);
UserListResponse
ulr
=
user
.
getUserListByDept
(
depet
,
searchParams
,
page
);
List
<
UserEntity
>
userEntities
=
ulr
.
getObjectList
(
);
if
(
searchParams
.
containsKey
(
"LIKE_realName"
)
&&
StringUtils
.
isNotBlank
(
String
.
valueOf
(
searchParams
.
get
(
"LIKE_realName"
))))
{
if
(
userEntity
.
getRealName
().
contains
(
searchParams
.
get
(
"LIKE_realName"
).
toString
()
))
{
userEntities
.
add
(
userEntity
);
if
(
CollectionUtils
.
isNotEmpty
(
departmentEntities
))
{
DepartmentEntity
dep
=
departmentEntities
.
get
(
0
);
String
deptId
=
request
.
getParameter
(
"deptId"
)
==
null
?
""
:
request
.
getParameter
(
"deptId"
);
if
(
!
Strings
.
isNullOrEmpty
(
deptId
))
{
dep
=
department
.
getDepartmentById
(
Integer
.
valueOf
(
deptId
)).
getEntity
(
);
}
}
else
{
userEntities
.
add
(
userEntity
);
}
page
=
ulr
.
getPaging
();
//填充数据
List
<
ManagerVO
>
managerVOS
=
new
ArrayList
<>();
for
(
UserEntity
ue
:
userEntities
)
{
ManagerVO
vo
=
new
ManagerVO
();
vo
.
setManagerId
(
ue
.
getId
());
vo
.
setManagerName
(
ue
.
getRealName
());
//total:累计客户; waitCount:待回访客户; callCount:回访客户; cloudSent:云迹派工数; cloudWait:云迹数据待回访数
Map
<
String
,
Object
>
map
=
iStatisticReport
.
getStatisticSummary
(
ue
.
getId
().
toString
(),
startTime
,
endTime
);
vo
.
setTotal
(
String
.
valueOf
(
map
.
get
(
"allCount"
)));
vo
.
setWaitCount
(
String
.
valueOf
(
map
.
get
(
"waitCount"
)));
vo
.
setCallCount
(
String
.
valueOf
(
map
.
get
(
"callCount"
)));
vo
.
setCloudSent
(
String
.
valueOf
(
map
.
get
(
"cloudSent"
)));
vo
.
setCloudWait
(
String
.
valueOf
(
map
.
get
(
"cloudWait"
)));
Map
<
String
,
Object
>
search
=
new
HashMap
<>(
10
);
search
.
put
(
"EQ_starUserId"
,
ue
.
getId
());
search
.
put
(
"EQ_userId"
,
userEntity
.
getId
());
UserStarListRequest
cul
=
new
UserStarListRequest
();
cul
.
setPaging
(
new
Page
(
1
));
cul
.
setSearchParams
(
search
);
UserStarListResponse
res
=
userStar
.
getUserStarList
(
cul
);
if
(
res
.
getObjectList
()
!=
null
&&
!
res
.
getObjectList
().
isEmpty
())
{
UserStarEntity
entity
=
res
.
getObjectList
().
get
(
0
);
vo
.
setStar
(
entity
.
getStar
()
==
1
?
"on"
:
"off"
);
// 获取查询条件
Map
<
String
,
Object
>
searchParams
=
Servlets
.
getParametersStartingWith
(
request
,
"search_"
);
UserListResponse
ulr
=
user
.
getUserListByDept
(
dep
,
searchParams
,
page
);
List
<
UserEntity
>
userEntities
=
ulr
.
getObjectList
();
if
(
searchParams
.
containsKey
(
"LIKE_realName"
)
&&
StringUtils
.
isNotBlank
(
String
.
valueOf
(
searchParams
.
get
(
"LIKE_realName"
))))
{
if
(
userEntity
.
getRealName
().
contains
(
searchParams
.
get
(
"LIKE_realName"
).
toString
()))
{
userEntities
.
add
(
userEntity
);
}
}
else
{
vo
.
setStar
(
"off"
);
userEntities
.
add
(
userEntity
);
}
Map
<
String
,
Object
>
managerIdMap
=
new
HashMap
<>(
10
);
managerIdMap
.
put
(
"managerId"
,
ue
.
getId
());
Integer
customers
=
customer
.
getCustomersById
(
managerIdMap
);
if
(
customers
>
0
)
{
vo
.
setIsClear
(
"1"
);
//0:无客户,1:有客户
page
=
ulr
.
getPaging
();
//填充数据
List
<
ManagerVO
>
managerVOS
=
new
ArrayList
<>();
for
(
UserEntity
ue
:
userEntities
)
{
ManagerVO
vo
=
new
ManagerVO
();
vo
.
setManagerId
(
ue
.
getId
());
vo
.
setManagerName
(
ue
.
getRealName
());
//total:累计客户; waitCount:待回访客户; callCount:回访客户; cloudSent:云迹派工数; cloudWait:云迹数据待回访数
Map
<
String
,
Object
>
map
=
iStatisticReport
.
getStatisticSummary
(
ue
.
getId
().
toString
(),
startTime
,
endTime
);
vo
.
setTotal
(
String
.
valueOf
(
map
.
get
(
"allCount"
)));
vo
.
setWaitCount
(
String
.
valueOf
(
map
.
get
(
"waitCount"
)));
vo
.
setCallCount
(
String
.
valueOf
(
map
.
get
(
"callCount"
)));
vo
.
setCloudSent
(
String
.
valueOf
(
map
.
get
(
"cloudSent"
)));
vo
.
setCloudWait
(
String
.
valueOf
(
map
.
get
(
"cloudWait"
)));
Map
<
String
,
Object
>
search
=
new
HashMap
<>(
10
);
search
.
put
(
"EQ_starUserId"
,
ue
.
getId
());
search
.
put
(
"EQ_userId"
,
userEntity
.
getId
());
UserStarListRequest
cul
=
new
UserStarListRequest
();
cul
.
setPaging
(
new
Page
(
1
));
cul
.
setSearchParams
(
search
);
UserStarListResponse
res
=
userStar
.
getUserStarList
(
cul
);
if
(
res
.
getObjectList
()
!=
null
&&
!
res
.
getObjectList
().
isEmpty
())
{
UserStarEntity
entity
=
res
.
getObjectList
().
get
(
0
);
vo
.
setStar
(
entity
.
getStar
()
==
1
?
"on"
:
"off"
);
}
else
{
vo
.
setStar
(
"off"
);
}
Map
<
String
,
Object
>
managerIdMap
=
new
HashMap
<>(
10
);
managerIdMap
.
put
(
"managerId"
,
ue
.
getId
());
Integer
customers
=
customer
.
getCustomersById
(
managerIdMap
);
if
(
customers
>
0
)
{
vo
.
setIsClear
(
"1"
);
//0:无客户,1:有客户
}
else
{
vo
.
setIsClear
(
"0"
);
//0:无客户,1:有客户
}
LOGGER
.
info
(
"ManagerVO:"
+
vo
.
toString
());
managerVOS
.
add
(
vo
);
}
if
(
isDirector
)
{
model
.
addAttribute
(
"isDirector"
,
"1"
);
//1:是主管
}
else
{
vo
.
setIsClear
(
"0"
);
//0:无客户,1:有客户
model
.
addAttribute
(
"isDirector"
,
"0"
);
//0:普通顾问
}
LOGGER
.
info
(
"ManagerVO:"
+
vo
.
toString
());
managerVOS
.
add
(
vo
);
}
if
(
isDirector
)
{
model
.
addAttribute
(
"isDirector"
,
"1"
);
//1:是主管
}
else
{
model
.
addAttribute
(
"isDirector"
,
"0"
);
//0:普通顾问
model
.
addAttribute
(
"deptId"
,
dep
.
getId
());
model
.
addAttribute
(
"list"
,
managerVOS
);
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"departments"
,
departmentEntities
);
model
.
addAttribute
(
"searchParams"
,
Servlets
.
encodeParameterStringWithPrefix
(
searchParams
,
"search_"
));
return
getAutoUrl
();
}
model
.
addAttribute
(
"deptId"
,
depet
.
getId
());
model
.
addAttribute
(
"list"
,
managerVOS
);
model
.
addAttribute
(
"page"
,
page
);
model
.
addAttribute
(
"department"
,
depet
);
model
.
addAttribute
(
"searchParams"
,
Servlets
.
encodeParameterStringWithPrefix
(
searchParams
,
"search_"
));
return
getAutoUrl
();
}
/**
* 判断该部门是否包含对于部门
*/
private
boolean
isValidDept
(
String
urlPath
,
String
dept
){
Set
<
String
>
set
=
new
HashSet
<>();
set
.
addAll
(
Arrays
.
asList
(
urlPath
.
trim
().
split
(
"/"
)));
return
set
.
contains
(
dept
);
}
}
house365-hgs-web/src/main/webapp/WEB-INF/common/layouts/topbar.jsp
View file @
55dab5de
...
...
@@ -68,9 +68,11 @@
<li>
<a tabindex="-1" href="${ctx}/statistic/cloudCusReport/">云迹数据统计表</a>
</li>
<li>
<a tabindex="-1" href="${ctx}/statistic/callBackTraceStatistic/">回访跟进统计</a>
</li>
<shiro:hasPermission name="CBTS">
<li>
<a tabindex="-1" href="${ctx}/statistic/callBackTraceStatistic/">回访跟进统计</a>
</li>
</shiro:hasPermission>
</ul>
</li>
</shiro:hasPermission>
...
...
house365-hgs-web/src/main/webapp/WEB-INF/views/statistic/pages/callBackTraceStatistic.jsp
View file @
55dab5de
...
...
@@ -21,32 +21,48 @@
<div
class=
"page-container"
>
<div
class=
"row${fluid}"
>
<form
id=
"filterForm"
name=
"filterForm"
class=
"form-inline filterForm"
action=
"${ctx}/statistic/callBackTraceStatistic"
method=
"get"
>
<div
style=
"margin-top:10px;"
>
数据日期:
<input
type=
"text"
name=
"startTime"
id=
"startTime"
value=
"${startTime}"
style=
"width: 120px;"
class=
"m-wrap small mydate span2"
placeholder=
"起始时间"
>
到
<input
type=
"text"
name=
"endTime"
id=
"endTime"
value=
"${endTime}"
style=
"width: 120px;"
class=
"m-wrap small mydate span2"
placeholder=
"截止时间"
>
<input
type=
"text"
placeholder=
"搜索置业顾问"
name=
"search_LIKE_realName"
value=
"${param['search_LIKE_realName']}"
>
<div
class=
"inputSearch__btn"
onclick=
"$('#filterForm').submit();"
style=
"display: inline-block; position: relative; top: 9px;left: 5px;"
></div>
</div>
<input
type=
"hidden"
name=
"deptId"
id=
"deptId"
value=
"${deptId}"
>
<input
type=
"hidden"
name=
"pageSize"
id=
"pageSize"
value=
"${param['pageSize']}"
>
</form>
<c:choose>
<c:when
test=
"${department== null}"
>
<div
style=
"width: 90%;height: 40%;text-align: center;font-size: larger;margin-top: 30px;"
>
名下暂无安家顾问数据
</div>
<c:when
test=
"${departments!= null && fn:length(departments) == 0}"
>
<div
style=
"width: 90%;height: 40%;text-align: center;font-size: larger;margin-top: 30px;"
>
名下暂无置业顾问数据
</div>
</c:when>
<c:otherwise>
<form
id=
"filterForm"
name=
"filterForm"
class=
"form-inline filterForm"
action=
"${ctx}/statistic/callBackTraceStatistic"
method=
"get"
>
<c:forEach
items=
"${departments}"
var=
"dept"
>
<li
<
c:if
test=
"${dept.id == deptId}"
>
class="active"
</c:if>
>
<c:choose>
<c:when
test=
"${dept.id == deptId}"
>
<a
href=
"#"
>
${dept.name}
</a>
</c:when>
<c:when
test=
"${dept.id != deptId}"
>
<a
href=
"${ctx}/statistic/callBackTraceStatistic?deptId=${dept.id}&pageSize=${param['pageSize']}"
>
${dept.name}
</a>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</li>
</c:forEach>
<div
style=
"margin-top:10px;"
>
数据日期:
<input
type=
"text"
name=
"startTime"
id=
"startTime"
value=
"${startTime}"
style=
"width: 120px;"
class=
"m-wrap small mydate span2"
placeholder=
"起始时间"
>
到
<input
type=
"text"
name=
"endTime"
id=
"endTime"
value=
"${endTime}"
style=
"width: 120px;"
class=
"m-wrap small mydate span2"
placeholder=
"截止时间"
>
<input
type=
"text"
placeholder=
"搜索置业顾问"
name=
"search_LIKE_realName"
value=
"${param['search_LIKE_realName']}"
>
<div
class=
"inputSearch__btn"
onclick=
"$('#filterForm').submit();"
style=
"display: inline-block; position: relative; top: 9px;left: 5px;"
></div>
</div>
<input
type=
"hidden"
name=
"deptId"
id=
"deptId"
value=
"${deptId}"
>
<input
type=
"hidden"
name=
"pageSize"
id=
"pageSize"
value=
"${param['pageSize']}"
>
</form>
<c:choose>
<c:when
test=
"${list!= null && fn:length(list) == 0}"
>
<div
style=
"width: 90%;height: 40%;text-align: center;font-size: larger;margin-top: 30px;"
>
...
...
@@ -56,7 +72,6 @@
<c:otherwise>
<table
class=
"table table-advance table-hover"
>
<tbody>
<c:forEach
items=
"${list}"
var=
"user"
varStatus=
"n"
>
<c:choose>
<c:when
test=
"${n.index % 2!=0 && user.star=='off'}"
>
...
...
@@ -130,7 +145,6 @@
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div
class=
"row${fluid}"
>
...
...
@@ -138,11 +152,9 @@
</div>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
</div>
</div>
<input
type=
"hidden"
value=
"${queryUser}"
name=
"queryUser"
id=
"queryUser"
>
...
...
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