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