|
@@ -4,23 +4,22 @@ import com.qhtx.eta.common.eunms.DataSourceType;
|
|
import com.qhtx.eta.domain.config.ScheduleConfig;
|
|
import com.qhtx.eta.domain.config.ScheduleConfig;
|
|
import com.qhtx.eta.domain.config.ScheduleTaskConfig;
|
|
import com.qhtx.eta.domain.config.ScheduleTaskConfig;
|
|
import com.qhtx.eta.domain.convert.ClassifyMappingDTOConverter;
|
|
import com.qhtx.eta.domain.convert.ClassifyMappingDTOConverter;
|
|
-import com.qhtx.eta.domain.entity.ClassifyMappingDTO;
|
|
|
|
-import com.qhtx.eta.domain.entity.QuotaDataUpdateBO;
|
|
|
|
-import com.qhtx.eta.domain.entity.QuotaInfoDTO;
|
|
|
|
|
|
+import com.qhtx.eta.domain.entity.*;
|
|
import com.qhtx.eta.domain.enums.ETADataStatus;
|
|
import com.qhtx.eta.domain.enums.ETADataStatus;
|
|
import com.qhtx.eta.domain.enums.ETAInterfaceEnum;
|
|
import com.qhtx.eta.domain.enums.ETAInterfaceEnum;
|
|
import com.qhtx.eta.domain.enums.ETATaskEnum;
|
|
import com.qhtx.eta.domain.enums.ETATaskEnum;
|
|
import com.qhtx.eta.domain.enums.ExcludedQuotaSource;
|
|
import com.qhtx.eta.domain.enums.ExcludedQuotaSource;
|
|
import com.qhtx.eta.domain.service.DWIndexFrameService;
|
|
import com.qhtx.eta.domain.service.DWIndexFrameService;
|
|
import com.qhtx.eta.domain.service.ETAClassifyService;
|
|
import com.qhtx.eta.domain.service.ETAClassifyService;
|
|
|
|
+import com.qhtx.eta.domain.service.ETAPushDataService;
|
|
import com.qhtx.eta.domain.service.ETAQuotaService;
|
|
import com.qhtx.eta.domain.service.ETAQuotaService;
|
|
import com.qhtx.eta.domain.api.ApiServiceHolder;
|
|
import com.qhtx.eta.domain.api.ApiServiceHolder;
|
|
import com.qhtx.eta.domain.api.http.request.ETADataHttpRequest;
|
|
import com.qhtx.eta.domain.api.http.request.ETADataHttpRequest;
|
|
import com.qhtx.eta.common.constant.ETAConstants;
|
|
import com.qhtx.eta.common.constant.ETAConstants;
|
|
-import com.qhtx.eta.domain.entity.QuotaDataDTO;
|
|
|
|
import com.qhtx.eta.domain.task.FixedDelayTaskRegistrar;
|
|
import com.qhtx.eta.domain.task.FixedDelayTaskRegistrar;
|
|
import com.qhtx.eta.domain.task.SchedulingRunnable;
|
|
import com.qhtx.eta.domain.task.SchedulingRunnable;
|
|
import com.qhtx.eta.infra.annotation.UseDataSource;
|
|
import com.qhtx.eta.infra.annotation.UseDataSource;
|
|
|
|
+import com.qhtx.eta.infra.entity.dw.TEtaIndexPushTask;
|
|
import com.qhtx.eta.infra.enums.Frequency;
|
|
import com.qhtx.eta.infra.enums.Frequency;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -69,6 +68,8 @@ public class ETASyncJob implements CommandLineRunner {
|
|
private DWIndexFrameService dwIndexFrameService;
|
|
private DWIndexFrameService dwIndexFrameService;
|
|
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private ETAPushDataService etaPushDataService;
|
|
// @Resource(name = "ETAIndexFrameThreadPool")
|
|
// @Resource(name = "ETAIndexFrameThreadPool")
|
|
// private ThreadPoolExecutor etaIndexFrameThreadPool;
|
|
// private ThreadPoolExecutor etaIndexFrameThreadPool;
|
|
|
|
|
|
@@ -78,6 +79,13 @@ public class ETASyncJob implements CommandLineRunner {
|
|
return taskMappingMap.get(configId);
|
|
return taskMappingMap.get(configId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 同步指标数据到自有数据源
|
|
|
|
+ */
|
|
|
|
+ public void syncETAPushData(){
|
|
|
|
+ //获取需要更新的数据
|
|
|
|
+ // List<ETAPushIndexDTO> pushTaskList = etaPushDataService.getPushIndexTaskList();
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 同步指标信息
|
|
* 同步指标信息
|
|
*/
|
|
*/
|
|
@@ -94,6 +102,9 @@ public class ETASyncJob implements CommandLineRunner {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 同步ETA的指标框架到一期
|
|
|
|
+ */
|
|
public void syncETAClassifyList() {
|
|
public void syncETAClassifyList() {
|
|
List<?> respList = apiServiceHolder.runApi(ETAInterfaceEnum.GET_CLASSIFY_LIST);
|
|
List<?> respList = apiServiceHolder.runApi(ETAInterfaceEnum.GET_CLASSIFY_LIST);
|
|
if (respList != null) {
|
|
if (respList != null) {
|
|
@@ -109,7 +120,6 @@ public class ETASyncJob implements CommandLineRunner {
|
|
dwIndexFrameService.processing(ClassifyMappingDTOConverter.INSTANCE.convertDTOToDWIndexFrameList(processingList));
|
|
dwIndexFrameService.processing(ClassifyMappingDTOConverter.INSTANCE.convertDTOToDWIndexFrameList(processingList));
|
|
}
|
|
}
|
|
//开始获取新增和需要更新的框架数据
|
|
//开始获取新增和需要更新的框架数据
|
|
-
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
log.warn("同步eta指标分类失败:{}", e.getMessage());
|
|
log.warn("同步eta指标分类失败:{}", e.getMessage());
|