From 3d9fc7426a89b65114f6f0bd9fa7ffc66fdfa609 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 23 Aug 2023 17:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java | 2 ++ .../com/ningdatech/syndataapi/scheduler/task/SynDataTask.java | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/syn-data-task/src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java b/syn-data-task/src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java index f4d4f1c..7d274a9 100644 --- a/syn-data-task/src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java +++ b/syn-data-task/src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java @@ -4,6 +4,7 @@ package com.ningdatech.syndataapi; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; @@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableScheduling @EnableTransactionManagement @EnableAspectJAutoProxy(exposeProxy = true) +@ComponentScan(basePackages = {"com.ningdatech.syndataapi.scheduler"}) public class SynDataTaskApp { protected static final String MAPPER_PACKAGES = "com.ningdatech.syndataapi.**.mapper"; diff --git a/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java b/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java index ed69447..d8afca4 100644 --- a/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java +++ b/syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java @@ -53,7 +53,6 @@ public class SynDataTask { " \"baseProjType\":\"01\",\n" + " \"baseConstructionType\":\"01\",\n" + " \"baseProjSetProg\":\"05\",\n" + - " \"isEffective\":\"02\",\n" + " \"baseProvManDeprt\":\"遂昌县大数据和金融发展中心\",\n" + " \"baseProvManDeprtDing\":\"GO_9a7dce7fbaf54787998fa004f1b7c0e1\",\n" + " \"baseManDeprt\":\"遂昌县大数据和金融发展中心\",\n" + @@ -141,9 +140,12 @@ public class SynDataTask { "}"; private static final String PROJECT_CIMPLEMENT_TEST_DATA = "{\n" + + " \"baseBidCode\":\"33112322013096900000—01\",\n" + + " \"baseBidName\":\"标段一\",\n" + " \"baseProjId\":\"33112322013096900000\",\n" + " \"baseProjName\":\"遂昌县大数据和金融发展中心天工系统\",\n" + " \"baseDevelopCode\":\"否\",\n" + + " \"baseProjSysCode\":\"\",\n" + " \"baseInitialOpinionFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + " \"baseInforLevelFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + " \"basePasswAssessFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + @@ -164,9 +166,12 @@ public class SynDataTask { "}"; private static final String PROJECT_MIMPLEMENT_TEST_DATA = "{\n" + + " \"baseBidCode\":\"33112322013096900000—01\",\n" + + " \"baseBidName\":\"标段一\",\n" + " \"baseProjId\":\"33112322013096900000\",\n" + " \"baseProjName\":\"遂昌县大数据和金融发展中心天工系统\",\n" + " \"baseDevelopCode\":\"否\",\n" + + " \"baseProjSysCode\":\"\",\n" + " \"baseInforLevelFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + " \"basePasswAssessFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + " \"baseThirdAcceptFile\":\"http://60.188.225.145/pm/file/download?fileId=951\",\n" + @@ -188,7 +193,7 @@ public class SynDataTask { * 定时同步前置机数据 每天3点开始执行一次 * */ - @Scheduled(cron = "0 24 14 * * ?") + @Scheduled(cron = "0 0 3 * * ?") public void doTask() throws UnknownHostException { if (flag && HOST.equals(InetAddress.getLocalHost().getHostName())) { log.info("数据同步任务开始");