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
d5782b8a
Commit
d5782b8a
authored
Mar 13, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8d8e079f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
24 deletions
+39
-24
StaffDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
+10
-0
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+3
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+26
-23
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
View file @
d5782b8a
...
...
@@ -53,6 +53,8 @@ public class StaffDTO implements Serializable{
private
Integer
syncPostionFlag
;
private
Integer
superManagerFlag
;
private
Boolean
weixinPush
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -251,5 +253,13 @@ public class StaffDTO implements Serializable{
this
.
superManagerFlag
=
superManagerFlag
;
}
public
Boolean
getWeixinPush
()
{
return
weixinPush
;
}
public
void
setWeixinPush
(
Boolean
weixinPush
)
{
this
.
weixinPush
=
weixinPush
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
d5782b8a
...
...
@@ -262,7 +262,9 @@ public class MessageApiServiceImpl implements MessageApiService {
}
departmentIds
=
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
);
}
staffApiService
.
staffEdit
(
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
),
departmentIds
);
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
staffDTO
.
setWeixinPush
(
true
);
staffApiService
.
staffEdit
(
staffDTO
,
departmentIds
);
}
else
{
this
.
addUser
(
qywxCallBackDTO
,
staff
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
d5782b8a
...
...
@@ -424,30 +424,33 @@ 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
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
Boolean
weixinPush
=
staffDTO
.
getWeixinPush
();
if
(!
weixinPush
){
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
());
String
[]
departmentIdArr
=
departmentIds
.
split
(
","
);
Integer
[]
wxDepartmentIdArrIntegers
=
new
Integer
[
departmentIdArr
.
length
];
int
index
=
0
;
for
(
String
string
:
departmentIdArr
)
{
TabHaobanDepartment
tabs
=
departmentService
.
selectById
(
string
);
wxDepartmentIdArrIntegers
[
index
]
=
Integer
.
parseInt
(
tabs
.
getWxDepartmentId
());
index
++;
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staffDTO
.
getSex
().
toString
());
userDTO
.
setMobile
(
staffDTO
.
getPhoneNumber
());
userDTO
.
setName
(
staffDTO
.
getStaffName
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
JSONResponse
jp
=
qywxUserApiService
.
updateWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
}
userDTO
.
setDepartment
(
wxDepartmentIdArrIntegers
);
userDTO
.
setGender
(
staffDTO
.
getSex
().
toString
());
userDTO
.
setMobile
(
staffDTO
.
getPhoneNumber
());
userDTO
.
setName
(
staffDTO
.
getStaffName
());
userDTO
.
setUserid
(
oldStaff
.
getWxUserId
());
userDTO
.
setPosition
(
staffDTO
.
getPostion
());
userDTO
.
setExternal_position
(
staffDTO
.
getExtendPostion
());
JSONResponse
jp
=
qywxUserApiService
.
updateWorkWxUser
(
userDTO
,
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
());
}
}
}
...
...
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