From f14d9737da8bbe94e82427f2d0e727fd15c88f2e Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 23 九月 2024 11:44:35 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevRentStateEnum.java | 43 +++++++++++++++++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/devmanage/DeviceDO.java | 5 ++
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevStateEnum.java | 41 ++++++++++++++++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceRespVO.java | 7 +++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DevicePageReqVO.java | 6 +++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceSaveReqVO.java | 6 +++
6 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevRentStateEnum.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevRentStateEnum.java
new file mode 100644
index 0000000..a3f085a
--- /dev/null
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevRentStateEnum.java
@@ -0,0 +1,43 @@
+package cn.lihu.jh.module.ecg.enums;
+
+import cn.hutool.core.util.ObjUtil;
+import cn.lihu.jh.framework.common.core.IntArrayValuable;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+
+/**
+ * 閫氱敤鐘舵�佹灇涓�
+ *
+ * @author 鑺嬮亾婧愮爜
+ */
+@Getter
+@AllArgsConstructor
+public enum DevRentStateEnum implements IntArrayValuable {
+ FREE(0, "寰呰鏈�"),
+ INSTALLED(10, "宸茶鏈�"),
+ DISMANTLED(20, "宸叉媶鏈�"),
+ CANCELLED(30, "宸叉斁寮�"),
+ LOST(40, "宸查仐澶�");
+
+ public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DevRentStateEnum::getState).toArray();
+
+ /**
+ * 鐘舵�佸��
+ */
+ private final Integer state;
+ /**
+ * 鐘舵�佸悕
+ */
+ private final String name;
+
+ @Override
+ public int[] array() {
+ return ARRAYS;
+ }
+
+ public boolean isEqual(Integer state) {
+ return ObjUtil.equal(this.state, state);
+ }
+}
diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevStateEnum.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevStateEnum.java
new file mode 100644
index 0000000..24d45d1
--- /dev/null
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/DevStateEnum.java
@@ -0,0 +1,41 @@
+package cn.lihu.jh.module.ecg.enums;
+
+import cn.hutool.core.util.ObjUtil;
+import cn.lihu.jh.framework.common.core.IntArrayValuable;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+
+/**
+ * 閫氱敤鐘舵�佹灇涓�
+ *
+ * @author 鑺嬮亾婧愮爜
+ */
+@Getter
+@AllArgsConstructor
+public enum DevStateEnum implements IntArrayValuable {
+ FREE(0, "绌洪棽"),
+ INUSE(10, "浣跨敤涓�"),
+ LOST(20, "宸查仐澶�");
+
+ public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DevStateEnum::getState).toArray();
+
+ /**
+ * 鐘舵�佸��
+ */
+ private final Integer state;
+ /**
+ * 鐘舵�佸悕
+ */
+ private final String name;
+
+ @Override
+ public int[] array() {
+ return ARRAYS;
+ }
+
+ public boolean isEqual(Integer state) {
+ return ObjUtil.equal(this.state, state);
+ }
+}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DevicePageReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DevicePageReqVO.java
index d5c3ddf..d70f024 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DevicePageReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DevicePageReqVO.java
@@ -44,4 +44,10 @@
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate loseDate[];
+ /**
+ * 0 - 绌洪棽 10 - 浣跨敤涓� 20 - 宸查仐澶�
+ */
+ @Schema(description = "鐘舵��")
+ private Integer state;
+
}
\ No newline at end of file
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceRespVO.java
index 8c0a3d0..70235e7 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceRespVO.java
@@ -49,4 +49,11 @@
@Schema(description = "閬楀け鏃ユ湡")
@ExcelProperty("閬楀け鏃ユ湡")
private LocalDate loseDate;
+
+ /**
+ * 0 - 绌洪棽 10 - 浣跨敤涓� 20 - 宸查仐澶�
+ */
+ @Schema(description = "鐘舵��")
+ @ExcelProperty("鐘舵��")
+ private Integer state;
}
\ No newline at end of file
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceSaveReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceSaveReqVO.java
index 545e03f..da52530 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceSaveReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devmanage/vo/DeviceSaveReqVO.java
@@ -37,4 +37,10 @@
@Schema(description = "閬楀け鏍囪")
private Integer lost;
+ /**
+ * 0 - 绌洪棽 10 - 浣跨敤涓� 20 - 宸查仐澶�
+ */
+ @Schema(description = "鐘舵��")
+ private Integer state;
+
}
\ No newline at end of file
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/devmanage/DeviceDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/devmanage/DeviceDO.java
index 501bdba..2b15ab5 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/devmanage/DeviceDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/devmanage/DeviceDO.java
@@ -59,4 +59,9 @@
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDate loseDate;
+
+ /**
+ * 0 - 绌洪棽 10 - 浣跨敤涓� 20 - 宸查仐澶�
+ */
+ private Integer state;
}
--
Gitblit v1.9.3