提交 | 用户 | 时间
|
cf757d
|
1 |
package com.iailab.module.data.ind.collection.handler; |
潘 |
2 |
|
|
3 |
import com.iailab.module.data.ind.collection.utils.IndSqlUtils; |
|
4 |
import com.iailab.module.data.ind.item.vo.IndItemValueVO; |
|
5 |
import com.iailab.module.data.ind.value.dto.QuerySourceValueDTO; |
|
6 |
import com.iailab.module.data.ind.value.service.IndItemValueService; |
|
7 |
import lombok.extern.slf4j.Slf4j; |
|
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 |
import org.springframework.stereotype.Component; |
|
10 |
|
|
11 |
import java.util.ArrayList; |
|
12 |
import java.util.Date; |
|
13 |
import java.util.List; |
|
14 |
|
|
15 |
/** |
|
16 |
* @author PanZhibao |
|
17 |
* @Description |
|
18 |
* @createTime 2024年10月04日 |
|
19 |
*/ |
|
20 |
@Slf4j |
|
21 |
@Component |
|
22 |
public class DerItemHandler { |
|
23 |
|
|
24 |
@Autowired |
|
25 |
private IndSqlUtils indSqlUtils; |
|
26 |
|
|
27 |
@Autowired |
|
28 |
private IndItemValueService indItemValueService; |
|
29 |
|
|
30 |
public List<IndItemValueVO> queryValue(String itemId) { |
|
31 |
List<IndItemValueVO> result = new ArrayList<IndItemValueVO>(); |
|
32 |
try { |
|
33 |
QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId); |
|
34 |
return indItemValueService.getSourceValue(queryDto); |
|
35 |
} catch (Exception ex) { |
|
36 |
ex.printStackTrace(); |
|
37 |
} |
|
38 |
return result; |
|
39 |
} |
|
40 |
|
|
41 |
public List<IndItemValueVO> queryValue(String itemId, Date startTime, Date endTime) { |
|
42 |
List<IndItemValueVO> result = new ArrayList<IndItemValueVO>(); |
|
43 |
try { |
|
44 |
QuerySourceValueDTO queryDto = indSqlUtils.getDerSql(itemId, startTime, endTime); |
|
45 |
return indItemValueService.getSourceValue(queryDto); |
|
46 |
} catch (Exception ex) { |
|
47 |
ex.printStackTrace(); |
|
48 |
} |
|
49 |
return result; |
|
50 |
} |
|
51 |
} |