|
@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.http.HttpRequest; |
|
|
import cn.hutool.http.HttpRequest; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
import cn.hutool.http.HttpResponse; |
|
|
|
|
|
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; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
@ -455,21 +456,21 @@ public class XianGongAgvServiceImpl implements XianGongAgvService { |
|
|
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); |
|
|
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); |
|
|
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); |
|
|
agvurl = agvurl + ":" + agvport + "/blockGroupStatus"; |
|
|
agvurl = agvurl + ":" + agvport + "/blockGroupStatus"; |
|
|
log.info("获取互斥组参数:{},请求路径:{}", String.valueOf(param), agvurl); |
|
|
log.info("获取互斥组参数:{},请求路径:{},请求参数:{}", String.valueOf(param), agvurl, String.valueOf(param)); |
|
|
try { |
|
|
try { |
|
|
HttpResponse result = HttpRequest.get(agvurl) |
|
|
HttpResponse result = HttpRequest.post(agvurl) |
|
|
.body(String.valueOf(param))//表单内容
|
|
|
.body(JSON.toJSONString(param))//表单内容
|
|
|
.timeout(20000)//超时,毫秒
|
|
|
.timeout(20000)//超时,毫秒
|
|
|
.execute(); |
|
|
.execute(); |
|
|
String body = result.body(); |
|
|
String body = result.body(); |
|
|
if (StrUtil.isNotEmpty(body)) { |
|
|
if (StrUtil.isNotEmpty(body)) { |
|
|
JSONArray jsonArray = JSONArray.parseArray(result.body()); |
|
|
JSONArray jsonArray = JSONArray.parseArray(result.body()); |
|
|
log.info("获取互斥组参数:{},请求路径:{},响应参数{}", String.valueOf(param), agvurl, String.valueOf(jsonArray)); |
|
|
log.info("获取互斥组参数:{},请求路径:{},请求参数:{},响应参数{}", String.valueOf(param), agvurl, String.valueOf(param), String.valueOf(jsonArray)); |
|
|
return jsonArray; |
|
|
return jsonArray; |
|
|
} |
|
|
} |
|
|
return null; |
|
|
return null; |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.info("获取互斥组参数:{},请求路径:{},响应参数{}", String.valueOf(param), agvurl, e.getMessage()); |
|
|
log.error("获取互斥组参数:{},请求路径:{},请求参数:{},响应参数{}", String.valueOf(param), agvurl, String.valueOf(param), e.getMessage()); |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|