commit
72b733f820
|
|
@ -0,0 +1,18 @@
|
|||
package com.engine.organization.enums;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/6/14
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface BaseEnum<T> {
|
||||
|
||||
String name();
|
||||
|
||||
T getValue();
|
||||
|
||||
Integer getLabelId();
|
||||
|
||||
String getDefaultLabel();
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ import java.util.List;
|
|||
**/
|
||||
public interface FieldDefinedService {
|
||||
|
||||
|
||||
List<TypeTreeDTO> getTree(String moduleName);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.engine.organization.util;
|
||||
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
|
||||
import com.engine.organization.enums.BaseEnum;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -41,11 +40,5 @@ public class OrganizationEnumUtil {
|
|||
return StringUtils.join(collect, ",");
|
||||
}
|
||||
|
||||
public static PaymentScopeEnum[] stringToEnums(String values, String charSequence) {
|
||||
String[] arr = values.split(charSequence);
|
||||
PaymentScopeEnum[] enumConstants = PaymentScopeEnum.values();
|
||||
List<PaymentScopeEnum> collect = Arrays.stream(arr)
|
||||
.map(item -> Arrays.stream(enumConstants).filter(s -> Objects.equals(String.valueOf(s.getValue()), item)).findFirst().get()).collect(Collectors.toList());
|
||||
return collect.toArray(new PaymentScopeEnum[collect.size()]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue