Browse Source

更新

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

21
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 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;
}

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

@ -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";

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

@ -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));
}

Loading…
Cancel
Save