|
@@ -6,39 +6,32 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ydtech.components.ZhongmeiRequestApiComponents;
|
|
import com.ydtech.components.ZhongmeiRequestApiComponents;
|
|
|
import com.ydtech.constants.enums.InsOrderStatus;
|
|
import com.ydtech.constants.enums.InsOrderStatus;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
|
|
+import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
import com.ydtech.modules.esm.model.InsTaskImage;
|
|
import com.ydtech.modules.esm.model.InsTaskImage;
|
|
|
import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
|
import com.ydtech.modules.esm.service.InsTaskImageService;
|
|
import com.ydtech.modules.esm.service.InsTaskImageService;
|
|
|
-import com.ydtech.modules.ins.model.request.Response;
|
|
|
|
|
-import com.ydtech.modules.ins.model.request.ZhongmeiQuoteResponse;
|
|
|
|
|
import com.ydtech.modules.ins.model.ya.CarModelDTO;
|
|
import com.ydtech.modules.ins.model.ya.CarModelDTO;
|
|
|
-import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
|
|
|
|
|
import com.ydtech.modules.ins.vo.*;
|
|
import com.ydtech.modules.ins.vo.*;
|
|
|
import com.ydtech.modules.order.convert.SimpleStadarCarDTOConvert;
|
|
import com.ydtech.modules.order.convert.SimpleStadarCarDTOConvert;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
import com.ydtech.modules.order.entity.TaxArrears;
|
|
import com.ydtech.modules.order.entity.TaxArrears;
|
|
|
import com.ydtech.modules.order.entity.api.zm.constants.InsuranceTypeCorrespondence;
|
|
import com.ydtech.modules.order.entity.api.zm.constants.InsuranceTypeCorrespondence;
|
|
|
-import com.ydtech.modules.order.entity.api.zm.request.ModelsQueryRequest;
|
|
|
|
|
-import com.ydtech.modules.order.entity.api.zm.request.QuotedPriceRequest;
|
|
|
|
|
-import com.ydtech.modules.order.entity.api.zm.response.ModelsQueryResponse;
|
|
|
|
|
-import com.ydtech.modules.order.entity.api.zm.response.QuotedPriceResponse;
|
|
|
|
|
|
|
+import com.ydtech.modules.order.entity.api.zm.constants.enums.AuditStatusEnum;
|
|
|
|
|
+import com.ydtech.modules.order.entity.api.zm.request.*;
|
|
|
|
|
+
|
|
|
|
|
+import com.ydtech.modules.order.entity.api.zm.response.*;
|
|
|
import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
|
|
import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
|
|
import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
|
|
|
-import com.ydtech.nai.httpvo.*;
|
|
|
|
|
import com.ydtech.utils.CalculateUtils;
|
|
import com.ydtech.utils.CalculateUtils;
|
|
|
-import com.ydtech.utils.HttpsPostUtil;
|
|
|
|
|
-import com.ydtech.utils.idgen.IdGenerate;
|
|
|
|
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.security.core.context.SecurityContextHolder;
|
|
|
|
|
-import org.springframework.security.core.userdetails.UserDetails;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
@@ -65,16 +58,16 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
|
|
|
|
|
private final InsTaskImageService insTaskImageService;
|
|
private final InsTaskImageService insTaskImageService;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private ZhongmeiRequestApiComponents zhongmeiRequestApiComponents;
|
|
|
|
|
|
|
+ private final ZhongmeiRequestApiComponents zhongmeiRequestApiComponents;
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private EsmInsCompanyService esmInsCompanyService;
|
|
|
|
|
|
|
+ private final EsmInsCompanyService esmInsCompanyService;
|
|
|
|
|
|
|
|
- public ZhongMeiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImageService insTaskImageService) {
|
|
|
|
|
|
|
+ public ZhongMeiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImageService insTaskImageService, ZhongmeiRequestApiComponents zhongmeiRequestApiComponents, EsmInsCompanyService esmInsCompanyService) {
|
|
|
this.insOrdersService = insOrdersService;
|
|
this.insOrdersService = insOrdersService;
|
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
|
this.insTaskImageService = insTaskImageService;
|
|
this.insTaskImageService = insTaskImageService;
|
|
|
|
|
+ this.zhongmeiRequestApiComponents = zhongmeiRequestApiComponents;
|
|
|
|
|
+ this.esmInsCompanyService = esmInsCompanyService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -89,7 +82,6 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
|
|
public HttpResult quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
|
|
|
EsmInsCompany esmInsCompany = esmInsCompanyService.isOpen(zmQuoteVo.getCompanyId());
|
|
EsmInsCompany esmInsCompany = esmInsCompanyService.isOpen(zmQuoteVo.getCompanyId());
|
|
|
-
|
|
|
|
|
CarInfoVo carInfo = quoteInfo.getCarInfo();
|
|
CarInfoVo carInfo = quoteInfo.getCarInfo();
|
|
|
// 1. 查询车型
|
|
// 1. 查询车型
|
|
|
ModelsQueryRequest modelsQueryResponse = new ModelsQueryRequest();
|
|
ModelsQueryRequest modelsQueryResponse = new ModelsQueryRequest();
|
|
@@ -100,26 +92,140 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (stadarCarDTOS.size() > 0) {
|
|
if (stadarCarDTOS.size() > 0) {
|
|
|
simpleStadarCarDTOS = stadarCarDTOS;
|
|
simpleStadarCarDTOS = stadarCarDTOS;
|
|
|
}
|
|
}
|
|
|
- ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO = simpleStadarCarDTOS.stream().filter(car -> Integer.valueOf(carInfo.getPurchasePrice()).equals(car.getOriginalPurchasePrice())).collect(Collectors.toList()).get(0);
|
|
|
|
|
|
|
+ simpleStadarCarDTOS = simpleStadarCarDTOS.stream()
|
|
|
|
|
+ .filter(car -> carInfo.getPurchasePrice().equals(String.valueOf(car.getPurchasePrice())))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
+ ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO = simpleStadarCarDTOS.get(0);
|
|
|
// 组装参数
|
|
// 组装参数
|
|
|
QuotedPriceRequest quotedPriceRequest = new QuotedPriceRequest(quoteInfo, simpleStadarCarDTO);
|
|
QuotedPriceRequest quotedPriceRequest = new QuotedPriceRequest(quoteInfo, simpleStadarCarDTO);
|
|
|
QuotedPriceResponse quotedPriceResponse = zhongmeiRequestApiComponents.quotedPrice(quotedPriceRequest, QuotedPriceResponse.class);
|
|
QuotedPriceResponse quotedPriceResponse = zhongmeiRequestApiComponents.quotedPrice(quotedPriceRequest, QuotedPriceResponse.class);
|
|
|
- getQuoteRespVo(quotedPriceResponse, quoteInfo);
|
|
|
|
|
|
|
|
|
|
|
|
+ QuoteRespVo quoteRespVo = getQuoteRespVo(quotedPriceResponse, quoteInfo);
|
|
|
|
|
+ // 2. 第一次提交核保 并且获取投保单号
|
|
|
|
|
+ SubmitResponse response = submitForUnderwriting(quotedPriceResponse.getOrderNo(), carInfo.getFrameNo(), quoteInfo.getOwnerInfo());
|
|
|
|
|
+ return responseOrder(quotedPriceResponse, quoteRespVo, esmInsCompany, response);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HttpResult audit(String companyId) {
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
|
|
+ JSONObject ownerinfo = insOrders.getOwnerinfo();
|
|
|
|
|
+ CustomerInfoVo customerInfoVo = JSON.toJavaObject(ownerinfo, CustomerInfoVo.class);
|
|
|
|
|
+ // 第二次 提交核保
|
|
|
|
|
+ SubmitResponse response = submitForUnderwriting(insAreaCompany.getInsOrderNo(), insOrders.getFrameno(), customerInfoVo);
|
|
|
|
|
+ zhongmeiRequestApiComponents.validationResults(response);
|
|
|
|
|
+ // 投保单号
|
|
|
|
|
+ insAreaCompany.setPaymentLink(response.getPayUrl());
|
|
|
|
|
+ insAreaCompany.setJqapplyno(response.getForceProposalNo());
|
|
|
|
|
+ insAreaCompany.setSyapplyno(response.getBizProposalNo());
|
|
|
|
|
+ insAreaCompany.setJyapplyno(response.getAccidentProposalNo());
|
|
|
|
|
+ insAreaCompany.setInsOrderNo(response.getProposalNo());
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode()); // 2
|
|
|
|
|
+ insAreaCompanyService.updateById(insAreaCompany);
|
|
|
|
|
+ insOrdersService.updateByOrderStatus(insAreaCompany.getOrderno(), insAreaCompany.getOrderstatus());
|
|
|
|
|
+ return HttpResult.ok("核保成功");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HttpResult submitImage(String companyId) {
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
|
|
+ // 投保单号(总)
|
|
|
|
|
+ String insOrderNo = insAreaCompany.getInsOrderNo();
|
|
|
|
|
+ List<InsTaskImage> insTaskImages = insTaskImageService.selectByTaskId(insOrders.getQuoteno());
|
|
|
|
|
+ UploadImageRequest request = new UploadImageRequest(insTaskImages, insOrderNo);
|
|
|
|
|
+ zhongmeiRequestApiComponents.uploadImage(request, UploadImageResponse.class);
|
|
|
|
|
+ return HttpResult.ok("上传文件成功");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HttpResult underwritingCallback(CoverageRequest coverageRequest) {
|
|
|
|
|
+ String s = JSONObject.toJSONString(coverageRequest);
|
|
|
|
|
+ log.info("中煤承保回调参数------>{}", s);
|
|
|
|
|
+
|
|
|
|
|
+ if (coverageRequest.getStatus() == 1) {
|
|
|
|
|
+ // 主投保单号
|
|
|
|
|
+ String proposalNo = coverageRequest.getProposalNo();
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(proposalNo);
|
|
|
|
|
+ // 保单号
|
|
|
|
|
+ insAreaCompany.setJqpolicyno(coverageRequest.getForcePolicyNo());
|
|
|
|
|
+ insAreaCompany.setSypolicyno(coverageRequest.getBizPolicyNo());
|
|
|
|
|
+ insAreaCompany.setJypolicyno(coverageRequest.getAccidentPolicyNo());
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());
|
|
|
|
|
+ insOrdersService.updateByOrderStatus(insAreaCompany.getOrderno(), insAreaCompany.getOrderstatus());
|
|
|
|
|
+ insAreaCompanyService.updateById(insAreaCompany);
|
|
|
|
|
+ }
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public HttpResult getPolicyPrint(String companyId) {
|
|
|
|
|
|
|
+ public HttpResult auditCallback(ApprovedRequest approvedRequest) {
|
|
|
|
|
+ String s = JSONObject.toJSONString(approvedRequest);
|
|
|
|
|
+ log.info("中煤审核回调参数------>{}", s);
|
|
|
|
|
+ // 主投保单号
|
|
|
|
|
+ String contractNo = approvedRequest.getContractNo();
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(contractNo);
|
|
|
|
|
+ if(AuditStatusEnum.S_1.getCode().equals(approvedRequest.getStatusCode())){
|
|
|
|
|
+ insAreaCompany.setJqapplyno(approvedRequest.getProposalNoJ());
|
|
|
|
|
+ insAreaCompany.setSyapplyno(approvedRequest.getProposalNoS());
|
|
|
|
|
+ insAreaCompany.setJyapplyno(approvedRequest.getProposalNoCP());
|
|
|
|
|
+ insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
|
|
|
|
|
+ }else {
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatus.S_4.getCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ insOrdersService.updateByOrderStatus(insAreaCompany.getOrderno(), insAreaCompany.getOrderstatus());
|
|
|
|
|
+ insAreaCompanyService.updateById(insAreaCompany);
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public HttpResult uploadImage(String orderNo) {
|
|
|
|
|
|
|
+ public HttpResult getPolicyPrint(String companyId) {
|
|
|
|
|
+ String riskCode = "";
|
|
|
|
|
+ String type = "";
|
|
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
|
|
+ String policyNo;
|
|
|
|
|
+ String documentType = "DZ_AE";
|
|
|
|
|
+ if (InsuranceTypeCorrespondence.TRAFFIC.equals(riskCode)){
|
|
|
|
|
+ policyNo = insAreaCompany.getJqpolicyno();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (InsuranceTypeCorrespondence.BUSINESS.equals(riskCode)){
|
|
|
|
|
+ policyNo = insAreaCompany.getJqpolicyno();
|
|
|
|
|
+ }else {
|
|
|
|
|
+ throw new SystemException("险种代码不存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ InsurancePolicyPrintRequest request = new InsurancePolicyPrintRequest();
|
|
|
|
|
+ request.setPolicyNo(policyNo);
|
|
|
|
|
+ InsurancePolicyPrintResponse insurancePolicyPrintResponse = zhongmeiRequestApiComponents.insurancePolicyPrint(request, InsurancePolicyPrintResponse.class);
|
|
|
|
|
+
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @param orderNo 中煤订单号
|
|
|
|
|
+ * @param frameNo 车架号
|
|
|
|
|
+ * @param customerInfoVo 车辆信息
|
|
|
|
|
+ * @return 核保请求参数
|
|
|
|
|
+ */
|
|
|
|
|
+ public SubmitResponse submitForUnderwriting(String orderNo, String frameNo, CustomerInfoVo customerInfoVo) {
|
|
|
|
|
+ SubmitRequest submitRequest = new SubmitRequest();
|
|
|
|
|
+ submitRequest.setOrderNo(orderNo);
|
|
|
|
|
+ submitRequest.setVin(frameNo);
|
|
|
|
|
+ SubmitRequest.DeliveryInfoDTO deliveryInfoDTO = new SubmitRequest.DeliveryInfoDTO(
|
|
|
|
|
+ customerInfoVo.getName(),
|
|
|
|
|
+ customerInfoVo.getMobile(),
|
|
|
|
|
+ "140000",
|
|
|
|
|
+ "140400",
|
|
|
|
|
+ "140423",
|
|
|
|
|
+ customerInfoVo.getAddr()
|
|
|
|
|
+ );
|
|
|
|
|
+ submitRequest.setDeliveryInfo(deliveryInfoDTO);
|
|
|
|
|
+ return zhongmeiRequestApiComponents.submit(submitRequest, SubmitResponse.class);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public QuoteRespVo getQuoteRespVo(QuotedPriceResponse quotedPriceResponse, BaseQuoteInfoVo yaQuoteInfoVo) {
|
|
public QuoteRespVo getQuoteRespVo(QuotedPriceResponse quotedPriceResponse, BaseQuoteInfoVo yaQuoteInfoVo) {
|
|
|
double jqPremium = quotedPriceResponse.getForcePrimium().getPremium();
|
|
double jqPremium = quotedPriceResponse.getForcePrimium().getPremium();
|
|
|
double syPremium = quotedPriceResponse.getBizPremium().getSumPremium();
|
|
double syPremium = quotedPriceResponse.getBizPremium().getSumPremium();
|
|
@@ -183,36 +289,37 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
return quoteRespVo;
|
|
return quoteRespVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// public HttpResult responseOrder(String orderNo, QuotedPriceResponse quotedPriceResponse, QuoteRespVo quoteRespVo, EsmInsCompany esmInsCompanies) {
|
|
|
|
|
-// //保存订单信息
|
|
|
|
|
-// InsAreaCompany insAreaCompany = new InsAreaCompany();
|
|
|
|
|
-// insAreaCompany.setId(IdGenerate.nextId());
|
|
|
|
|
-// insAreaCompany.setOrderno(orderNo);
|
|
|
|
|
-// insAreaCompany.setReptxt(JSONObject.parseObject(JSON.toJSONString(quotedPriceResponse)));
|
|
|
|
|
-// insAreaCompany.setJqpremium(BigDecimal.valueOf(quoteRespVo.getJqPremium()));
|
|
|
|
|
-// insAreaCompany.setSypremium(BigDecimal.valueOf(quoteRespVo.getSyPremium()));
|
|
|
|
|
-// insAreaCompany.setTaxamount(BigDecimal.valueOf(quoteRespVo.getTaxAmount()));
|
|
|
|
|
-// insAreaCompany.setSumpremium(BigDecimal.valueOf(quoteRespVo.getSumPermium()));
|
|
|
|
|
-// insAreaCompany.setOrderstatus(InsOrderStatus.S_0.getCode()); // "1"
|
|
|
|
|
-// insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
|
|
|
-// insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
|
|
|
-// insAreaCompany.setJqapplyno(quotedPriceResponse.getForcePrimium().get);
|
|
|
|
|
-// insAreaCompany.setSyapplyno(response.getSContractNo());
|
|
|
|
|
-// insAreaCompany.setCompanyId(esmInsCompanies.getId());
|
|
|
|
|
-// insAreaCompany.setInscompany(esmInsCompanies.getNamesimple());
|
|
|
|
|
|
|
+ public HttpResult responseOrder(QuotedPriceResponse quotedPriceResponse, QuoteRespVo quoteRespVo, EsmInsCompany esmInsCompanies, SubmitResponse submitResponse) {
|
|
|
|
|
+ //保存订单信息
|
|
|
|
|
+ String orderNo = quoteRespVo.getOrderno();
|
|
|
|
|
+ InsAreaCompany insAreaCompany = new InsAreaCompany();
|
|
|
|
|
+ insAreaCompany.setId(quotedPriceResponse.getOrderNo());
|
|
|
|
|
+ insAreaCompany.setOrderno(orderNo);
|
|
|
|
|
+ insAreaCompany.setReptxt(JSONObject.parseObject(JSON.toJSONString(quotedPriceResponse)));
|
|
|
|
|
+ insAreaCompany.setJqpremium(BigDecimal.valueOf(quoteRespVo.getJqPremium()));
|
|
|
|
|
+ insAreaCompany.setSypremium(BigDecimal.valueOf(quoteRespVo.getSyPremium()));
|
|
|
|
|
+ insAreaCompany.setTaxamount(BigDecimal.valueOf(quoteRespVo.getTaxAmount()));
|
|
|
|
|
+ insAreaCompany.setSumpremium(BigDecimal.valueOf(quoteRespVo.getSumPermium()));
|
|
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatus.S_0.getCode()); // "1"
|
|
|
|
|
+ insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
|
|
|
+ insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
|
|
|
+ insAreaCompany.setJqapplyno(submitResponse.getForceProposalNo());
|
|
|
|
|
+ insAreaCompany.setSyapplyno(submitResponse.getBizProposalNo());
|
|
|
|
|
+ insAreaCompany.setCompanyId(esmInsCompanies.getId());
|
|
|
|
|
+ insAreaCompany.setInscompany(esmInsCompanies.getNamesimple());
|
|
|
// insAreaCompany.setAccidentInfo(JSONObject.parseObject(JSON.toJSONString(accident)));
|
|
// insAreaCompany.setAccidentInfo(JSONObject.parseObject(JSON.toJSONString(accident)));
|
|
|
-// insAreaCompany.setInsOrderNo(response.getContractMainNo());
|
|
|
|
|
-// // 车船税
|
|
|
|
|
-// TaxArrears taxArrears = new TaxArrears("往年欠税", response.getSumTaxDefault(), response.getSumOverdue());
|
|
|
|
|
-// List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
|
|
|
|
|
-// insAreaCompany.setTaxArrears(JSONObject.parseArray(JSONObject.toJSONString(taxArrearsList)));
|
|
|
|
|
-// insAreaCompanyService.save(insAreaCompany);
|
|
|
|
|
-// insOrdersService.updateByOrderStatus(orderNo, InsOrderStatus.S_0.getCode());
|
|
|
|
|
-// quoteRespVo.setCompanyId(insAreaCompany.getId());
|
|
|
|
|
|
|
+ insAreaCompany.setInsOrderNo(submitResponse.getProposalNo());
|
|
|
|
|
+ // 车船税
|
|
|
|
|
+ TaxArrears taxArrears = new TaxArrears("往年欠税", quotedPriceResponse.getTaxinfo().getPrePayTax(), quotedPriceResponse.getTaxinfo().getDelayPayTax());
|
|
|
|
|
+ List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
|
|
|
|
|
+ insAreaCompany.setTaxArrears(JSONObject.parseArray(JSONObject.toJSONString(taxArrearsList)));
|
|
|
|
|
+ insAreaCompanyService.save(insAreaCompany);
|
|
|
|
|
+ insOrdersService.updateByOrderStatus(orderNo, InsOrderStatus.S_0.getCode());
|
|
|
|
|
+ quoteRespVo.setCompanyId(insAreaCompany.getId());
|
|
|
// quoteRespVo.setAccident(accident);
|
|
// quoteRespVo.setAccident(accident);
|
|
|
-// quoteRespVo.setTaxArrears(taxArrearsList);
|
|
|
|
|
-// return HttpResult.ok(body.getMessage(), quoteRespVo);
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ quoteRespVo.setTaxArrears(taxArrearsList);
|
|
|
|
|
+ return HttpResult.ok(quotedPriceResponse.getHead().getReturnMessage(), quoteRespVo);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|