1. 新增生成自有组织 CODE,同步其他系统额外生成编码映射关系
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.system.enums.dept;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 外部系统 / 平台枚举
|
||||
* <p>
|
||||
* 与字典类型 {@code system_dept_external_system} 对应,用于声明常用的平台标识,便于代码与前端字典对齐。
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ExternalPlatformEnum {
|
||||
|
||||
ERP("ERP", "企业资源计划"),
|
||||
IWORK("IWORK", "iWork 同步");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
public static boolean isValid(String code) {
|
||||
if (code == null) {
|
||||
return false;
|
||||
}
|
||||
for (ExternalPlatformEnum item : values()) {
|
||||
if (item.code.equalsIgnoreCase(code.trim())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user