From 730d1944e3a13c517c77df2b0712df05645a38dd Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 06 一月 2025 16:00:58 +0800
Subject: [PATCH] chartParamList api

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/plan/PlanItemApiImpl.java |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 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 46f93e7..be43446 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
@@ -2,18 +2,25 @@
 
 import com.iailab.framework.common.util.object.ConvertUtils;
 import com.iailab.module.data.api.plan.dto.ApiPlanDataDTO;
+import com.iailab.module.data.api.plan.dto.ApiPlanItemDTO;
+import com.iailab.module.data.api.point.dto.ApiPointDTO;
 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.entity.PlanItemEntity;
+import com.iailab.module.data.plan.item.service.PlanItemService;
 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.PathVariable;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Set;
 
 /**
  * @author PanZhibao
@@ -27,11 +34,16 @@
     @Autowired
     private PlanItemCollector planItemCollector;
 
+    @Autowired
+    private PlanItemService planItemService;
+
+    @Override
     public List<ApiDataValueDTO> queryPlanItemHistoryValue(ApiDataQueryDTO dto) {
         List<PlanItemValueVO> list = planItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd());
         return ConvertUtils.sourceToTarget(list, ApiDataValueDTO.class);
     }
 
+    @Override
     public LinkedHashMap<String, List<ApiPlanDataDTO>> queryPlanItemRecordValue(ApiDataQueryDTO dto) {
         LinkedHashMap<String, List<ApiPlanDataDTO>> result = new LinkedHashMap<>();
         if (CollectionUtils.isEmpty(dto.getItemNos())) {
@@ -44,4 +56,25 @@
         return result;
     }
 
+    @Override
+    public ApiPlanItemDTO getInfoByNo(String itemNo){
+        PlanItemEntity entity = planItemService.getInfoByNo(itemNo);
+        return ConvertUtils.sourceToTarget(entity, ApiPlanItemDTO.class);
+    }
+
+    @Override
+    public ApiPlanItemDTO getInfoById(String itemNo){
+        PlanItemEntity entity = planItemService.get(itemNo);
+        return ConvertUtils.sourceToTarget(entity, ApiPlanItemDTO.class);
+    }
+
+    @Override
+    public List<ApiPlanItemDTO> getInfoByIds(Set<String> planIds) {
+        if (CollectionUtils.isEmpty(planIds)) {
+            return new ArrayList<>();
+        }
+        List<PlanItemEntity> plans = planItemService.getInfoByIds(planIds);
+        return ConvertUtils.sourceToTarget(plans,ApiPlanItemDTO.class);
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.9.3