package com.qianwen.smartman.modules.dnc.enums;
|
|
import java.util.Arrays;
|
import com.qianwen.smartman.common.constant.CommonConstant;
|
import com.qianwen.smartman.common.constant.DncConstant;
|
import com.qianwen.core.tool.utils.Func;
|
|
public class DncEnums {
|
|
|
public enum FtpHierarchy {
|
TRANSFER_DIRECTORY(2, "传输目录"),
|
CRAFT_DOCUMENT(3, DncConstant.PROCESS_FILE_NAME);
|
|
private final Integer code;
|
private final String name;
|
|
FtpHierarchy(final Integer code, final String name) {
|
this.code = code;
|
this.name = name;
|
}
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
public static FtpHierarchy findByCode(Integer code) {
|
return (FtpHierarchy) Arrays.stream(values()).filter(c -> {
|
return Func.isNotEmpty(code) && c.getCode().equals(code);
|
}).findAny().orElse(TRANSFER_DIRECTORY);
|
}
|
}
|
|
public enum CurrentVersion {
|
NO(0, "否"),
|
YES(1, "是");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
CurrentVersion(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
|
public enum LogOperationType {
|
UPLOAD(1, "上传"),
|
DOWNLOAD(2, "下载"),
|
DELETE(3, "删除"),
|
TO_UPDATE(4, "更新"),
|
MOVE(5, "移动"),
|
COPY(6, "复制");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
LogOperationType(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
|
public enum LogFileSourceType {
|
LOCAL_FILE(0, "本地文件"),
|
MY_DOCUMENTS(1, "我的文档"),
|
PROCESSING_PROGRAM(2, DncConstant.WORK_STATION_FILE),
|
STATION_FILE(3, "工厂文件"),
|
FTP(4, "机床回传"),
|
ART_BAG(5, "工艺包");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
LogFileSourceType(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
public enum FileSource {
|
LOCAL_FILE(1, "本地文件"),
|
MY_DOCUMENTS(2, "我的文档"),
|
PROCESSING_PROGRAM(3, "工艺管理"),
|
FTP(4, "机床回传");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
FileSource(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
public enum FileType {
|
PROCESSING_PROGRAM(1, "程序"),
|
PROCESS_DOCUMENTS(2, "文档");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
FileType(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
|
public enum FileBelong {
|
FACTORY(1, CommonConstant.FACTORY),
|
WORKSTATION(2, CommonConstant.WORKSTATION);
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
FileBelong(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("-");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$Storage.class */
|
public enum Storage {
|
FIXED(1, "固定空间"),
|
COMMON(2, "常规空间");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
Storage(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("-");
|
}
|
}
|
|
|
public enum OperationResponse {
|
SUCCESS(1, "成功"),
|
FAIL(0, "失败");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
OperationResponse(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$IsCurrent.class */
|
public enum IsCurrent {
|
YES(1, true),
|
NO(0, false);
|
|
private final Integer code;
|
private final Boolean desc;
|
|
IsCurrent(final Integer code, final Boolean desc) {
|
this.code = code;
|
this.desc = desc;
|
}
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public Boolean getDesc() {
|
return this.desc;
|
}
|
|
public static IsCurrent findByDesc(Boolean desc) {
|
IsCurrent[] values = values();
|
for (IsCurrent value : values) {
|
if (value.desc.equals(desc)) {
|
return value;
|
}
|
}
|
return null;
|
}
|
|
public static IsCurrent findByCode(Integer desc) {
|
IsCurrent[] values = values();
|
for (IsCurrent value : values) {
|
if (value.code.equals(desc)) {
|
return value;
|
}
|
}
|
return null;
|
}
|
}
|
|
|
public enum StorageSpace {
|
ROUTINE(1, "常规空间"),
|
FIXED(2, "固定空间");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
StorageSpace(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$FileLocation.class */
|
public enum FileLocation {
|
INTERNAL_STORAGE(1, "内部存储"),
|
ETHERNET(2, "以太网");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
FileLocation(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
|
public enum FileOwnership {
|
WORKSTATION(1, CommonConstant.WORKSTATION),
|
FACTORY(2, CommonConstant.FACTORY);
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
FileOwnership(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$ArtBagFileSource.class */
|
public enum ArtBagFileSource {
|
MY_DOCUMENTS(1, "我的文档"),
|
WORKSTATION_FILE(2, DncConstant.WORK_STATION_FILE),
|
LOCAL_FILE(3, "本地上传"),
|
ARCHIVE_FILE(4, "归档文件");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
ArtBagFileSource(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$TodoType.class */
|
public enum TodoType {
|
ADD(1, "添加"),
|
COVER(2, "覆盖"),
|
DEL(3, "删除");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
TodoType(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public static String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
|
public enum WhetherArchive {
|
Archive(1, "未归档"),
|
not_Archive(2, "已归档");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
WhetherArchive(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/enums/DncEnums$SupportCncRw.class */
|
public enum SupportCncRw {
|
Support(1, "支持"),
|
not_Support(2, "不支持");
|
|
private final Integer code;
|
private final String name;
|
|
public Integer getCode() {
|
return this.code;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
SupportCncRw(int code, String name) {
|
this.code = Integer.valueOf(code);
|
this.name = name;
|
}
|
|
public String getNameByCode(Integer code) {
|
return (String) Arrays.stream(values()).filter(o -> {
|
return Func.isNotEmpty(code) && code.equals(o.getCode());
|
}).map((v0) -> {
|
return v0.getName();
|
}).findFirst().orElse("");
|
}
|
}
|
}
|