|
|
@@ -1,8 +1,11 @@
|
|
|
package com.zd.netty.sdk;
|
|
|
|
|
|
import com.gg.reader.api.dal.GClient;
|
|
|
+import com.gg.reader.api.dal.HandlerTagEpcLog;
|
|
|
+import com.gg.reader.api.dal.HandlerTagEpcOver;
|
|
|
import com.gg.reader.api.protocol.gx.*;
|
|
|
import com.zd.common.core.exception.ServiceException;
|
|
|
+import com.zd.common.core.utils.SpringUtils;
|
|
|
import com.zd.netty.service.ISendService;
|
|
|
import com.zd.netty.service.IService;
|
|
|
import com.zd.netty.thread.ThreadPoolTaskConfig;
|
|
|
@@ -11,14 +14,13 @@ import com.zd.system.api.laboratory.domain.RemoteLabHardware;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.Hashtable;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
-import java.util.TimerTask;
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
+import java.util.concurrent.ScheduledExecutorService;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Slf4j
|
|
|
@@ -30,8 +32,7 @@ public class DeJuRFIDService implements IService {
|
|
|
|
|
|
private final Map<String, GClient> clientMap = new ConcurrentHashMap<>();
|
|
|
|
|
|
- @Resource
|
|
|
- private ThreadPoolTaskConfig threadPoolTaskConfig;
|
|
|
+ private final ScheduledExecutorService scheduledExecutorService= SpringUtils.getBean("scheduledExecutorService");
|
|
|
|
|
|
@Override
|
|
|
public void start(RemoteLabHardware hardware) {
|
|
|
@@ -161,7 +162,7 @@ public class DeJuRFIDService implements IService {
|
|
|
}
|
|
|
|
|
|
public void stopGpo(GClient client){
|
|
|
- threadPoolTaskConfig.scheduledExecutorService().schedule(new TimerTask() {
|
|
|
+ scheduledExecutorService.schedule(new TimerTask() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
changeGpo(0, client);
|