Commit 32509fd3 by 翁国栋 Committed by 284718418@qq.com

解决导入保单时用户名为空

parent a4d6878b
package cn.timer.api.controller.insure.enums;
import io.swagger.models.auth.In;
import lombok.Data;
import cn.timer.api.utils.ExcelUtils;
/**
* @Description TODO
* @Author wgd
* @Date 2022/3/24 17:20
*/
public enum InsuranceEnum {
public enum PlanEnum {
A_30(12,"30万意外/3万医疗/扩展24小时(A类)","A类","36968","63119"),
A_50(15,"50万意外/5万医疗/扩展24小时(A类)","A类","36969","63119"),
A_80(18,"80万意外/10万医疗/扩展24小时(A类)","A类","36970","63119"),
......@@ -27,7 +26,7 @@ public enum InsuranceEnum {
private String plan;
private String category;
InsuranceEnum(Integer price, String name,String type,String plan,String category) {
PlanEnum(Integer price, String name, String type, String plan, String category) {
this.price = price;
this.name = name;
this.type=type;
......@@ -75,11 +74,14 @@ public enum InsuranceEnum {
this.category = category;
}
public static InsuranceEnum getEnum(String plan,String category) {
for(InsuranceEnum v : values())
public static PlanEnum getEnum(String plan, String category) {
for(PlanEnum v : values())
if(v.getPlan().equals(plan)&&v.getCategory().equals(category)) return v;
throw new IllegalArgumentException();
}
public static PlanEnum getEnumOfName(String name){
for(PlanEnum v : values())
if(v.getName().equals(name)) return v;
throw new IllegalArgumentException();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment