|
|
@ -8,6 +8,7 @@ import com.xydl.cac.service.DataService;
|
|
|
|
import com.xydl.cac.service.I2syncService;
|
|
|
|
import com.xydl.cac.service.I2syncService;
|
|
|
|
import com.xydl.cac.transform.I2DataTransformer;
|
|
|
|
import com.xydl.cac.transform.I2DataTransformer;
|
|
|
|
import com.xydl.cac.util.DateUtil;
|
|
|
|
import com.xydl.cac.util.DateUtil;
|
|
|
|
|
|
|
|
import com.xydl.cac.util.DingTalkPushUtil;
|
|
|
|
import com.xydl.cac.util.JSONUtil;
|
|
|
|
import com.xydl.cac.util.JSONUtil;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
@ -32,6 +33,8 @@ public class I2syncTask {
|
|
|
|
DataService dataService;
|
|
|
|
DataService dataService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
I2DataTransformer dataTransformer;
|
|
|
|
I2DataTransformer dataTransformer;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
DingTalkPushUtil dingTalkPushUtil;
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(initialDelay = 60 * 1000, fixedDelay = 30 * 60 * 1000)
|
|
|
|
@Scheduled(initialDelay = 60 * 1000, fixedDelay = 30 * 60 * 1000)
|
|
|
|
public void syncAll() {
|
|
|
|
public void syncAll() {
|
|
|
@ -45,6 +48,8 @@ public class I2syncTask {
|
|
|
|
log.info("I2syncTask.syncAll 结束.");
|
|
|
|
log.info("I2syncTask.syncAll 结束.");
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
log.error("I2syncTask.syncAll error.", e);
|
|
|
|
log.error("I2syncTask.syncAll error.", e);
|
|
|
|
|
|
|
|
String str = "i2同步导出数据异常: " + e.getMessage();
|
|
|
|
|
|
|
|
dingTalkPushUtil.pushText(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|