提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng) |
|
3 |
* <p> |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* <p> |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* <p> |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package cn.stylefeng.guns.sys.core.constant.state; |
|
17 |
|
|
18 |
/** |
|
19 |
* 是否是菜单的枚举 |
|
20 |
* |
|
21 |
* @author fengshuonan |
|
22 |
* @date 2017年6月1日22:50:11 |
|
23 |
*/ |
|
24 |
public enum ExpenseState { |
|
25 |
|
|
26 |
SUBMITING(1, "待提交"), |
|
27 |
CHECKING(2, "待审核"), |
|
28 |
PASS(3, "审核通过"), |
|
29 |
UN_PASS(4, "未通过"); |
|
30 |
|
|
31 |
int code; |
|
32 |
String message; |
|
33 |
|
|
34 |
ExpenseState(int code, String message) { |
|
35 |
this.code = code; |
|
36 |
this.message = message; |
|
37 |
} |
|
38 |
|
|
39 |
public int getCode() { |
|
40 |
return code; |
|
41 |
} |
|
42 |
|
|
43 |
public void setCode(int code) { |
|
44 |
this.code = code; |
|
45 |
} |
|
46 |
|
|
47 |
public String getMessage() { |
|
48 |
return message; |
|
49 |
} |
|
50 |
|
|
51 |
public void setMessage(String message) { |
|
52 |
this.message = message; |
|
53 |
} |
|
54 |
|
|
55 |
public static String valueOf(Integer status) { |
|
56 |
if (status == null) { |
|
57 |
return ""; |
|
58 |
} else { |
|
59 |
for (ExpenseState s : ExpenseState.values()) { |
|
60 |
if (s.getCode() == status) { |
|
61 |
return s.getMessage(); |
|
62 |
} |
|
63 |
} |
|
64 |
return ""; |
|
65 |
} |
|
66 |
} |
|
67 |
} |