From a8f2f4e6f1a9173d7eb9779c7879674015c8cda0 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期四, 10 十月 2024 14:07:31 +0800 Subject: [PATCH] 项目启动加载已发布的dll和jar 先判断文件是否存在 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/IndItemController.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/IndItemController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/IndItemController.java new file mode 100644 index 0000000..bbc9c15 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/controller/IndItemController.java @@ -0,0 +1,53 @@ +package com.iailab.module.data.api.controller; + +import com.iailab.framework.common.pojo.CommonResult; +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.data.api.ind.dto.ApiIndItemQueryDTO; +import com.iailab.module.data.api.ind.dto.ApiIndItemValueDTO; +import com.iailab.module.data.ind.collection.IndItemCollector; +import com.iailab.module.data.ind.item.vo.IndItemValueVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.security.PermitAll; +import java.util.List; + +import static com.iailab.framework.common.pojo.CommonResult.success; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年10月10日 + */ +@Slf4j +@RestController +@RequestMapping("/api/data/ind-item") +@Tag(name = "指标") +public class IndItemController { + + @Autowired + private IndItemCollector indItemCollector; + + @PermitAll + @GetMapping("/query-ind/default-value") + @Operation(summary = "查询指标默认值") + public CommonResult<List<ApiIndItemValueDTO>> queryIndItemDefaultValue(@RequestParam String itemNo) { + List<IndItemValueVO> list = indItemCollector.queryValue(itemNo); + return success(ConvertUtils.sourceToTarget(list, ApiIndItemValueDTO.class)); + + } + + @PermitAll + @GetMapping("/query-ind/history-value") + @Operation(summary = "查询指标历史值") + public CommonResult<List<ApiIndItemValueDTO>> queryIndItemHistoryValue(@RequestParam ApiIndItemQueryDTO dto) { + List<IndItemValueVO> list = indItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd()); + return success(ConvertUtils.sourceToTarget(list, ApiIndItemValueDTO.class)); + } +} \ No newline at end of file -- Gitblit v1.9.3