|
|
@@ -67,7 +67,7 @@ public class SynProjectCoreBizTask { |
|
|
|
* 定时同步前置机数据 每天1点开始执行一次 不按照单位 |
|
|
|
* |
|
|
|
*/ |
|
|
|
@Scheduled(cron = "0 0 2 * * ?") |
|
|
|
// @Scheduled(cron = "0 0 2 * * ?") |
|
|
|
public void doTask() throws UnknownHostException { |
|
|
|
if (!HOST.equals(InetAddress.getLocalHost().getHostName())) { |
|
|
|
log.info("定时器没开启或者host不对! {}:{}", |
|
|
@@ -79,7 +79,13 @@ public class SynProjectCoreBizTask { |
|
|
|
StopWatch stopWatch = new StopWatch(); |
|
|
|
stopWatch.start(); |
|
|
|
|
|
|
|
syncCoreBiz(); |
|
|
|
List<DingOrganization> orgs = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) |
|
|
|
.in(DingOrganization::getTypeCode, Lists.newArrayList(DingOrganizationContant.UNIT_TYPE |
|
|
|
, DingOrganizationContant.GOV_TEMPORARY))); |
|
|
|
|
|
|
|
log.info("总共需要同步 orgs size :{}",orgs.size()); |
|
|
|
|
|
|
|
syncCoreBiz(orgs); |
|
|
|
stopWatch.stop(); |
|
|
|
log.info("同步项目核心业务结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|