Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
feo-jobs
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
feo-jobs
Commits
629a12db
Commit
629a12db
authored
May 21, 2021
by
吴泽佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除多余代码
parent
3ccacd2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
OrgSyncByWxcpJob.java
...main/java/com/tanpu/feo/feojob/jobs/OrgSyncByWxcpJob.java
+4
-7
No files found.
src/main/java/com/tanpu/feo/feojob/jobs/OrgSyncByWxcpJob.java
View file @
629a12db
...
@@ -18,12 +18,10 @@ import me.chanjar.weixin.cp.bean.Gender;
...
@@ -18,12 +18,10 @@ import me.chanjar.weixin.cp.bean.Gender;
import
me.chanjar.weixin.cp.bean.WxCpDepart
;
import
me.chanjar.weixin.cp.bean.WxCpDepart
;
import
me.chanjar.weixin.cp.bean.WxCpUser
;
import
me.chanjar.weixin.cp.bean.WxCpUser
;
import
me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl
;
import
me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -64,7 +62,7 @@ public class OrgSyncByWxcpJob {
...
@@ -64,7 +62,7 @@ public class OrgSyncByWxcpJob {
try
{
try
{
orgSyncByWxcp
(
"Y"
);
orgSyncByWxcp
(
"Y"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"====== 异常结束执行OrgSyncByWxcpJob,错误:{}======="
,
e
);
log
.
error
(
"====== 异常结束执行OrgSyncByWxcpJob,错误:{}======="
,
e
.
getMessage
()
);
}
}
log
.
info
(
"====== 结束执行OrgSyncByWxcpJob ======"
);
log
.
info
(
"====== 结束执行OrgSyncByWxcpJob ======"
);
}
}
...
@@ -86,8 +84,8 @@ public class OrgSyncByWxcpJob {
...
@@ -86,8 +84,8 @@ public class OrgSyncByWxcpJob {
//3 从企业微信获取组织信息及员工信息
//3 从企业微信获取组织信息及员工信息
WxCpDefaultConfigImpl
wxCpDefaultConfig
=
JSONUtil
.
toBean
(
orgExt
.
getJsonWxcpKey
(),
WxCpDefaultConfigImpl
.
class
);
WxCpDefaultConfigImpl
wxCpDefaultConfig
=
JSONUtil
.
toBean
(
orgExt
.
getJsonWxcpKey
(),
WxCpDefaultConfigImpl
.
class
);
List
<
WxCpDepart
>
wxCpDepartList
=
null
;
// 机构信息
List
<
WxCpDepart
>
wxCpDepartList
;
// 机构信息
List
<
WxCpDepartDto
>
wxCpDepartDtoList
=
null
;
//自定义的 部门信息
List
<
WxCpDepartDto
>
wxCpDepartDtoList
;
//自定义的 部门信息
try
{
try
{
wxCpDepartList
=
getWxCpDepartList
(
wxCpDefaultConfig
);
wxCpDepartList
=
getWxCpDepartList
(
wxCpDefaultConfig
);
wxCpDepartDtoList
=
getWxCpUserList
(
wxCpDepartList
,
wxCpDefaultConfig
);
wxCpDepartDtoList
=
getWxCpUserList
(
wxCpDepartList
,
wxCpDefaultConfig
);
...
@@ -133,7 +131,6 @@ public class OrgSyncByWxcpJob {
...
@@ -133,7 +131,6 @@ public class OrgSyncByWxcpJob {
ifaAssetsService
.
insertIfaAssets
(
ifaAssets
);
ifaAssetsService
.
insertIfaAssets
(
ifaAssets
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"======往ifaAssets写数据错误->机构:{} -> 错误信息-> {}======"
,
orgId
,
e
.
getMessage
());
log
.
info
(
"======往ifaAssets写数据错误->机构:{} -> 错误信息-> {}======"
,
orgId
,
e
.
getMessage
());
continue
;
}
}
}
}
//7 讲最新的md5值 存至 orgExt 表中
//7 讲最新的md5值 存至 orgExt 表中
...
@@ -520,7 +517,7 @@ public class OrgSyncByWxcpJob {
...
@@ -520,7 +517,7 @@ public class OrgSyncByWxcpJob {
private
List
<
WxCpDepart
>
getWxCpDepartList
(
WxCpDefaultConfigImpl
wxCpDefaultConfig
)
throws
Exception
{
private
List
<
WxCpDepart
>
getWxCpDepartList
(
WxCpDefaultConfigImpl
wxCpDefaultConfig
)
throws
Exception
{
WxCpService
cpService
=
new
WxCpServiceImpl
();
WxCpService
cpService
=
new
WxCpServiceImpl
();
cpService
.
setWxCpConfigStorage
(
wxCpDefaultConfig
);
cpService
.
setWxCpConfigStorage
(
wxCpDefaultConfig
);
List
<
WxCpDepart
>
wxCpDeparts
=
null
;
List
<
WxCpDepart
>
wxCpDeparts
;
try
{
try
{
wxCpDeparts
=
cpService
.
getDepartmentService
().
list
(
null
);
wxCpDeparts
=
cpService
.
getDepartmentService
().
list
(
null
);
}
catch
(
WxErrorException
e
)
{
}
catch
(
WxErrorException
e
)
{
...
...
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