dengzedong
2025-01-10 ed5f75dce72b05d095c52228a0b46d312cebaa4c
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/collector/KingIOClient.java
@@ -3,7 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.iailab.module.data.common.utils.HttpRequest;
import com.iailab.framework.common.util.http.HttpUtils;
import com.iailab.module.data.channel.kio.dto.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -85,7 +85,7 @@
        form.put("username", username);
        form.put("password", password);
        this.logint_time = System.currentTimeMillis();
        String responseStr = HttpRequest.sendPost(this.url + "/login", JSON.toJSONString(form));
        String responseStr = HttpUtils.sendPost(this.url + "/login", JSON.toJSONString(form));
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            bLogin = false;
@@ -119,7 +119,7 @@
                return bConnect;
            }
            Map<String, String> map = new HashMap<>();
            String responseStr = HttpRequest.sendPost(this.url + "/heartbeat", "", this.authorization);
            String responseStr = HttpUtils.sendPost(this.url + "/heartbeat", "", this.authorization);
            JSONObject responseObj = JSON.parseObject(responseStr);
            if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
                bConnect = false;
@@ -139,7 +139,7 @@
        Map<String, String> map = new HashMap<>();
        map.put("projectInstanceName", this.instanceName);
        map.put("TagName", tagName);
        String responseStr = HttpRequest.sendGet(this.url + "/realvalue", map, this.authorization);
        String responseStr = HttpUtils.sendGet(this.url + "/realvalue", map, this.authorization);
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            return null;
@@ -159,7 +159,7 @@
            objs.add(dto);
        });
        queryDto.setObjs(objs);
        String responseStr = HttpRequest.sendPost(this.url + "/batchrealvalue", JSONObject.toJSONString(queryDto), this.authorization);
        String responseStr = HttpUtils.sendPost(this.url + "/batchrealvalue", JSONObject.toJSONString(queryDto), this.authorization);
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            return null;
@@ -184,7 +184,7 @@
        objs.add(writeDTO);
        writeObj.setObjs(objs);
        String writeStr = JSONObject.toJSONString(writeObj);
        String responseStr = HttpRequest.sendPost(this.url + "/realvariables", writeStr, this.authorization);
        String responseStr = HttpUtils.sendPost(this.url + "/realvariables", writeStr, this.authorization);
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            throw new Exception(responseObj.getString(R_MSG));
@@ -200,7 +200,7 @@
        writeDTO.setV(newValue);
        objs.add(writeDTO);
        writeObj.setObjs(objs);
        String responseStr = HttpRequest.sendPost(this.url + "/realvariables", JSONObject.toJSONString(writeObj), this.authorization);
        String responseStr = HttpUtils.sendPost(this.url + "/realvariables", JSONObject.toJSONString(writeObj), this.authorization);
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            throw new Exception(responseObj.getString(R_MSG));
@@ -215,7 +215,7 @@
        writeDTO.setV(newValue);
        objs.add(writeDTO);
        writeObj.setObjs(objs);
        String responseStr = HttpRequest.sendPost(this.url + "/realvariables", JSONObject.toJSONString(writeObj), this.authorization);
        String responseStr = HttpUtils.sendPost(this.url + "/realvariables", JSONObject.toJSONString(writeObj), this.authorization);
        JSONObject responseObj = JSON.parseObject(responseStr);
        if (S_CODE != Integer.parseInt(responseObj.get(R_CODE).toString())) {
            throw new Exception(responseObj.getString(R_MSG));