更新
This commit is contained in:
@@ -456,13 +456,22 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue();
|
||||
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue();
|
||||
|
||||
agvurl = agvurl + ":" + agvport + "/transportOrders";
|
||||
agvurl = agvurl + ":" + agvport + "/blockGroupStatus";
|
||||
try {
|
||||
HttpResponse result = HttpRequest.get(agvurl)
|
||||
.body(String.valueOf(param))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
String body = result.body();
|
||||
if (StrUtil.isNotEmpty(body)){
|
||||
JSONArray jsonArray = JSONArray.parseArray(result.body());
|
||||
return jsonArray;
|
||||
}
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
HttpResponse result = HttpRequest.get(agvurl)
|
||||
.body(String.valueOf(param))//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
return JSONArray.parseArray(result.body());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,9 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
} else if (headtype.startsWith("REAL")) {
|
||||
datatype = "REAL";
|
||||
}
|
||||
} else {
|
||||
}else if (datatype.startsWith("000")){
|
||||
datatype = "Boolean";
|
||||
}else {
|
||||
//西门子200
|
||||
if (datatype.indexOf(".") == -1) {
|
||||
datatype = "Byte";
|
||||
|
||||
@@ -58,8 +58,10 @@ public class QueryXZAgvDeviceStatus {
|
||||
String task_type = "0";
|
||||
if (StrUtil.isNotEmpty(inst_code)) {
|
||||
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
||||
//任务类型
|
||||
task_type = inst.getInstruction_type();
|
||||
if (ObjectUtil.isNotEmpty(inst)){
|
||||
//任务类型
|
||||
task_type = inst.getInstruction_type();
|
||||
}
|
||||
}
|
||||
//x坐标
|
||||
int x = Double.valueOf(rbk_report.getString("x")).intValue();
|
||||
@@ -87,8 +89,14 @@ public class QueryXZAgvDeviceStatus {
|
||||
MaGangAgvDeviceDriver maGangAgvDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof MaGangAgvDeviceDriver) {
|
||||
maGangAgvDeviceDriver = (MaGangAgvDeviceDriver) device.getDeviceDriver();
|
||||
maGangAgvDeviceDriver.writing("status", status);
|
||||
maGangAgvDeviceDriver.writing("type", task_type);
|
||||
String kepStatus = String.valueOf(maGangAgvDeviceDriver.getStatus());
|
||||
String kepType = String.valueOf(maGangAgvDeviceDriver.getType());
|
||||
if (!StrUtil.equals(kepStatus,status)){
|
||||
maGangAgvDeviceDriver.writing("status", status);
|
||||
}
|
||||
if (!StrUtil.equals(kepType,task_type)){
|
||||
maGangAgvDeviceDriver.writing("type", task_type);
|
||||
}
|
||||
maGangAgvDeviceDriver.writing("x_coordinate", String.valueOf(x));
|
||||
maGangAgvDeviceDriver.writing("y_coordinate", String.valueOf(y));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user