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