|
|
@@ -0,0 +1,52 @@
|
|
|
+package org.jeecg.modules.rooms.Enum;
|
|
|
+
|
|
|
+import org.jeecg.common.system.vo.DictModel;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+public enum TimeOutRuleEnum {
|
|
|
+ ADD_BY_MINUTE(1,"按分钟加收"),
|
|
|
+ ADD_BY_DAY(2,"按半天房费加收"),
|
|
|
+ NOT_ADD(3,"不收房费");
|
|
|
+
|
|
|
+ Integer key;
|
|
|
+
|
|
|
+ String title;
|
|
|
+
|
|
|
+ TimeOutRuleEnum(Integer key, String title){
|
|
|
+ this.key = key;
|
|
|
+ this.title = title;
|
|
|
+ }
|
|
|
+ public Integer getKey() {
|
|
|
+ return key;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTitle() {
|
|
|
+ return title;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取字典数据
|
|
|
+ */
|
|
|
+ public static List<DictModel> getDictList(){
|
|
|
+ List<DictModel> list = new ArrayList<>();
|
|
|
+ DictModel dictModel = null;
|
|
|
+ for(TimeOutRuleEnum e: TimeOutRuleEnum.values()){
|
|
|
+ dictModel = new DictModel();
|
|
|
+ dictModel.setValue(e.key.toString());
|
|
|
+ dictModel.setText(e.title);
|
|
|
+ list.add(dictModel);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static TimeOutRuleEnum val(Integer key){
|
|
|
+ for(TimeOutRuleEnum bld: values()){
|
|
|
+ if(bld.key .equals(key)){
|
|
|
+ return bld;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|