From ca120d70593f7a29a150bb6fb17f8ff4cdfadbc8 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 19 三月 2025 11:31:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

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 82fb308..aff430f 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
@@ -1,13 +1,13 @@
 package com.iailab.sdk;
 
-import com.iailab.sdk.auth.client.IailabAuthClient;
-import com.iailab.sdk.auth.client.dto.ApiDataQueryDTO;
+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;
 import org.springframework.test.context.junit4.SpringRunner;
 
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -25,13 +25,13 @@
 
     @Test
     public void testLogin() {
-        IailabAuthClient.authenticate();
+        IailabClient.authenticate();
     }
 
     @Test
     public void testRefreshToken() throws Exception {
         // 准备参数
-        IailabAuthClient.refreshToken();
+        IailabClient.refreshToken();
     }
 
     @Test
@@ -43,29 +43,22 @@
         itemNos.add("P0000100010");
         params.put("itemNos", itemNos);
         // 准备参数
-        String s = IailabAuthClient.doHttp("POST", "http://172.16.8.100/admin-api/data/api/query-plans/chart", params);
+        String s = IailabClient.doHttp("POST", "http://172.16.8.100/admin-api/data/api/query-plans/chart", params);
         System.out.println(s);
     }
 
     @Test
-    public void testQueryPlanChart() throws Exception {
-        ApiDataQueryDTO apiDataQueryDTO = new ApiDataQueryDTO();
-        List<String> itemNos = new ArrayList<>();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        apiDataQueryDTO.setStart(sdf.parse("2024-06-11 07:24:00"));
-        apiDataQueryDTO.setEnd(sdf.parse("2024-06-13 00:00:00"));
-        itemNos.add("P0000100010");
-        apiDataQueryDTO.setItemNos(itemNos);
-        Map<String, Object> stringObjectMap = IailabAuthClient.getInstance().queryPlanChart(apiDataQueryDTO);
+    public void testQueryPointsRealValue() {
+        List<String> pointNos = new ArrayList<>();
+        pointNos.add("111");
+        CommonResult<Map<String, Object>> stringObjectMap = IailabClient.getInstance().queryPointsRealValue(pointNos);
         System.out.println(stringObjectMap);
     }
 
     @Test
-    public void testQueryPointsRealValue() throws Exception {
-        List<String> pointNos = new ArrayList<>();
-        pointNos.add("111");
-        Map<String, Object> stringObjectMap = IailabAuthClient.getInstance().queryPointsRealValue(pointNos);
-        System.out.println(stringObjectMap);
+    public void testGetPowerRunState() {
+        CommonResult<List<PowerRunStateDTO>> list = IailabClient.getInstance().getPowerRunState();
+        System.out.println(list);
     }
 
 }

--
Gitblit v1.9.3