From 849c3bfad21a3821f303413f82cda2d8d4d27733 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 05 十一月 2024 18:41:31 +0800 Subject: [PATCH] tag查当前值 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java index e679c6b..46f93e7 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java @@ -1,14 +1,18 @@ package com.iailab.module.data.api.plan; import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.data.api.plan.dto.ApiPlanDataDTO; import com.iailab.module.data.common.ApiDataQueryDTO; import com.iailab.module.data.common.ApiDataValueDTO; import com.iailab.module.data.plan.item.collection.PlanItemCollector; +import com.iailab.module.data.plan.item.vo.PlanItemDataVO; import com.iailab.module.data.plan.item.vo.PlanItemValueVO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RestController; +import java.util.LinkedHashMap; import java.util.List; /** @@ -18,7 +22,7 @@ */ @RestController // 提供 RESTful API 接口,给 Feign 调用 @Validated -public class PlanItemApiImpl implements PlanItemApi{ +public class PlanItemApiImpl implements PlanItemApi { @Autowired private PlanItemCollector planItemCollector; @@ -27,4 +31,17 @@ List<PlanItemValueVO> list = planItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd()); return ConvertUtils.sourceToTarget(list, ApiDataValueDTO.class); } + + public LinkedHashMap<String, List<ApiPlanDataDTO>> queryPlanItemRecordValue(ApiDataQueryDTO dto) { + LinkedHashMap<String, List<ApiPlanDataDTO>> result = new LinkedHashMap<>(); + if (CollectionUtils.isEmpty(dto.getItemNos())) { + return result; + } + dto.getItemNos().forEach(item -> { + List<PlanItemDataVO> list = planItemCollector.getSourceValue(item, dto.getStart(), dto.getEnd()); + result.put(item, ConvertUtils.sourceToTarget(list, ApiPlanDataDTO.class)); + }); + return result; + } + } \ No newline at end of file -- Gitblit v1.9.3