1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| 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.entity.OrderSettle;
| import com.zy.asrs.wms.asrs.service.LocStsService;
| import com.zy.asrs.wms.asrs.service.OrderSettleService;
|
| public enum OrderSettleType {
|
| INIT(0, "初始化"),
| WAIT(1, "待处理"),
| WAVE(2, "波次生成"),
| WORKING(3, "作业中"),
| CANCEL(4, "已取消"),
| COMPLETE(5, "已完成"),
| WAIT_CANCEL(6, "准备取消"),
| REPORT_COMPLETE(7, "上报完成"),
| ;
|
|
| public Integer id;
| public String desc;
|
| OrderSettleType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public long val() {
| OrderSettleService service = SpringUtils.getBean(OrderSettleService.class);
| OrderSettle orderSettle = service.getOne(new LambdaQueryWrapper<OrderSettle>().eq(OrderSettle::getSettle, id));
| if (orderSettle == null) {
| throw new CoolException("LocStsType Error!");
| }
| return orderSettle.getId();
| }
|
|
| }
|
|