fix: 空指针异常

This commit is contained in:
2024-07-25 18:52:43 +08:00
parent 7ab645a22d
commit cfd1bdba5d
2 changed files with 6 additions and 6 deletions

View File

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

View File

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