Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
d9db4fd4
Commit
d9db4fd4
authored
Feb 23, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7e3463d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+40
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
d9db4fd4
...
...
@@ -174,12 +174,27 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
related
!=
null
)
{
List
<
TabHaobanStaffDepartmentRelated
>
relatedList
=
staffDepartmentRelatedService
.
listStaffDepartmentByStaffId
(
related
.
getStaffId
());
//只在当前门店
if
(
relatedList
.
size
()
<=
1
)
{
//微信接口删除
if
(
relatedList
.
size
()
==
1
)
{
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
JSONResponse
jp
=
qywxUserApiService
.
deleteWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
staff
.
getWxUserId
());
}
}
staffDepartmentRelatedService
.
del
(
related
);
//走修改流程
}
else
{
String
departmentIds
=
""
;
for
(
TabHaobanStaffDepartmentRelated
tabHaobanStaffDepartmentRelated
:
relatedList
)
{
if
(!
staffDepartmentStaffRelatedId
.
equals
(
tabHaobanStaffDepartmentRelated
.
getStaffDepartmentRelatedId
()))
{
departmentIds
+=
tabHaobanStaffDepartmentRelated
.
getDepartmentId
()
+
","
;
}
}
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
TabHaobanStaff
staff
=
staffService
.
selectById
(
relatedList
.
get
(
0
).
getStaffId
());
staffEdit
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
departmentIds
);
}
}
...
...
@@ -263,6 +278,28 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
oldStaff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
oldStaff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
userDTO
=
new
UserDTO
();
userDTO
.
setCorpid
(
enterpriseDTO
.
getCorpid
());
List
<
Integer
>
wxDepartmentIdArrIntegers
=
new
ArrayList
<
Integer
>();
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
.
add
(
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
()));
}
userDTO
.
setDepartment
((
Integer
[])
wxDepartmentIdArrIntegers
.
toArray
());
userDTO
.
setGender
(
"女"
);
userDTO
.
setMobile
(
staffDTO
.
getPhoneNumber
());
userDTO
.
setName
(
staffDTO
.
getStaffName
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
JSONResponse
jp
=
qywxUserApiService
.
updateWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
}
}
}
@Override
...
...
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