From a2c3c7a3032ac93bbcfd83f055b036f7e8b6c20b Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期三, 27 七月 2022 18:13:00 +0800
Subject: [PATCH] fix

---
 goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/utils/poihelper/ExcelCell.java |   81 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/utils/poihelper/ExcelCell.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/utils/poihelper/ExcelCell.java
new file mode 100644
index 0000000..845449a
--- /dev/null
+++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/utils/poihelper/ExcelCell.java
@@ -0,0 +1,81 @@
+package com.gkhy.safePlatform.targetDuty.utils.poihelper;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * The <code>ExcelCell</code><br>
+ * 数值型的栏位只能使用Double
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface ExcelCell {
+    /**
+     * 顺序 default 100
+     * 
+     * @return index
+     */
+    int index();
+
+    /**
+     * 当值为null时要显示的值 default StringUtils.EMPTY
+     * 
+     * @return defaultValue
+     */
+    String defaultValue() default "";
+
+    /**
+     * 用于验证
+     * 
+     * @return valid
+     */
+    Valid valid() default @Valid();
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.FIELD)
+    @interface Valid {
+        /**
+         * 必须与in中String相符,目前仅支持String类型
+         * 
+         * @return e.g. {"key","value"}
+         */
+        String[] in() default {};
+
+        /**
+         * 是否允许为空,用于验证数据 default true
+         * 
+         * @return allowNull
+         */
+        boolean allowNull() default true;
+
+        /**
+         * Apply a "greater than" constraint to the named property
+         * 
+         * @return gt
+         */
+        double gt() default Double.NaN;
+
+        /**
+         * Apply a "less than" constraint to the named property
+         * @return lt
+         */
+        double lt() default Double.NaN;
+
+        /**
+         * Apply a "greater than or equal" constraint to the named property
+         * 
+         * @return ge
+         */
+        double ge() default Double.NaN;
+
+        /**
+         * Apply a "less than or equal" constraint to the named property
+         * 
+         * @return le
+         */
+        double le() default Double.NaN;
+    }
+}

--
Gitblit v1.9.2