|
|
@ -3,9 +3,11 @@ package a8k.service.appcfgs; |
|
|
|
import a8k.appbase.appret.AppRet; |
|
|
|
import a8k.controler.engineer.utils.EngineerPageTab; |
|
|
|
import a8k.controler.engineer.utils.EnginnerPageAction; |
|
|
|
import a8k.service.base.BloodType; |
|
|
|
import a8k.service.base.samplecfg.SampleTubeCfg; |
|
|
|
import a8k.service.base.samplecfg.SampleTubeHolderCfg; |
|
|
|
import a8k.service.appcfgs.base.A8kDeviceCfg; |
|
|
|
import a8k.service.appcfgs.base.EmergencyCfg; |
|
|
|
import a8k.appbase.type.BloodType; |
|
|
|
import a8k.service.appcfgs.base.SampleTubeCfg; |
|
|
|
import a8k.service.appcfgs.base.SampleTubeHolderCfg; |
|
|
|
import a8k.service.hardware.canbus.protocol.A8kEcode; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
@ -37,26 +39,26 @@ public class A8kDeviceCfgMgrService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "获取设备配置",group = "基础",groupOrder = 1) |
|
|
|
@EnginnerPageAction(name = "获取设备配置", group = "基础", groupOrder = 1) |
|
|
|
public A8kDeviceCfg getA8kDeviceCfg() { |
|
|
|
return deviceCfg; |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "添加<试管架>配置",group = "试管架",groupOrder = 2) |
|
|
|
@EnginnerPageAction(name = "添加<试管架>配置", group = "试管架", groupOrder = 2) |
|
|
|
public AppRet<SampleTubeHolderCfg> addCfg() { |
|
|
|
SampleTubeHolderCfg cfg = new SampleTubeHolderCfg(); |
|
|
|
deviceCfg.cfgs.add(cfg); |
|
|
|
return AppRet.success(cfg); |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "删除<试管架>配置",group = "试管架") |
|
|
|
@EnginnerPageAction(name = "删除<试管架>配置", group = "试管架") |
|
|
|
public AppRet<Object> removeCfg(String tubeHolderCfgUUID) { |
|
|
|
dbRemoveCfg(tubeHolderCfgUUID); |
|
|
|
return AppRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "激活<试管架>配置",group = "试管架") |
|
|
|
@EnginnerPageAction(name = "激活<试管架>配置", group = "试管架") |
|
|
|
public AppRet<SampleTubeHolderCfg> activeCfg(String tubeHolderCfgUUID, Boolean active) { |
|
|
|
SampleTubeHolderCfg cfg = dbFindCfg(tubeHolderCfgUUID); |
|
|
|
if (cfg == null) { |
|
|
@ -67,7 +69,7 @@ public class A8kDeviceCfgMgrService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "修改<试管>用户信息配置",group = "试管",groupOrder = 3) |
|
|
|
@EnginnerPageAction(name = "修改<试管>用户信息配置", group = "试管", groupOrder = 3) |
|
|
|
public AppRet<SampleTubeCfg> updateTubeUsrCfg(String uuid, Integer tubeIndex, String udpid, String barcodeid) { |
|
|
|
SampleTubeHolderCfg cfg = dbFindCfg(uuid); |
|
|
|
assert cfg != null; |
|
|
@ -77,7 +79,7 @@ public class A8kDeviceCfgMgrService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EnginnerPageAction(name = "清除<试管>项目信息",group = "试管") |
|
|
|
@EnginnerPageAction(name = "清除<试管>项目信息", group = "试管") |
|
|
|
public AppRet<SampleTubeCfg> clearTubeProjectCfg(String uuid, Integer tubeIndex) { |
|
|
|
SampleTubeHolderCfg cfg = dbFindCfg(uuid); |
|
|
|
assert cfg != null; |
|
|
@ -86,7 +88,7 @@ public class A8kDeviceCfgMgrService { |
|
|
|
return AppRet.success(cfg.tubeCfgs.get(tubeIndex)); |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "添加<试管>项目信息",group = "试管") |
|
|
|
@EnginnerPageAction(name = "添加<试管>项目信息", group = "试管") |
|
|
|
public AppRet<SampleTubeCfg> addTubeProjectCode(String uuid, Integer tubeIndex, String pjc) { |
|
|
|
SampleTubeHolderCfg cfg = dbFindCfg(uuid); |
|
|
|
assert cfg != null; |
|
|
@ -96,7 +98,7 @@ public class A8kDeviceCfgMgrService { |
|
|
|
return AppRet.success(tubeCfg); |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "设置<试管>血型",group = "试管") |
|
|
|
@EnginnerPageAction(name = "设置<试管>血型", group = "试管") |
|
|
|
public AppRet<SampleTubeCfg> setTubeBloodType(String uuid, Integer tubeIndex, BloodType bloodType) { |
|
|
|
SampleTubeCfg tubeCfg = dbFindTubeCfg(uuid, tubeIndex); |
|
|
|
assert tubeCfg != null; |
|
|
@ -104,4 +106,14 @@ public class A8kDeviceCfgMgrService { |
|
|
|
return AppRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "获取<急诊位>配置", group = "急诊位", groupOrder = 4) |
|
|
|
public AppRet<EmergencyCfg> getEmergencyCfg() { |
|
|
|
return AppRet.success(deviceCfg.emergencyCfg); |
|
|
|
} |
|
|
|
|
|
|
|
@EnginnerPageAction(name = "添加<急诊位>配置", group = "急诊位") |
|
|
|
public AppRet<EmergencyCfg> addEmergencyCfg(EmergencyCfg cfg) { |
|
|
|
deviceCfg.emergencyCfg = cfg; |
|
|
|
return AppRet.success(deviceCfg.emergencyCfg); |
|
|
|
} |
|
|
|
} |