houzhongjian
2025-01-17 60fa13f76afe72a6f48416de2904d58164859382
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/collection/handler/CalItemHandler.java
@@ -14,7 +14,9 @@
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;
import java.util.*;
@@ -27,7 +29,7 @@
@Component
public class CalItemHandler {
    @Autowired
    @Resource
    private JavaScriptHandler javaScriptHandler;
    public static final String regex = "[+\\-\\*\\/\\(\\)\\&\\|\\>\\<]";
@@ -62,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();