From 24aa8d3202ff29434f31ab2a2f2b140602acfbaa Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 18 Jul 2024 15:07:44 +0800 Subject: [PATCH] update --- src/main/java/a8k/appbean/AppErrorCode.java | 12 +++-- .../a8k/appbean/appevent/AppStepNotifyEvent.java | 13 +++++ .../appbean/appevent/AppWarningNotifyEvent.java | 14 ++++++ .../a8k/service/hardware/HbotControlService.java | 57 +++++++++++++++++++++- 代码说明/20240718.txt | 7 ++- 5 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 src/main/java/a8k/appbean/appevent/AppStepNotifyEvent.java create mode 100644 src/main/java/a8k/appbean/appevent/AppWarningNotifyEvent.java diff --git a/src/main/java/a8k/appbean/AppErrorCode.java b/src/main/java/a8k/appbean/AppErrorCode.java index 5758a3d..ca6b0a9 100644 --- a/src/main/java/a8k/appbean/AppErrorCode.java +++ b/src/main/java/a8k/appbean/AppErrorCode.java @@ -1,21 +1,25 @@ package a8k.appbean; public enum AppErrorCode { - Success("Success", 0), //成功 - TubeNotHasHat("TubeNotHasHat", 1); //试管没有帽子 + Success("Success", "成功", 0), //成功 + TubeNotHasHat("TubeNotHasHat", "全血试管未盖帽", 1), //试管没有帽子 + SampleLiquidLevelWasNotDetected("SampleLiquidLevelWasNotDetected", "取样时未探测到液面", 2),//未探测到液面 + LargeBufferNotEnough("LargeBufferNotEnough", "大瓶缓冲液不足", 3); //未探测到液面 + final private String name; + final private String chName; final private int errorIndex; public int mid; - private AppErrorCode(String name, int errorIndex) { + private AppErrorCode(String name, String chname, int errorIndex) { this.name = name; + this.chName = chname; this.errorIndex = errorIndex; } - public String toString() { return name; } diff --git a/src/main/java/a8k/appbean/appevent/AppStepNotifyEvent.java b/src/main/java/a8k/appbean/appevent/AppStepNotifyEvent.java new file mode 100644 index 0000000..d17f708 --- /dev/null +++ b/src/main/java/a8k/appbean/appevent/AppStepNotifyEvent.java @@ -0,0 +1,13 @@ +package a8k.appbean.appevent; + +public class AppStepNotifyEvent extends AppEvent { + String displayInfo; + + AppStepNotifyEvent(String displayInfo) { + this.displayInfo = displayInfo; + } + + public String getDisplayInfo() { + return displayInfo; + } +} diff --git a/src/main/java/a8k/appbean/appevent/AppWarningNotifyEvent.java b/src/main/java/a8k/appbean/appevent/AppWarningNotifyEvent.java new file mode 100644 index 0000000..a9084d2 --- /dev/null +++ b/src/main/java/a8k/appbean/appevent/AppWarningNotifyEvent.java @@ -0,0 +1,14 @@ +package a8k.appbean.appevent; + +public class AppWarningNotifyEvent extends AppEvent { + String displayInfo; + + AppWarningNotifyEvent(String displayInfo) { + this.displayInfo = displayInfo; + } + + public String getDisplayInfo() { + return displayInfo; + } + +} diff --git a/src/main/java/a8k/service/hardware/HbotControlService.java b/src/main/java/a8k/service/hardware/HbotControlService.java index 95298af..c992ad8 100644 --- a/src/main/java/a8k/service/hardware/HbotControlService.java +++ b/src/main/java/a8k/service/hardware/HbotControlService.java @@ -1,21 +1,74 @@ package a8k.service.hardware; +import a8k.appbean.AppErrorCode; + /** * Hbot控制服务 */ public class HbotControlService { - public void moduleReset() { + /** + * 下面脚本中涉及到的动作,如果正常结束,Z轴均移动的0位置。 + */ + public void moduleReset() { } public void moduleEnable() { - } public void moduleDisable() { + } + + //取tip + public boolean takeTip(int groupId, int index) { + return false; + } + + //丢tip + public AppErrorCode dropTip() { + return AppErrorCode.Success; + } + //扫描板夹仓二维码 + public String scanPlatesCode(int index, int overtime) { + return ""; } + //扫描小缓冲液二维码 + public String scanSmallBottleBufferCode(int index, int overtime) { + return ""; + } + + //扫描大缓冲液二维码 + public String scanBigBottleBufferCode(int index, int overtime) { + return ""; + } + + //在试管架的位置取样品 + public boolean takeSampleFromPos0(int ul) { + return false; + + } + + //在摇匀位置取样品 + public boolean takeSampleFromPos1(int ul) { + return false; + } + + //取大屏缓冲液 + public boolean takeLargeBottleBuffer(int ul) { + return false; + } + + //取小屏缓冲液 + public boolean takeLilleBottleBuffer(int groupNum, int index, int ul) { + return false; + } + + //取小瓶缓冲液 + public boolean pierceLilleBottleBuffer(int groupNum, int index, int ul) { + return false; + } } diff --git a/代码说明/20240718.txt b/代码说明/20240718.txt index aedc53a..a7de323 100644 --- a/代码说明/20240718.txt +++ b/代码说明/20240718.txt @@ -21,4 +21,9 @@ 6.之前写的进出料控制,也改成类似的风格。(这个我没有改) 7.删除掉试管类型数据库,试管类型信息存储在A8kTubeType枚举中。试管架间距,参数也放在MotorTubeRackMoveCtrlServiceParameterDao中,(我没有删,你改完之后再删) -``` \ No newline at end of file +``` + +``` + 1. 添加AppWarningNotifyEvent,前端接收到该事件,弹窗显示dispalyInfo即可 + 2. 添加AppStepNotifyEvent,前端收到该事件,在页面的信息栏显示dispalyInfo即可。 + ``` \ No newline at end of file