| | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | protected Date getStartTime(ColumnItem columnItem, Date originalTime) { |
| | | protected Date getStartTime(ColumnItem columnItem, Date originalTime, Map<String, ApiPointDTO> pointMap) { |
| | | Date dateTime = new Date(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(originalTime); |
| | | switch (ModelParamType.getEumByCode(columnItem.getParamType())) { |
| | | case DATAPOINT: |
| | | ApiPointDTO dataPoint = dataPointApi.getInfoById(columnItem.getParamId()); |
| | | ApiPointDTO dataPoint = pointMap.get(columnItem.getParamId()); |
| | | if (dataPoint == null) { |
| | | return null; |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | protected Date getEndTime(ColumnItem columnItem, Date originalTime) { |
| | | protected Date getEndTime(ColumnItem columnItem, Date originalTime,Map<String, ApiPointDTO> pointMap) { |
| | | Date dateTime = new Date(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(originalTime); |
| | | switch (ModelParamType.getEumByCode(columnItem.getParamType())) { |
| | | case DATAPOINT: |
| | | ApiPointDTO dataPoint = dataPointApi.getInfoById(columnItem.getParamId()); |
| | | ApiPointDTO dataPoint = pointMap.get(columnItem.getParamId()); |
| | | if (dataPoint == null) { |
| | | return null; |
| | | } |