Browse Source

更新

master
gengby 2 years ago
parent
commit
3699748b42
  1. 15
      acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java
  2. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java
  3. 8
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java

15
acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java

@ -456,13 +456,22 @@ 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 + "/transportOrders"; agvurl = agvurl + ":" + agvport + "/blockGroupStatus";
try {
HttpResponse result = HttpRequest.get(agvurl) HttpResponse result = HttpRequest.get(agvurl)
.body(String.valueOf(param))//表单内容 .body(String.valueOf(param))//表单内容
.timeout(20000)//超时,毫秒 .timeout(20000)//超时,毫秒
.execute(); .execute();
return JSONArray.parseArray(result.body()); String body = result.body();
if (StrUtil.isNotEmpty(body)){
JSONArray jsonArray = JSONArray.parseArray(result.body());
return jsonArray;
}
return null;
} catch (Exception e) {
return null;
}
} else { } else {
return null; return null;
} }

2
acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java

@ -1390,6 +1390,8 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
} else if (headtype.startsWith("REAL")) { } else if (headtype.startsWith("REAL")) {
datatype = "REAL"; datatype = "REAL";
} }
}else if (datatype.startsWith("000")){
datatype = "Boolean";
}else { }else {
//西门子200 //西门子200
if (datatype.indexOf(".") == -1) { if (datatype.indexOf(".") == -1) {

8
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java

@ -58,9 +58,11 @@ public class QueryXZAgvDeviceStatus {
String task_type = "0"; String task_type = "0";
if (StrUtil.isNotEmpty(inst_code)) { if (StrUtil.isNotEmpty(inst_code)) {
Instruction inst = instructionService.findByCodeFromCache(inst_code); Instruction inst = instructionService.findByCodeFromCache(inst_code);
if (ObjectUtil.isNotEmpty(inst)){
//任务类型 //任务类型
task_type = inst.getInstruction_type(); task_type = inst.getInstruction_type();
} }
}
//x坐标 //x坐标
int x = Double.valueOf(rbk_report.getString("x")).intValue(); int x = Double.valueOf(rbk_report.getString("x")).intValue();
//y坐标 //y坐标
@ -87,8 +89,14 @@ public class QueryXZAgvDeviceStatus {
MaGangAgvDeviceDriver maGangAgvDeviceDriver; MaGangAgvDeviceDriver maGangAgvDeviceDriver;
if (device.getDeviceDriver() instanceof MaGangAgvDeviceDriver) { if (device.getDeviceDriver() instanceof MaGangAgvDeviceDriver) {
maGangAgvDeviceDriver = (MaGangAgvDeviceDriver) device.getDeviceDriver(); maGangAgvDeviceDriver = (MaGangAgvDeviceDriver) device.getDeviceDriver();
String kepStatus = String.valueOf(maGangAgvDeviceDriver.getStatus());
String kepType = String.valueOf(maGangAgvDeviceDriver.getType());
if (!StrUtil.equals(kepStatus,status)){
maGangAgvDeviceDriver.writing("status", status); maGangAgvDeviceDriver.writing("status", status);
}
if (!StrUtil.equals(kepType,task_type)){
maGangAgvDeviceDriver.writing("type", task_type); maGangAgvDeviceDriver.writing("type", task_type);
}
maGangAgvDeviceDriver.writing("x_coordinate", String.valueOf(x)); maGangAgvDeviceDriver.writing("x_coordinate", String.valueOf(x));
maGangAgvDeviceDriver.writing("y_coordinate", String.valueOf(y)); maGangAgvDeviceDriver.writing("y_coordinate", String.valueOf(y));
} }

Loading…
Cancel
Save