|
@@ -2,6 +2,7 @@ package com.fdkk.sxz.webApi.controller;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
+import cn.hutool.http.HttpRequest;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -1286,8 +1287,10 @@ public class ImportDataController extends BaseController {
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("obj", JSON.parseObject(data));
|
|
jsonObject.put("obj", JSON.parseObject(data));
|
|
-
|
|
|
|
- String result = OkHttpUtils.httpPostJson(buildUrl + "getLightInfo", jsonObject.toJSONString());
|
|
|
|
|
|
+ String result = HttpRequest.post(buildUrl + "getLightInfo")
|
|
|
|
+ .body(jsonObject.toString())
|
|
|
|
+ .execute().body();
|
|
|
|
+ //String result2 = OkHttpUtils.httpPostJson(buildUrl + "getLightInfo", jsonObject.toJSONString());
|
|
ImportDataController.log.info("getLightInfo返回结果:" + result);
|
|
ImportDataController.log.info("getLightInfo返回结果:" + result);
|
|
JSONObject resultJson = JSON.parseObject(result);
|
|
JSONObject resultJson = JSON.parseObject(result);
|
|
if (resultJson.containsKey("state") && "done".equals(resultJson.getString("state"))) {
|
|
if (resultJson.containsKey("state") && "done".equals(resultJson.getString("state"))) {
|