Forráskód Böngészése

处理驾意险查询

785834757 1 éve
szülő
commit
3688fe0ead

+ 10 - 3
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -962,10 +962,17 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             }
             JSONArray accidentInfo = JSON.parseArray(JSON.toJSONString(insDrivingIntentionInsuranceSon));
             if (accidentInfo.isEmpty()) {
+
                 InsDrivingIntentionInsurance one = insDrivingIntentionInsuranceService.getOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
-                        .eq(InsDrivingIntentionInsurance::getProjectCode, insAreaCompanyAccidentalDriving.getRideRiskCode())
-                        .or()
-                        .eq(InsDrivingIntentionInsurance::getRiskCode, insAreaCompanyAccidentalDriving.getRideRiskCode()));
+                        .and(wrapper-> wrapper
+                            .eq(InsDrivingIntentionInsurance::getProjectCode, insAreaCompanyAccidentalDriving.getRideRiskCode())
+                            .or()
+                            .eq(InsDrivingIntentionInsurance::getRiskCode, insAreaCompanyAccidentalDriving.getRideRiskCode())
+                        )
+                        .and(wrapper ->
+                        wrapper.isNull(InsDrivingIntentionInsurance::getSeatNum)
+                            .or()
+                            .eq(InsDrivingIntentionInsurance::getSeatNum, orderAndAreaCompany.getCarinfo().getString("seatCount"))));
                 if (!Objects.isNull(one)) {
                     JSONObject accidentInfoObject = new JSONObject();
                     accidentInfoObject.put("name", one.getProjectName());