| | |
| | | package com.zy.asrs.wms.asrs.entity.enums; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wms.asrs.entity.LocSts; |
| | | import com.zy.asrs.wms.asrs.service.LocStsService; |
| | | |
| | | public enum LocStsType { |
| | | |
| | | D,//空板 |
| | | F,//在库 |
| | | O,//空库 |
| | | X,//禁用 |
| | | S,//入库预约 |
| | | R,//出库预约 |
| | | ; |
| | | |
| | | LocStsType() { |
| | | } |
| | | |
| | | public long val() { |
| | | LocStsService service = SpringUtils.getBean(LocStsService.class); |
| | | LocSts locSts = service.getOne(new LambdaQueryWrapper<LocSts>().eq(LocSts::getLocSts, this.toString())); |
| | | if (locSts == null) { |
| | | throw new CoolException("LocStsType Error!"); |
| | | } |
| | | return locSts.getId(); |
| | | } |
| | | |
| | | public static LocStsType get(String el) { |
| | | for (LocStsType value : LocStsType.values()) { |
| | | if (el.equals(value.toString())) { |
| | | return value; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | | package com.zy.asrs.wms.asrs.entity.enums;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.zy.asrs.framework.common.SpringUtils;
|
| | | import com.zy.asrs.framework.exception.CoolException;
|
| | | import com.zy.asrs.wms.asrs.entity.LocSts;
|
| | | import com.zy.asrs.wms.asrs.service.LocStsService;
|
| | |
|
| | | public enum LocStsType {
|
| | |
|
| | | D,//空板
|
| | | F,//在库
|
| | | O,//空库
|
| | | X,//禁用
|
| | | S,//入库预约
|
| | | R,//出库预约
|
| | | ;
|
| | |
|
| | | LocStsType() {
|
| | | }
|
| | |
|
| | | public long val() {
|
| | | LocStsService service = SpringUtils.getBean(LocStsService.class);
|
| | | LocSts locSts = service.getOne(new LambdaQueryWrapper<LocSts>().eq(LocSts::getLocSts, this.toString()));
|
| | | if (locSts == null) {
|
| | | throw new CoolException("LocStsType Error!");
|
| | | }
|
| | | return locSts.getId();
|
| | | }
|
| | |
|
| | | public static LocStsType get(String el) {
|
| | | for (LocStsType value : LocStsType.values()) {
|
| | | if (el.equals(value.toString())) {
|
| | | return value;
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | }
|