Commit 121233cd authored by 赵啸非's avatar 赵啸非

添加样表设备列表

parent a1bad497
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备来源(0.旧设备,1.新设备)枚举类
*
* @author zxfei
*/
public enum DeviceSourceEnum {
旧设备(0, "旧设备"),
新设备(1, "新设备");
private Integer value;
private String desc;
DeviceSourceEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceSourceEnum getByValue(Integer value) {
for (DeviceSourceEnum sourceEnum : DeviceSourceEnum.values()) {
if (sourceEnum.getValue() == value) {
return sourceEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceSourceEnum item : DeviceSourceEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
...@@ -4,13 +4,13 @@ import java.util.LinkedHashMap; ...@@ -4,13 +4,13 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
/** /**
* 设备来源(0.旧设备,1.新设备)枚举类 * 事项来源 (0.政务网,1.自定义)枚举类
* *
* @author zxfei * @author zxfei
*/ */
public enum SourceEnum { public enum SourceEnum {
旧设备(0, "旧设备"), 政务网(0, "政务网"),
新设备(1, "新设备"); 自定义(1, "自定义");
private Integer value; private Integer value;
private String desc; private String desc;
......
...@@ -6,7 +6,6 @@ import com.mortals.framework.exception.AppException; ...@@ -6,7 +6,6 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.common.code.MatterSourceEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.matter.dao.MatterDao; import com.mortals.xhx.module.matter.dao.MatterDao;
...@@ -18,7 +17,6 @@ import com.mortals.xhx.module.matter.service.MatterDatumService; ...@@ -18,7 +17,6 @@ import com.mortals.xhx.module.matter.service.MatterDatumService;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
import com.mortals.xhx.module.sheet.service.SheetMatterService; import com.mortals.xhx.module.sheet.service.SheetMatterService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment