Преглед изворни кода

数据同步定时任务修改

tags/24080901
CMM пре 1 година
родитељ
комит
3d9fc7426a
2 измењених фајлова са 9 додато и 2 уклоњено
  1. +2
    -0
      syn-data-task/src/main/java/com/ningdatech/syndataapi/SynDataTaskApp.java
  2. +7
    -2
      syn-data-task/src/main/java/com/ningdatech/syndataapi/scheduler/task/SynDataTask.java

+ 2
- 0
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";


+ 7
- 2
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("数据同步任务开始");


Loading…
Откажи
Сачувај