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
f1d1525c
Commit
f1d1525c
authored
Jun 04, 2021
by
huagnxiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组织架构删除人员进行添加平台管理用户的限制提示代码
parent
1a47716a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
2 deletions
+69
-2
UserVo.java
...hgs-beans/src/main/java/com/house365/beans/vo/UserVo.java
+12
-0
UserController.java
...main/java/com/house365/web/controller/UserController.java
+3
-0
list.jsp
...hgs-web/src/main/webapp/WEB-INF/views/user/pages/list.jsp
+5
-2
ICustomer.java
...ain/java/com/house365/ws/interfaces/server/ICustomer.java
+2
-0
CustomerMapper.java
.../main/java/com/house365/ws/dao/mapper/CustomerMapper.java
+2
-0
CustomerImpl.java
...in/java/com/house365/ws/interfaces/impl/CustomerImpl.java
+11
-0
CustomerMapper.xml
...src/main/resources/development/mybatis/CustomerMapper.xml
+12
-0
CustomerMapper.xml
.../src/main/resources/production/mybatis/CustomerMapper.xml
+11
-0
CustomerMapper.xml
...hgs-ws/src/main/resources/test/mybatis/CustomerMapper.xml
+11
-0
No files found.
house365-hgs-beans/src/main/java/com/house365/beans/vo/UserVo.java
View file @
f1d1525c
...
...
@@ -56,6 +56,18 @@ public class UserVo {
* 名下是否有客户
*/
private
boolean
hasCustomers
=
false
;
/**
* 针对该用户在平台管理中是否客户
*/
private
boolean
hasCustomersInPlatform
=
false
;
public
boolean
isHasCustomersInPlatform
()
{
return
hasCustomersInPlatform
;
}
public
void
setHasCustomersInPlatform
(
boolean
hasCustomersInPlatform
)
{
this
.
hasCustomersInPlatform
=
hasCustomersInPlatform
;
}
public
boolean
isHasCustomers
()
{
return
hasCustomers
;
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/UserController.java
View file @
f1d1525c
...
...
@@ -614,6 +614,9 @@ public class UserController extends BaseController {
if
(
count
>
0
)
{
userVo
.
setHasCustomers
(
true
);
}
//针对该用户在平台管理中是否有客户进行判断设置值
int
countInfo
=
customer
.
queryCountById
(
userEntity
.
getId
());
userVo
.
setHasCustomersInPlatform
(
countInfo
>
0
);
lstUserVo
.
add
(
userVo
);
}
}
...
...
house365-hgs-web/src/main/webapp/WEB-INF/views/user/pages/list.jsp
View file @
f1d1525c
...
...
@@ -264,7 +264,7 @@
<i
title=
"删除"
class=
"icon-minus pointer icon-large"
onclick=
"deleteById('${user.entity.id}', ${user.hasCustomers})"
>
</i>
onclick=
"deleteById('${user.entity.id}', ${user.hasCustomers}
,${user.hasCustomersInPlatform}
)"
>
</i>
<c:if
test=
"${user.entity.enabled}"
>
<i
title=
"锁定"
...
...
@@ -441,7 +441,7 @@
}
}
var
deleteById
=
function
(
selectedId
,
hasCustomers
)
{
var
deleteById
=
function
(
selectedId
,
hasCustomers
,
hasCustomersInPlatform
)
{
var
localHasCustomers
=
false
;
/*
id为空则是多选 判断是否为空
...
...
@@ -476,6 +476,9 @@
if
(
hasCustomers
||
localHasCustomers
)
{
House365Util
.
createModal
(
"删除员工"
,
"员工名下还有客户,请转移交接给其他置业顾问后再删除。"
,
function
()
{
});
}
else
if
(
hasCustomersInPlatform
){
House365Util
.
createModal
(
"删除员工"
,
"员工名下还有客户,请转移交接给其他平台人员后再删除。"
,
function
()
{
});
}
else
{
//获取删除用户的绑定楼盘信息
$
.
ajax
({
...
...
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/ICustomer.java
View file @
f1d1525c
...
...
@@ -271,4 +271,6 @@ public interface ICustomer extends IService {
HResult
deleteIdList
(
List
<
Integer
>
idList
,
int
userId
,
String
userName
);
void
batchTransferCreator
(
String
[]
customerIds
,
String
[]
userIds
,
UserEntity
userEntity
,
int
type
)
throws
Exception
;
int
queryCountById
(
Integer
userId
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/CustomerMapper.java
View file @
f1d1525c
...
...
@@ -97,4 +97,6 @@ public interface CustomerMapper {
void
updatePtCustomerStar
(
Map
<
String
,
Object
>
map
);
void
updatePtCustomerCreater
(
Map
<
String
,
Object
>
map
);
int
queryCountById
(
Integer
userId
);
}
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/CustomerImpl.java
View file @
f1d1525c
...
...
@@ -3129,6 +3129,17 @@ public class CustomerImpl implements ICustomer {
return
result
;
}
/**
* 根据用户id查询该用户在平台管理的数量
*
* @param userId
* @return
*/
@Override
public
int
queryCountById
(
Integer
userId
){
return
customerMapper
.
queryCountById
(
userId
);
}
@Override
@Transactional
public
void
batchTransferCreator
(
String
[]
customerIds
,
String
[]
userIds
,
UserEntity
userEntity
,
int
type
)
throws
Exception
{
...
...
house365-hgs-ws/src/main/resources/development/mybatis/CustomerMapper.xml
View file @
f1d1525c
...
...
@@ -872,4 +872,15 @@
#{id}
</foreach>
</update>
<select
id=
"queryCountById"
resultType=
"Integer"
>
SELECT
count(*)
FROM customer
where create_source='PT'
and is_delete=0
and is_show_in_plat=0
and customer_source_type=8
and creater=#{userId}
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/production/mybatis/CustomerMapper.xml
View file @
f1d1525c
...
...
@@ -865,4 +865,14 @@
#{id}
</foreach>
</update>
<select
id=
"queryCountById"
resultType=
"Integer"
>
SELECT
count(*)
FROM customer
where create_source='PT'
and is_delete=0
and is_show_in_plat=0
and customer_source_type=8
and creater=#{userId}
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/test/mybatis/CustomerMapper.xml
View file @
f1d1525c
...
...
@@ -858,4 +858,14 @@
#{id}
</foreach>
</update>
<select
id=
"queryCountById"
resultType=
"Integer"
>
SELECT
count(*)
FROM customer
where create_source='PT'
and is_delete=0
and is_show_in_plat=0
and customer_source_type=8
and creater=#{userId}
</select>
</mapper>
\ 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