From b44442b2168828d50d1fdf484c4187073bf099f6 Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期四, 20 三月 2025 14:06:00 +0800
Subject: [PATCH] sdk去掉个性化接口

---
 /dev/null                                                                  |   82 ---------------------------
 iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/IailabClient.java |   60 ++-----------------
 iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java         |    7 --
 3 files changed, 7 insertions(+), 142 deletions(-)

diff --git a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/IailabClient.java b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/IailabClient.java
index 667a51a..a7a2f43 100644
--- a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/IailabClient.java
+++ b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/IailabClient.java
@@ -6,7 +6,10 @@
 import com.iailab.sdk.auth.client.common.exception.enums.GlobalErrorCodeConstants;
 import com.iailab.sdk.auth.client.common.pojo.CommonResult;
 import com.iailab.sdk.auth.client.common.pojo.PageResult;
-import com.iailab.sdk.auth.client.dto.*;
+import com.iailab.sdk.auth.client.dto.ApiPointsValueQueryDTO;
+import com.iailab.sdk.auth.client.dto.StAlarmAndSuggestPageReqDTO;
+import com.iailab.sdk.auth.client.dto.StAlarmAndSuggestRespDTO;
+import com.iailab.sdk.auth.client.dto.TokenDTO;
 import com.iailab.sdk.auth.config.SdkAutoConfiguration;
 import com.iailab.sdk.auth.constants.SdkErrorCodeConstants;
 import com.iailab.sdk.util.http.IailabHttpUtils;
@@ -16,11 +19,12 @@
 import org.springframework.util.Base64Utils;
 import org.springframework.util.ObjectUtils;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.client.RestTemplate;
 
 import java.nio.charset.StandardCharsets;
-import java.util.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import static com.iailab.framework.common.exception.util.ServiceExceptionUtil.exception;
 
@@ -301,55 +305,5 @@
             return CommonResult.error(GlobalErrorCodeConstants.UNKNOWN.getCode(), ex.getMessage());
         }
         return CommonResult.success(data);
-    }
-
-    /**
-     * 发电厂机组运行情况
-     * @return
-     */
-    public CommonResult<List<PowerRunStateDTO>> getPowerRunState() {
-        List<PowerRunStateDTO> list = new ArrayList<>();
-        try {
-            String url = BASE_URL + "/ansteel/api/mcs/power-run-state/list";
-            String resp = IailabHttpUtils.doGet(url, new HashMap<>(), "UTF-8");
-            if (StringUtils.isEmpty(resp)) {
-                return CommonResult.error(GlobalErrorCodeConstants.EMPTY_RESP);
-            }
-            JSONObject jsonObject = JSON.parseObject(resp);
-            Integer respCode = jsonObject.getInteger(RESP_CODE);
-            if (!GlobalErrorCodeConstants.SUCCESS.getCode().equals(respCode)) {
-                CommonResult.error(respCode, jsonObject.getString(RESP_MSG));
-            }
-            Long total = Long.parseLong(jsonObject.getJSONObject(RESP_DATA).get("total").toString());
-            list = jsonObject.getJSONObject(RESP_DATA).getJSONArray("list").toJavaList(PowerRunStateDTO.class);
-        } catch (Exception ex) {
-            return CommonResult.error(GlobalErrorCodeConstants.UNKNOWN.getCode(), ex.getMessage());
-        }
-        return CommonResult.success(list);
-    }
-
-    /**
-     * 预测数据图表
-     * @param reqVO
-     * @return
-     */
-    public CommonResult<PreDataChartRespVO> getPreDataChart(PreDataSingleChartReqVO reqVO) {
-        PreDataChartRespVO respVO = new PreDataChartRespVO();
-        try {
-            String url = BASE_URL + "/ansteel/api/mcs/predict-data/charts";
-            String resp = IailabHttpUtils.doPost(url, JSON.toJSONString(reqVO), "UTF-8");
-            if (StringUtils.isEmpty(resp)) {
-                return CommonResult.error(GlobalErrorCodeConstants.EMPTY_RESP);
-            }
-            JSONObject jsonObject = JSON.parseObject(resp);
-            Integer respCode = jsonObject.getInteger(RESP_CODE);
-            if (!GlobalErrorCodeConstants.SUCCESS.getCode().equals(respCode)) {
-                CommonResult.error(respCode, jsonObject.getString(RESP_MSG));
-            }
-            respVO = jsonObject.getJSONObject(RESP_DATA).toJavaObject(PreDataChartRespVO.class);
-        } catch (Exception ex) {
-            return CommonResult.error(GlobalErrorCodeConstants.UNKNOWN.getCode(), ex.getMessage());
-        }
-        return CommonResult.success(respVO);
     }
 }
\ No newline at end of file
diff --git a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PowerRunStateDTO.java b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PowerRunStateDTO.java
deleted file mode 100644
index 09099ec..0000000
--- a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PowerRunStateDTO.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.iailab.sdk.auth.client.dto;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * @author lirm
- * @date 2025年03月13日
- */
-@Data
-public class PowerRunStateDTO implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private String id;
-    private String machineName;
-    private String qhRate;
-    private String fhRate;
-    private String gasTotal;
-    private String gasCost;
-    private String gasSurplus;
-    private String bfg;
-    private String ldg;
-    private String cog;
-}
diff --git a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataChartRespVO.java b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataChartRespVO.java
deleted file mode 100644
index 8193b1b..0000000
--- a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataChartRespVO.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.iailab.sdk.auth.client.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @author PanZhibao
- * @Description
- * @createTime 2024年11月18日
- */
-@Data
-public class PreDataChartRespVO implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date predictTime;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date startTime;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date endTime;
-
-    private List<String> legend;
-
-    private List<String> categories;
-
-    private PreDataViewDTO dataView;
-
-}
\ No newline at end of file
diff --git a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataSingleChartReqVO.java b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataSingleChartReqVO.java
deleted file mode 100644
index b15bd6f..0000000
--- a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataSingleChartReqVO.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.iailab.sdk.auth.client.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @author PanZhibao
- * @Description
- * @createTime 2024年11月18日
- */
-@Data
-public class PreDataSingleChartReqVO implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private String chartCode;
-
-    private String timeFormat;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date predictTime;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date startTime;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date endTime;
-}
\ No newline at end of file
diff --git a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataViewDTO.java b/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataViewDTO.java
deleted file mode 100644
index 4da8f64..0000000
--- a/iailab-plat-sdk/src/main/java/com/iailab/sdk/auth/client/dto/PreDataViewDTO.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.iailab.sdk.auth.client.dto;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @author PanZhibao
- * @Description
- * @createTime 2024年08月26日
- */
-@Data
-public class PreDataViewDTO implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private String itemId;
-
-    private String itemName;
-
-    private String outId;
-
-    private String resultstr;
-
-    private String resultName;
-
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    private Date predictTime;
-
-    private BigDecimal rangeH;
-
-    private BigDecimal rangeL;
-
-    private BigDecimal deadLineH;
-
-    private BigDecimal deadLineL;
-
-    private BigDecimal limitH;
-
-    private BigDecimal limitL;
-
-    private List<ApiPointValueDTO> trendsDataH;
-
-    private List<ApiPointValueDTO> trendsDataL;
-
-    private BigDecimal currValue;
-
-    private BigDecimal maxValue;
-
-    private BigDecimal minValue;
-
-    private BigDecimal hisMax;
-
-    private BigDecimal hisMin;
-
-    private BigDecimal hisCumulant;
-
-    private BigDecimal preMax;
-
-    private BigDecimal preMin;
-
-    private BigDecimal preLast;
-
-    private BigDecimal preCumulant;
-
-    private List<Object[]> realData;
-
-    private List<Object[]> preData;
-
-    private List<AlarmMessageRespDTO> alarmList;
-
-    private String alarmMessage;
-
-    private String lineType;
-
-    private List<Object[]> cumulantRealData;
-
-    private List<Object[]> cumulantPreData;
-}
\ No newline at end of file
diff --git a/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java b/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java
index aff430f..13fc2ca 100644
--- a/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java
+++ b/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java
@@ -2,7 +2,6 @@
 
 import com.iailab.sdk.auth.client.IailabClient;
 import com.iailab.sdk.auth.client.common.pojo.CommonResult;
-import com.iailab.sdk.auth.client.dto.PowerRunStateDTO;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -53,12 +52,6 @@
         pointNos.add("111");
         CommonResult<Map<String, Object>> stringObjectMap = IailabClient.getInstance().queryPointsRealValue(pointNos);
         System.out.println(stringObjectMap);
-    }
-
-    @Test
-    public void testGetPowerRunState() {
-        CommonResult<List<PowerRunStateDTO>> list = IailabClient.getInstance().getPowerRunState();
-        System.out.println(list);
     }
 
 }

--
Gitblit v1.9.3