diff --git a/src/main/java/a8k/app/controler/api/v1/app/ws/AppWebSocketEndpointMgr.java b/src/main/java/a8k/app/controler/api/v1/app/ws/AppWebSocketEndpointMgr.java index 962a1c9..9da242d 100644 --- a/src/main/java/a8k/app/controler/api/v1/app/ws/AppWebSocketEndpointMgr.java +++ b/src/main/java/a8k/app/controler/api/v1/app/ws/AppWebSocketEndpointMgr.java @@ -145,6 +145,8 @@ public class AppWebSocketEndpointMgr { eventBus.regListener((AppEvent event) -> { if (event instanceof AppLoginEvent) { forceUpdateCnt.incrementAndGet(); + forceUpdateCnt.incrementAndGet(); + } }); diff --git a/src/main/java/a8k/app/service/background/ProjIDCardCtrlAndMonitorService.java b/src/main/java/a8k/app/service/background/ProjIDCardCtrlAndMonitorService.java index 4b618d9..3281ca7 100644 --- a/src/main/java/a8k/app/service/background/ProjIDCardCtrlAndMonitorService.java +++ b/src/main/java/a8k/app/service/background/ProjIDCardCtrlAndMonitorService.java @@ -5,6 +5,7 @@ import a8k.app.factory.ZAppPromptFactory; import a8k.app.iflytophald.type.protocol.A8kPacket; import a8k.app.iflytophald.type.protocol.CmdId; import a8k.app.iflytophald.type.protocol.MId; +import a8k.app.service.data.ProjIdCardInfoMgrService; import a8k.app.service.data.ProjInfoMgrService; import a8k.app.service.statemgr.GStateMgrService; import a8k.app.type.appevent.*; @@ -30,8 +31,8 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor public class ProjIDCardCtrlAndMonitorService { - private final A8kCanBusBaseDriver canBus; - private final AppEventBusService eventBus; + private final A8kCanBusBaseDriver canBus; + private final AppEventBusService eventBus; private final A8kIdCardDataParseService idCardDataParseService; private final ProjInfoMgrService projInfoMgrService; private final GStateMgrService gstat; diff --git a/src/main/java/a8k/app/service/data/ProjIdCardInfoMgrService.java b/src/main/java/a8k/app/service/data/ProjIdCardInfoMgrService.java index 665cca6..a399f2a 100644 --- a/src/main/java/a8k/app/service/data/ProjIdCardInfoMgrService.java +++ b/src/main/java/a8k/app/service/data/ProjIdCardInfoMgrService.java @@ -18,6 +18,7 @@ import a8k.app.dao.type.combination.ProjBuildInInfo; import a8k.app.service.utils.ZAppChecker; import a8k.app.utils.DoubleUtils; import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -26,15 +27,16 @@ import java.util.List; @Slf4j @Component +@RequiredArgsConstructor public class ProjIdCardInfoMgrService { - @Resource - GStateMgrService gstate; - @Resource - ProjIDCardCtrlAndMonitorService projIDCardCtrlAndMonitorService; + private final GStateMgrService gstate; - @Resource - A8kProjExtInfoCardDao a8KProjExtInfoCardDao; + + private final ProjIDCardCtrlAndMonitorService projIDCardCtrlAndMonitorService; + + + private final A8kProjExtInfoCardDao a8KProjExtInfoCardDao; public void saveMountedProjInfoCard() throws AppException { diff --git a/src/main/java/a8k/app/service/data/SubModuleRegInitialValueMgrService.java b/src/main/java/a8k/app/service/data/SubModuleRegInitialValueMgrService.java index f950a93..eebf6ab 100644 --- a/src/main/java/a8k/app/service/data/SubModuleRegInitialValueMgrService.java +++ b/src/main/java/a8k/app/service/data/SubModuleRegInitialValueMgrService.java @@ -96,7 +96,7 @@ public class SubModuleRegInitialValueMgrService { public void syncAllInputIOConfig() throws AppException { log.info("===SyncAllInputIOConfig==="); - if (gStateMgrService.isInMode(DeviceRunMode.RealMode)) { + if (!gStateMgrService.isInMode(DeviceRunMode.RealMode)) { return; } diff --git a/src/main/java/a8k/extui/page/extapp/UsrOperationSimulationPage.java b/src/main/java/a8k/extui/page/extapp/UsrOperationSimulationPage.java index 8ac5bfb..efcc293 100644 --- a/src/main/java/a8k/extui/page/extapp/UsrOperationSimulationPage.java +++ b/src/main/java/a8k/extui/page/extapp/UsrOperationSimulationPage.java @@ -17,30 +17,19 @@ import a8k.extui.mgr.ExtApiPageMgr; import a8k.app.teststate.TestStateMgrService; import jakarta.annotation.PostConstruct; import jakarta.annotation.Resource; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @Component +@RequiredArgsConstructor +@Slf4j public class UsrOperationSimulationPage { - @Resource - ConsumablesMgrService consumablesMgrService; - - @Resource - AppConsumablesScanService appConsumablesScanService; - - @Resource - ProjIdCardInfoMgrService projIdCardInfoMgrService; - - @Resource - GStateMgrService gstate; - - - @Resource - ProjInfoMgrService projInfoMgrService; - @Resource - ExtApiPageMgr extApiPageMgr; - @Resource - TestStateMgrService testStateMgrService; + private final GStateMgrService gstate; + private final ExtApiPageMgr extApiPageMgr; + private final TestStateMgrService testStateMgrService; + private final ProjIdCardInfoMgrService projIdCardInfoMgrService; // @@ -51,6 +40,31 @@ public class UsrOperationSimulationPage { testStateMgrService.putVirtualConsumable(group.off, lotid); } + public void putInVirtualConsumableSmart() throws AppException { + gstate.checkIfIsInVirtualMode(); + + ProjExtInfoCard hsCrpInfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(1, "CA00001"); + ProjExtInfoCard PCTInfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(2, "PC00001");// + ProjExtInfoCard TSHInfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(3, "TS00001");// + ProjExtInfoCard PLInfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(4, "PL00001");// + ProjExtInfoCard T3InfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(5, "T300001");// + ProjExtInfoCard T4InfoCard = ProjExtInfoCardFactory.buildProjExtInfoCard(6, "T400001");// + + projIdCardInfoMgrService.saveProjExtInfoCard(hsCrpInfoCard); + projIdCardInfoMgrService.saveProjExtInfoCard(PCTInfoCard); + projIdCardInfoMgrService.saveProjExtInfoCard(TSHInfoCard); + projIdCardInfoMgrService.saveProjExtInfoCard(PLInfoCard); + projIdCardInfoMgrService.saveProjExtInfoCard(T3InfoCard); + projIdCardInfoMgrService.saveProjExtInfoCard(T4InfoCard); + + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG1.off, hsCrpInfoCard.lotId); + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG2.off, PCTInfoCard.lotId); + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG3.off, TSHInfoCard.lotId); + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG4.off, PLInfoCard.lotId); + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG5.off, T3InfoCard.lotId); + testStateMgrService.putVirtualConsumable(ConsumableGroup.CG6.off, T4InfoCard.lotId); + } + public void takeAwayVirtualConsumable() throws AppException { gstate.checkIfIsInVirtualMode(); testStateMgrService.takeAwayVirtualConsumable(0); @@ -108,11 +122,14 @@ public class UsrOperationSimulationPage { page.newGroup("耗材操作行为"); page.addFunction("放入虚拟耗材", this::putInVirtualConsumable); page.addFunction("拿走虚拟耗材", this::takeAwayVirtualConsumable); + page.addFunction("放入虚拟耗材(智能)", this::putInVirtualConsumableSmart); + page.newGroup("ID卡"); page.addFunction("插入ID卡", this::insertVirtualIdCard); page.addFunction("拔出ID卡", this::removeVirtualIdCard); + page.newGroup("样本模拟操作"); page.addFunction("放入一个全血高试管架", this::putInVirtualBloodTubeHolder);