소스 검색

处理驾意险查询

785834757 1 년 전
부모
커밋
3688fe0ead
1개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. 10 3
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

+ 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());