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
43
| package com.doumee.config.xyy.dto;
|
| /**
| * 打印机状态
| *
| * @author RabyGao
| * @date Aug 8, 2019
| */
| public enum PrinterStatusType {
|
| /**
| * 离线
| */
| Offline(0),
| /**
| * 在线正常
| */
| OnlinNormal(1),
| /**
| * 在线缺纸
| */
| OnlineMissingPaper(2);
|
| private final int val;
|
| public int getVal() {
| return val;
| }
|
| private PrinterStatusType(int num) {
| this.val = num;
| }
|
| public static PrinterStatusType getPrinterStatusType(int val) {
| for (PrinterStatusType type : PrinterStatusType.values()) {
| if (type.getVal() == val) {
| return type;
| }
| }
| return Offline;
| }
|
| }
|
|