Browse Source

完善虚拟模式

master
zhaohe 4 days ago
parent
commit
39ca609455
  1. 2
      src/main/java/a8k/app/controler/api/v1/app/ws/AppWebSocketEndpointMgr.java
  2. 5
      src/main/java/a8k/app/service/background/ProjIDCardCtrlAndMonitorService.java
  3. 14
      src/main/java/a8k/app/service/data/ProjIdCardInfoMgrService.java
  4. 2
      src/main/java/a8k/app/service/data/SubModuleRegInitialValueMgrService.java
  5. 55
      src/main/java/a8k/extui/page/extapp/UsrOperationSimulationPage.java

2
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();
}
});

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

14
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 {

2
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;
}

55
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);

Loading…
Cancel
Save