fix: 空指针异常
This commit is contained in:
@@ -558,11 +558,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
|
|
||||||
//入库异常口为起点的任务
|
//入库异常口为起点的任务
|
||||||
TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code);
|
TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code);
|
||||||
//移除行架任务
|
|
||||||
if (taskdto.getTask_type().equals(TaskTypeEnum.Truss_Task.getIndex())){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isNotNull(taskdto)) {
|
if (ObjectUtil.isNotNull(taskdto)) {
|
||||||
|
//移除行架任务
|
||||||
|
if (taskdto.getTask_type().equals(TaskTypeEnum.Truss_Task.getIndex())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//判断指令的起点和当前的设备号相同
|
//判断指令的起点和当前的设备号相同
|
||||||
if (!taskdto.getStart_device_code().equals(device_code)) {
|
if (!taskdto.getStart_device_code().equals(device_code)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -273,14 +273,14 @@ public class ItemProtocol {
|
|||||||
setIsonline(true);
|
setIsonline(true);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
return value;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOpcStringValue(String protocol) {
|
public String getOpcStringValue(String protocol) {
|
||||||
String value = this.driver.getStringValue(protocol);
|
String value = this.driver.getStringValue(protocol);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
setIsonline(false);
|
setIsonline(false);
|
||||||
return value;
|
return "";
|
||||||
} else {
|
} else {
|
||||||
setIsonline(true);
|
setIsonline(true);
|
||||||
return value;
|
return value;
|
||||||
|
|||||||
Reference in New Issue
Block a user