|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
|
|
|
@@ -34,6 +35,7 @@ import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.dajia.AccidentalInsuranceQueryVo;
|
|
|
import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
|
|
|
import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
|
|
|
import com.ydtech.modules.order.service.*;
|
|
|
@@ -46,6 +48,7 @@ import com.ydtech.utils.idgen.IdGenerate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
@@ -221,19 +224,21 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
accidentalDriving, listByAccId, daJiaConfigureParameters, isEnergy);
|
|
|
ODR1009Response odr1009Response = daJiaRequestApiComponents.newPremiumXnyCalculation(odr1009Request);
|
|
|
NVHLODR1001Response nvhlodr1001Response = null;
|
|
|
- if (!Objects.isNull(accidentalDrivingVo) && !accidentalDrivingVo.isEmpty()) {
|
|
|
- //6.驾意险报价
|
|
|
- NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(daJiaConfigureParameters, odr1009Response,
|
|
|
- quoteInfoVo, accidentalDriving, accidentalDrivingVo.getString("quantity"), policyHolderPersonArea,
|
|
|
- insuredPersonArea);
|
|
|
- nvhlodr1001Response = daJiaRequestApiComponents.accidentPremiumCalculation(nvhlodr1001Request);
|
|
|
- if (!"2000".equals(nvhlodr1001Response.getStatus())) {
|
|
|
- return HttpResult.error("驾意险报价失败");
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
if (Message.M0000.getCode().equals(odr1009Response.getStatus())) {
|
|
|
|
|
|
+ if (!Objects.isNull(accidentalDrivingVo) && !accidentalDrivingVo.isEmpty()) {
|
|
|
+ //6.驾意险报价
|
|
|
+ NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(daJiaConfigureParameters, odr1009Response,
|
|
|
+ quoteInfoVo, accidentalDriving, accidentalDrivingVo.getString("quantity"), policyHolderPersonArea,
|
|
|
+ insuredPersonArea);
|
|
|
+ nvhlodr1001Response = daJiaRequestApiComponents.accidentPremiumCalculation(nvhlodr1001Request);
|
|
|
+ if (!"2000".equals(nvhlodr1001Response.getStatus())) {
|
|
|
+ return HttpResult.error("驾意险报价失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//保费计算接口返回
|
|
|
QuoteRespVo quoteRespVo = getQuoteRespVo(odr1009Response, quoteInfoVo, nvhlodr1001Response);
|
|
|
//添加调用费用匹配功能
|
|
|
@@ -767,11 +772,18 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public HttpResult<Object> accidentalDrivingList() {
|
|
|
- List<InsAccidentalDrivingDajia> list = insAccidentalDrivingDaJiaService.list();
|
|
|
+ public HttpResult<Object> accidentalDrivingList(AccidentalInsuranceQueryVo queryVo) {
|
|
|
+ List<InsAccidentalDrivingDajia> list = insAccidentalDrivingDaJiaService.list(new LambdaQueryWrapper<InsAccidentalDrivingDajia>().eq(InsAccidentalDrivingDajia::getAgreementId, queryVo.getAgreementId()));
|
|
|
return HttpResult.ok("获取驾意险列表成功", list);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public HttpResult<Object> accidentalDrivingInfo(String accidentalId) {
|
|
|
+ List<InsAccidentalDrivingSubDajia> list = insAccidentalDrivingSubDaJiaService.list(new LambdaQueryWrapper<InsAccidentalDrivingSubDajia>().eq(InsAccidentalDrivingSubDajia::getAccId, accidentalId));
|
|
|
+ return HttpResult.ok("获取驾意险详情成功", list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private String gainCarInsPolicy(String url, String fileName, String licensePlate) {
|
|
|
String dir = "carInsPolicy/" + licensePlate + "/";
|
|
|
url = url.replaceAll("http://","https://");
|