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
QianQiXiang
haoban-manage3.0
Commits
c5db5d23
Commit
c5db5d23
authored
Jul 13, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
离职基础优化
parent
7cf75421
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
HandoverServiceImpl.java
...oban/manage/service/service/impl/HandoverServiceImpl.java
+22
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/HandoverServiceImpl.java
View file @
c5db5d23
...
@@ -7,6 +7,8 @@ import com.gic.haoban.base.api.common.BasePageInfo;
...
@@ -7,6 +7,8 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverExternalDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
...
@@ -16,6 +18,7 @@ import com.gic.haoban.manage.service.service.SecretSettingService;
...
@@ -16,6 +18,7 @@ import com.gic.haoban.manage.service.service.SecretSettingService;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
...
@@ -83,8 +86,19 @@ public class HandoverServiceImpl implements HandoverService {
...
@@ -83,8 +86,19 @@ public class HandoverServiceImpl implements HandoverService {
delHandoverStaff
(
wxEnterpriseId
,
null
);
delHandoverStaff
(
wxEnterpriseId
,
null
);
return
false
;
return
false
;
}
}
SecretSettingDTO
secretSetting
=
secretSettingService
.
getSecretSetting
(
wxEnterprise
.
getWxEnterpriseId
(),
SecretTypeEnum
.
HAOBAN_HELP
.
getVal
());
if
(
null
==
secretSetting
||
secretSetting
.
getCheckFlag
()
==
0
)
{
logger
.
info
(
"没有配置secret:{}"
,
JSONObject
.
toJSONString
(
wxEnterprise
));
return
false
;
}
Map
<
String
,
List
<
QywxUnassignedInfoDTO
>>
handoverUserMap
=
infoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
dto
->
dto
.
getHandoverUserid
()));
Map
<
String
,
List
<
QywxUnassignedInfoDTO
>>
handoverUserMap
=
infoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
dto
->
dto
.
getHandoverUserid
()));
handoverUserMap
.
forEach
((
userId
,
list
)
->
{
handoverUserMap
.
forEach
((
userId
,
list
)
->
{
boolean
checkFlag
=
checkStaffOver
(
secretSetting
,
userId
,
wxEnterprise
.
getCorpid
());
if
(!
checkFlag
)
{
logger
.
info
(
"该用户存在,不需要离职基础:{},{}"
,
userId
,
wxEnterpriseId
);
return
;
}
TabHandoverStaff
handoverStaff
=
getHandoverStaff
(
wxEnterpriseId
,
userId
);
TabHandoverStaff
handoverStaff
=
getHandoverStaff
(
wxEnterpriseId
,
userId
);
if
(
null
==
handoverStaff
)
{
if
(
null
==
handoverStaff
)
{
return
;
return
;
...
@@ -129,6 +143,14 @@ public class HandoverServiceImpl implements HandoverService {
...
@@ -129,6 +143,14 @@ public class HandoverServiceImpl implements HandoverService {
return
false
;
return
false
;
}
}
private
boolean
checkStaffOver
(
SecretSettingDTO
secretSetting
,
String
userId
,
String
corpId
)
{
UserDTO
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpId
,
secretSetting
.
getSecretVal
(),
userId
);
if
(
null
==
user
)
{
return
false
;
}
return
true
;
}
/**
/**
* 删除企业下的数据
* 删除企业下的数据
*
*
...
...
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