From c0b8cf32504dd1a42780bb1ee06ae8a7b0d7b120 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 09 十月 2024 23:36:11 +0800 Subject: [PATCH] 指标数据 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/DerItemHandler.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/DerItemHandler.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/DerItemHandler.java new file mode 100644 index 0000000..404f4c5 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/DerItemHandler.java @@ -0,0 +1,51 @@ +package com.iailab.module.data.ind.collection.handler; + +import com.iailab.module.data.ind.collection.utils.IndSqlUtils; +import com.iailab.module.data.ind.item.vo.IndItemValueVO; +import com.iailab.module.data.ind.value.dto.QuerySourceValueDTO; +import com.iailab.module.data.ind.value.service.IndItemValueService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年10月04日 + */ +@Slf4j +@Component +public class DerItemHandler { + + @Autowired + private IndSqlUtils indSqlUtils; + + @Autowired + private IndItemValueService indItemValueService; + + public List<IndItemValueVO> queryValue(String itemId) { + List<IndItemValueVO> result = new ArrayList<IndItemValueVO>(); + try { + QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId); + return indItemValueService.getSourceValue(queryDto); + } catch (Exception ex) { + ex.printStackTrace(); + } + return result; + } + + public List<IndItemValueVO> queryValue(String itemId, Date startTime, Date endTime) { + List<IndItemValueVO> result = new ArrayList<IndItemValueVO>(); + try { + QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId, startTime, endTime); + return indItemValueService.getSourceValue(queryDto); + } catch (Exception ex) { + ex.printStackTrace(); + } + return result; + } +} \ No newline at end of file -- Gitblit v1.9.3