rev:修改配置
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.sch.task_manage.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.dict.dao.Dict;
|
||||
@@ -17,26 +18,20 @@ import java.util.List;
|
||||
public enum GroupBindMaterialStatusEnum {
|
||||
/**
|
||||
* 待绑定
|
||||
*/WAIT_BIND,
|
||||
*/WAIT_BIND("1","待绑定"),
|
||||
/**
|
||||
* 已绑定
|
||||
*/BOUND,
|
||||
*/BOUND("2","已绑定"),
|
||||
/**
|
||||
* 已解绑
|
||||
*/UNBOUND;
|
||||
*/UNBOUND("3","已解绑");
|
||||
|
||||
GroupBindMaterialStatusEnum(String value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
private String value;
|
||||
private String label;
|
||||
|
||||
static {
|
||||
SysDictServiceImpl bean = SpringContextHolder.getBean(SysDictServiceImpl.class);
|
||||
List<Dict> taskDirection = bean.list(new LambdaQueryWrapper<Dict>()
|
||||
.eq(Dict::getCode, "group_bind_material_status")
|
||||
.orderByAsc(Dict::getDict_sort));
|
||||
GroupBindMaterialStatusEnum[] values = GroupBindMaterialStatusEnum.values();
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
values[i].value = taskDirection.get(i).getValue();
|
||||
values[i].label = taskDirection.get(i).getLabel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user