|
|
@@ -123,27 +123,15 @@ public class OptionalSchemeSaveVo {
|
|
|
public List<PtlOptionalSchemeInsurance> getOptionsSchemeKindsList(String schemeId){
|
|
|
List<PtlOptionalSchemeInsurance> list = new ArrayList<>();
|
|
|
this.kinds.forEach(item->{
|
|
|
- if(item.getKindCode().equals("TY2") || item.getKindCode().equals("TY3") || item.getKindCode().equals("TY4"))
|
|
|
- {
|
|
|
- if(!item.getMax().equals("0")) {
|
|
|
- PtlOptionalSchemeInsurance insurance = new PtlOptionalSchemeInsurance();
|
|
|
- insurance.setId(IdGenerate.nextId());
|
|
|
- insurance.setSchemeId(schemeId);
|
|
|
- insurance.setInsuranceId(item.id);
|
|
|
- insurance.setMax(Integer.parseInt(item.max));
|
|
|
- list.add(insurance);
|
|
|
- }
|
|
|
- }else {
|
|
|
- item.amount.forEach(amount -> {
|
|
|
- PtlOptionalSchemeInsurance insurance = new PtlOptionalSchemeInsurance();
|
|
|
- insurance.setId(IdGenerate.nextId());
|
|
|
- insurance.setSchemeId(schemeId);
|
|
|
- insurance.setInsuranceId(item.id);
|
|
|
- insurance.setOptionId(amount);
|
|
|
-
|
|
|
- list.add(insurance);
|
|
|
- });
|
|
|
- }
|
|
|
+ item.amount.forEach(amount -> {
|
|
|
+ PtlOptionalSchemeInsurance insurance = new PtlOptionalSchemeInsurance();
|
|
|
+ insurance.setId(IdGenerate.nextId());
|
|
|
+ insurance.setSchemeId(schemeId);
|
|
|
+ insurance.setInsuranceId(item.id);
|
|
|
+ insurance.setOptionId(amount);
|
|
|
+
|
|
|
+ list.add(insurance);
|
|
|
+ });
|
|
|
});
|
|
|
return list;
|
|
|
}
|