|
|
@@ -2,6 +2,7 @@ package com.ydtech.constants.enums;
|
|
|
|
|
|
|
|
|
import com.ydtech.constants.enums.dict.insurance.EnergyType;
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Getter;
|
|
|
|
|
|
@@ -47,6 +48,10 @@ public enum JingyouEnergyTypes {
|
|
|
* @return
|
|
|
*/
|
|
|
public static String getEnergyTypeByCode(String code) {
|
|
|
+ if(StringUtils.isEmpty(code)){
|
|
|
+ return EnergyType.ET_0.getCode();
|
|
|
+ }
|
|
|
+
|
|
|
JingyouEnergyTypes jingyouEnergyTypes = valueOf(code);
|
|
|
return Optional
|
|
|
.of(jingyouEnergyTypes)
|