|
@@ -248,17 +248,43 @@ public class InsOrders implements Serializable {
|
|
|
* @param kinds 商业险险种
|
|
* @param kinds 商业险险种
|
|
|
*/
|
|
*/
|
|
|
private void productInformation(List<RiskInfoVo> risks, List<KindInfoVo> kinds) {
|
|
private void productInformation(List<RiskInfoVo> risks, List<KindInfoVo> kinds) {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 投保险种逻辑
|
|
|
|
|
+ * 单交-单交强
|
|
|
|
|
+ * 单商-单商业(含车损)
|
|
|
|
|
+ * 单三-单商业(不含车损)
|
|
|
|
|
+ * 交三-交强+商业(不含车损)
|
|
|
|
|
+ * 交商-交强+商业(含车损)
|
|
|
|
|
+ * 单交:
|
|
|
|
|
+ * 单商:034001
|
|
|
|
|
+ * 单三:034002
|
|
|
|
|
+ * 交三:0330034002
|
|
|
|
|
+ * 交商:0330034001
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
ProductsType productsType;
|
|
ProductsType productsType;
|
|
|
|
|
+ boolean haveCarDamageKind = false;//是否含车损
|
|
|
|
|
+ boolean haveBusiKind = false;//是否含车损外的商业险种
|
|
|
|
|
+ for (KindInfoVo kindInfoVo : kinds) {
|
|
|
|
|
+ String code = kindInfoVo.getKindCode();
|
|
|
|
|
+ // 车损
|
|
|
|
|
+ if ("A".equalsIgnoreCase(code)) {
|
|
|
|
|
+ haveCarDamageKind = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if("B,D3,D4,".contains(code+",")){
|
|
|
|
|
+ haveBusiKind = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (risks.size() == 1 && "0507".equals(risks.get(0).getRiskCode())) {
|
|
if (risks.size() == 1 && "0507".equals(risks.get(0).getRiskCode())) {
|
|
|
- productsType = ProductsType.PT_0330;
|
|
|
|
|
- } else if (risks.size() == 1 && kinds.size() == 1 && "B".equals(kinds.get(0).getKindCode())) {
|
|
|
|
|
- productsType = ProductsType.PT_034002;
|
|
|
|
|
|
|
+ productsType = ProductsType.PT_0330;//单交
|
|
|
|
|
+ } else if (risks.size() == 1 && !haveCarDamageKind && haveBusiKind ) {
|
|
|
|
|
+ productsType = ProductsType.PT_034002;//单三
|
|
|
} else if (risks.size() == 1) {
|
|
} else if (risks.size() == 1) {
|
|
|
- productsType = ProductsType.PT_034001;
|
|
|
|
|
- } else if (risks.size() == 2 && kinds.size() == 1 && "B".equals(kinds.get(0).getKindCode())) {
|
|
|
|
|
- productsType = ProductsType.PT_0330034002;
|
|
|
|
|
|
|
+ productsType = ProductsType.PT_034001;//单商
|
|
|
|
|
+ } else if (risks.size() == 2 && haveBusiKind ) {
|
|
|
|
|
+ productsType = ProductsType.PT_0330034002;//交三
|
|
|
} else {
|
|
} else {
|
|
|
- productsType = ProductsType.PT_0330034001;
|
|
|
|
|
|
|
+ productsType = ProductsType.PT_0330034001;//交商
|
|
|
}
|
|
}
|
|
|
this.setProductid(productsType.getCode());
|
|
this.setProductid(productsType.getCode());
|
|
|
this.setProduct(productsType.getDesc());
|
|
this.setProduct(productsType.getDesc());
|