| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package com.goafanti.organization.bo;
- import java.util.HashMap;
- import java.util.Map;
- public enum ThirdPartyError {
-
- unitPrice("unitPrice","单价"),
- totalAmount("totalAmount","总价"),
- partyAmount("partyAmount","付款金额"),
- not("not","未知");
-
-
-
-
- private ThirdPartyError(String code, String desc) {
- this.code = code;
- this.desc = desc;
- }
- private static Map<String, ThirdPartyError> status = new HashMap<String, ThirdPartyError>();
- static {
- for (ThirdPartyError value : ThirdPartyError.values()) {
- status.put(value.getCode(), value);
- }
- }
-
- public static boolean containsType(Integer code) {
- return status.containsKey(code);
- }
- private String code;
- private String desc;
- public String getCode() {
- return code;
- }
- public String getDesc() {
- return desc;
- }
- public static String getValueByCode(String code){
- for(ThirdPartyError thirdPartyError:ThirdPartyError.values()){
- if(code.equals(thirdPartyError.getCode())){
- return thirdPartyError.getDesc();
- }
- }
- return not.getDesc();
- }
-
- }
|