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
35f55ef9
Commit
35f55ef9
authored
Apr 16, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步通讯录 微信同步gic
parent
adc8e94b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
DepartmentServiceImpl.java
...an/manage/service/service/impl/DepartmentServiceImpl.java
+2
-2
QywxGroupSyncOperation.java
...ic/haoban/manage/service/task/QywxGroupSyncOperation.java
+14
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/DepartmentServiceImpl.java
View file @
35f55ef9
...
...
@@ -53,8 +53,8 @@ public class DepartmentServiceImpl implements DepartmentService {
throw
new
RuntimeException
(
"父部门不存在"
);
}
tab
.
setChainId
(
pDepartment
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
pDepartment
.
getDepartmentId
());
tab
.
setChainName
(
pDepartment
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
tab
.
getDepartmentName
());
tab
.
setLevel
(
pDepartment
.
getLevel
()
+
1
);
tab
.
setChainName
(
pDepartment
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
pDepartment
.
getDepartmentName
());
tab
.
setLevel
(
pDepartment
.
getLevel
()
+
1
);
}
Integer
isStore
=
department
.
getIsStore
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/QywxGroupSyncOperation.java
View file @
35f55ef9
...
...
@@ -90,6 +90,14 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
logger
.
info
(
"处理企业微信部门:{}"
,
JSONObject
.
toJSONString
(
dealParamMqDTO
));
String
reason
=
""
;
TabHaobanDepartment
parent
=
this
.
departmentService
.
getByWxId
(
dataPre
.
getpDataId
(),
dataPre
.
getWxEnterpriseId
());
if
(
parent
==
null
&&
dataPre
.
getpDataId
().
equals
(
0
))
{
parent
=
new
TabHaobanDepartment
();
parent
.
setLevel
(
0
);
parent
.
setDepartmentId
(
"0"
);
parent
.
setChainId
(
"0"
);
parent
.
setChainName
(
"0"
);
}
if
(
parent
==
null
)
{
logger
.
info
(
"不存在该父部门:c:{},p:{}"
,
dataPre
.
getDataId
(),
dataPre
.
getpDataId
());
dealException
(
dealParamMqDTO
.
getTaskId
(),
dealParamMqDTO
.
getData
(),
dataPre
.
getEnterpriseId
(),
"父部们不存在"
);
...
...
@@ -114,6 +122,10 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
dto
.
setWxEnterpriseId
(
dataPre
.
getWxEnterpriseId
());
dto
.
setWxDepartmentId
(
qywxDepart
.
getId
()
+
""
);
dto
.
setParentDepartmentId
(
parent
.
getDepartmentId
());
dto
.
setChainId
(
parent
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
parent
.
getDepartmentId
());
dto
.
setChainName
(
parent
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
parent
.
getDepartmentName
());
dto
.
setSort
(
qywxDepart
.
getOrder
());
dto
.
setIsStore
(
0
);
this
.
departmentService
.
add
(
dto
);
...
...
@@ -136,7 +148,9 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
public
void
dealException
(
String
taskId
,
String
dataId
,
String
enterpriseId
,
String
reason
)
{
logger
.
info
(
"部门同步异常:{},{}"
,
taskId
,
dataId
);
preDealService
.
updateStatusByDataId
(
taskId
,
dataId
,
PreDealStatusEnum
.
exception
.
getVal
(),
reason
);
logger
.
info
(
"递归调用更新状态start==:{},d:{}"
,
taskId
,
dataId
);
changeChildStatus
(
taskId
,
dataId
,
enterpriseId
,
reason
);
logger
.
info
(
"递归调用更新状态end==:{},d:{}"
,
taskId
,
dataId
);
checkDepartmentTask
(
taskId
);
}
...
...
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