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
b398bded
Commit
b398bded
authored
May 29, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e3429767
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
QywxGroupSyncOperation.java
...ic/haoban/manage/service/task/QywxGroupSyncOperation.java
+10
-4
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/QywxGroupSyncOperation.java
View file @
b398bded
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.task;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
...
...
@@ -104,10 +105,12 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
return
;
}
TabHaobanDepartment
department
=
departmentService
.
getByWxId
(
dealParamMqDTO
.
getData
(),
dataPre
.
getWxEnterpriseId
());
DepartmentDTO
dto
=
new
DepartmentDTO
();
if
(
department
!=
null
)
{
logger
.
info
(
"已经同步过了:{}"
,
dataPre
.
getDataId
());
dealException
(
dealParamMqDTO
.
getTaskId
(),
dealParamMqDTO
.
getData
(),
dataPre
.
getEnterpriseId
(),
dealParamMqDTO
.
getData
()
+
":该部门存在"
);
return
;
dto
=
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
department
);
// dealException(dealParamMqDTO.getTaskId(), dealParamMqDTO.getData(), dataPre.getEnterpriseId(), dealParamMqDTO.getData() + ":该部门存在");
}
logger
.
info
(
"分组是否存在:{}"
,
JSON
.
toJSONString
(
department
));
...
...
@@ -116,7 +119,6 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
boolean
resultFlag
=
true
;
try
{
DepartmentDTO
dto
=
new
DepartmentDTO
();
dto
.
setDepartmentName
(
qywxDepart
.
getName
());
dto
.
setLevel
(
parent
.
getLevel
()
+
1
);
dto
.
setWxEnterpriseId
(
dataPre
.
getWxEnterpriseId
());
...
...
@@ -132,7 +134,11 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
dto
.
setSort
(
qywxDepart
.
getOrder
());
dto
.
setIsStore
(
0
);
this
.
departmentService
.
add
(
dto
);
if
(
dto
.
getDepartmentId
()==
null
)
{
this
.
departmentService
.
add
(
dto
);
}
else
{
this
.
departmentService
.
edit
(
dto
);
}
}
catch
(
Exception
e
)
{
resultFlag
=
false
;
reason
=
"处理异常"
;
...
...
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