|
@@ -14,15 +14,15 @@ import com.qhtx.eta.domain.entity.DWIndexFrameDTO;
|
|
|
import com.qhtx.eta.domain.entity.DWIndexWithLinkCodeDTO;
|
|
|
import com.qhtx.eta.domain.service.DWIndexFrameService;
|
|
|
import com.qhtx.eta.domain.utils.RedisUtils;
|
|
|
-import com.qhtx.eta.infra.annotation.UseDataSource;
|
|
|
import com.qhtx.eta.infra.datasource.DataSourceContextHolder;
|
|
|
+import com.qhtx.eta.infra.entity.dw.TEtaIndexMapping;
|
|
|
import com.qhtx.eta.infra.entity.dw.TDampDwLinkDetail;
|
|
|
import com.qhtx.eta.infra.entity.dw.*;
|
|
|
-import com.qhtx.eta.infra.mapper.DWIndexFrameDao;
|
|
|
import com.qhtx.eta.infra.service.*;
|
|
|
import lombok.Data;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
+import org.mapstruct.ap.internal.util.Strings;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.TransactionStatus;
|
|
|
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
|
|
@@ -34,7 +34,6 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.qhtx.eta.common.eunms.DataSourceType;
|
|
@@ -69,6 +68,8 @@ public class DWIndexFrameServiceImpl implements DWIndexFrameService {
|
|
|
@Resource
|
|
|
private TDampDwLinkDetailService tDampDwLinkDetailService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private TEtaIndexMappingService tEtaIndexMappingService;
|
|
|
@Resource
|
|
|
private TDampDwIndexService tDampDwIndexService;
|
|
|
@Resource(name = "IndexDataThreadPool")
|
|
@@ -253,15 +254,20 @@ public class DWIndexFrameServiceImpl implements DWIndexFrameService {
|
|
|
return;
|
|
|
}
|
|
|
//获取对接码的指标信息
|
|
|
- List<TDampDwIndexLink> linkInfoList = tDampDwIndexLinkService.getLinkInfoByCode(dwIndex.getLinkCode());
|
|
|
- if (linkInfoList == null || linkInfoList.isEmpty()) {
|
|
|
- log.warn("对接码信息不存在,linkCode:{}", dwIndex.getLinkCode());
|
|
|
+// List<TDampDwIndexLink> linkInfoList = tDampDwIndexLinkService.getLinkInfoByCode(dwIndex.getLinkCode());
|
|
|
+// if (linkInfoList == null || linkInfoList.isEmpty()) {
|
|
|
+// log.warn("对接码信息不存在,linkCode:{}", dwIndex.getLinkCode());
|
|
|
+// return;
|
|
|
+// }
|
|
|
+ TEtaIndexMapping mapping = tEtaIndexMappingService.queryByLinkCode(dwIndex.getLinkCode());
|
|
|
+ if (mapping == null || Strings.isEmpty(mapping.getIndexCode())) {
|
|
|
+ log.warn("对接码关联指标信息不存在,linkCode:{}", dwIndex.getLinkCode());
|
|
|
return;
|
|
|
}
|
|
|
//根据指标名称过滤指标
|
|
|
TDampDwIndex updateDwIndex = new TDampDwIndex();
|
|
|
-// updateDwIndex.setIndexCode(linkInfo.getIndexCode());
|
|
|
-// updateDwIndex.setFrameId(dwIndex.getFrameId());
|
|
|
+ updateDwIndex.setIndexCode(mapping.getIndexCode());
|
|
|
+ updateDwIndex.setFrameId(dwIndex.getFrameId());
|
|
|
tDampDwIndexService.updateIndexInfo(updateDwIndex);
|
|
|
}
|
|
|
|