From a9f305fc48e6b1d8d8fd7caf9e04598de52dcfd0 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期四, 16 一月 2025 18:41:50 +0800
Subject: [PATCH] 计算指标查询异常修复

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java
index e2b3297..48a3c7b 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java
@@ -14,6 +14,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
@@ -63,16 +64,23 @@
                 }
                 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()));
+                        vl = derItemHandler.queryValue(subItem.getId());
                         break;
                     default:
                         break;
                 }
+                if (!CollectionUtils.isEmpty(vl)) {
+                    vl.forEach(vi -> {
+                        vi.setItemNo(s);
+                    });
+                }
+                valueMix.add(vl);
             }
             dataLength = valueMix.get(0).size();
 

--
Gitblit v1.9.3