| | |
| | | import com.iailab.module.data.ind.item.service.IndItemService; |
| | | import com.iailab.module.data.ind.item.vo.IndItemCalVO; |
| | | import com.iailab.module.data.ind.item.vo.IndItemValueVO; |
| | | 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; |
| | |
| | | } |
| | | IndItemEntity subItem = indItemService.getInfoByNo(s); |
| | | ItemTypeEnum itemType = ItemTypeEnum.getEumByCode(subItem.getItemType()); |
| | | List<IndItemValueVO> vl = new ArrayList<>(); |
| | | switch (itemType) { |
| | | case ATOM: |
| | | valueMix.add(atomItemHandler.queryValue(subItem.getId())); |
| | | vl = atomItemHandler.queryValue(subItem.getId()); |
| | | break; |
| | | case DER: |
| | | valueMix.add(derItemHandler.queryValue(subItem.getId(), startTime, endTime)); |
| | | vl = derItemHandler.queryValue(subItem.getId(), startTime, endTime); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | if (!CollectionUtils.isEmpty(vl)) { |
| | | vl.forEach(vi -> vi.setItemNo(s)); |
| | | } |
| | | valueMix.add(vl); |
| | | } |
| | | dataLength = valueMix.get(0).size(); |
| | | |
| | |
| | | IndItemValueVO valueDTO = valueMix.get(j).get(i); |
| | | dataMap.put(valueDTO.getItemNo(), valueDTO); |
| | | } |
| | | log.info("dataMap:" + dataMap); |
| | | IndItemValueVO itemValue = this.singleCompute(indItem, dataMap); |
| | | result.add(itemValue); |
| | | } |