|
|
@@ -18,6 +18,7 @@ import com.zd.laboratory.api.vo.HardwareCVO;
|
|
|
import com.zd.laboratory.api.vo.LabSubClassVO;
|
|
|
import com.zd.laboratory.api.vo.SenseValVO;
|
|
|
import com.zd.laboratory.config.HardwareFunctionStatusConfig;
|
|
|
+import com.zd.laboratory.config.TimeWaitConfigUtils;
|
|
|
import com.zd.laboratory.domain.*;
|
|
|
import com.zd.laboratory.domain.dto.LabSubListQuery;
|
|
|
import com.zd.laboratory.domain.vo.*;
|
|
|
@@ -115,7 +116,8 @@ public class LabSubjectManagerService {
|
|
|
private SocketService socketService;
|
|
|
@Autowired
|
|
|
private ILabControlService labControlService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private TimeWaitConfigUtils timeWaitConfigUtils;
|
|
|
|
|
|
public LabSubjectManagerService(List<ControlService> controlServices) {
|
|
|
controlServiceMap = controlServices.stream().collect(Collectors.toMap(a -> a.comTypeEnums(), Function.identity()));
|
|
|
@@ -128,7 +130,7 @@ public class LabSubjectManagerService {
|
|
|
logger.info("异步线程处理硬件信息:id={},name={}",Thread.currentThread().getId(),Thread.currentThread().getName());
|
|
|
for (LabHardware hard : hardwareList) {
|
|
|
ResultData result = excutingComm(hard, status);
|
|
|
- Thread.sleep(1000);
|
|
|
+ Thread.sleep(timeWaitConfigUtils.getWaitTime());
|
|
|
}
|
|
|
} catch (InterruptedException e) {
|
|
|
logger.error("异步处理硬件异常!",e);
|