#
zjj
2025-04-08 3df03c486fde77ab36b9298a94bdbb0aa065a7e2
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
package com.zy.asrs.wcs.core.model.enums;
 
 
import com.zy.asrs.framework.common.SpringUtils;
import com.zy.asrs.framework.exception.CoolException;
import com.zy.asrs.wcs.core.entity.MotionSts;
import com.zy.asrs.wcs.core.service.MotionStsService;
 
public enum MotionStsType {
 
    INIT,
    WAITING,
    EXECUTING,
    COMPLETE,
    CANCEL,
    ERROR,
    ;
 
    MotionStsType() {
    }
 
    public long val() {
        MotionStsService service = SpringUtils.getBean(MotionStsService.class);
        MotionSts entity = service.selectByFlag(this.toString());
        if (entity == null) {
            throw new CoolException("DeviceCtgType Error!");
        }
        return entity.getId();
    }
 
}