ndc反馈改119&取消指令不取消任务&device设备同步线程初始化优化

This commit is contained in:
psh
2024-06-19 18:04:04 +08:00
parent cd6a0b9d92
commit a2811875ad
3 changed files with 7 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) 0X00, (byte) 0X6D,
(byte) 0X00, (byte) 0X08,
(byte) indexhigh, (byte) indexlow,
(byte) 0X01, (byte) 0X12,
(byte) 0X01, (byte) 0X19,
(byte) phasehigh, (byte) phaselow,
(byte) nextPointHigh,(byte) nextPointLow
};

View File

@@ -1195,7 +1195,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
return;
}
removeByCodeFromCache(entity.getInstruction_code());
taskService.cancel(entity.getTask_id());
// taskService.cancel(entity.getTask_id());
}
@Override

View File

@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* @author 20220102CG\noblelift
@@ -244,13 +245,12 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
@Override
public <T extends DeviceDriver> List<T> findDeviceDriver(Class<T> clazz) {
List<T> list = new ArrayList();
Iterator var3 = this.findAllDevice().iterator();
List<T> list = new ArrayList<>();
List<Device> devices = new CopyOnWriteArrayList<>(this.findAllDevice());
while (var3.hasNext()) {
Device device = (Device) var3.next();
for (Device device : devices) {
DeviceDriver deviceDriver = device.getDeviceDriver();
//查找某驱动的所有子类
// 查找某驱动的所有子类
if (deviceDriver != null && clazz.isAssignableFrom(deviceDriver.getClass())) {
list.add((T) device.getDeviceDriver());
}