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 queryValue(String itemId) { List result = new ArrayList(); try { QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId); return indItemValueService.getSourceValue(queryDto); } catch (Exception ex) { ex.printStackTrace(); } return result; } public List queryValue(String itemId, Date startTime, Date endTime) { List result = new ArrayList(); try { QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId, startTime, endTime); return indItemValueService.getSourceValue(queryDto); } catch (Exception ex) { ex.printStackTrace(); } return result; } }