|
|
@@ -81,7 +81,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS = zhongmeiRequestApiComponents.modelQuery(modelsQueryResponse, ModelsQueryResponse.class);
|
|
|
// 1.1 过滤车型
|
|
|
List<ModelsQueryResponse.SimpleStadarCarDTO> stadarCarDTOS = simpleStadarCarDTOS.stream().filter(car -> carInfo.getCaryear().equals(car.getLfDate())).collect(Collectors.toList());
|
|
|
- if (stadarCarDTOS.size() > 0) {
|
|
|
+ if (!stadarCarDTOS.isEmpty()) {
|
|
|
simpleStadarCarDTOS = stadarCarDTOS;
|
|
|
}
|
|
|
simpleStadarCarDTOS = simpleStadarCarDTOS.stream()
|
|
|
@@ -110,7 +110,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
SubmitResponse response = submitForUnderwriting(insAreaCompany.getId(), insOrders.getFrameno(), customerInfoVo);
|
|
|
HttpResult httpResult;
|
|
|
// 人工核保
|
|
|
- if (response.getHead().getReturnMessage().indexOf(InsuranceTypeCorrespondence.MANUAL_UNDERWRITING) > 0) {
|
|
|
+ if (response.getHead().getReturnMessage().contains(InsuranceTypeCorrespondence.MANUAL_UNDERWRITING)) {
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatus.S_1.getCode());
|
|
|
httpResult = HttpResult.error(response.getHead().getReturnMessage());
|
|
|
} else {
|
|
|
@@ -137,7 +137,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
// 投保单号(总)
|
|
|
String insOrderNo = insAreaCompany.getInsOrderNo();
|
|
|
List<InsTaskImage> insTaskImages = insTaskImageService.selectByTaskId(insOrders.getQuoteno());
|
|
|
- if (insTaskImages.size() == 0) {
|
|
|
+ if (insTaskImages.isEmpty()) {
|
|
|
throw new SystemException("请检查影像是否上传了");
|
|
|
}
|
|
|
UploadImageRequest request = new UploadImageRequest(insTaskImages, insOrderNo);
|
|
|
@@ -147,7 +147,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
|
|
|
@Override
|
|
|
public HttpResult underwritingCallback(CoverageRequest coverageRequest) {
|
|
|
- String s = JSONObject.toJSONString(coverageRequest);
|
|
|
+ String s = JSON.toJSONString(coverageRequest);
|
|
|
log.info("中煤承保回调参数------>{}", s);
|
|
|
|
|
|
if (coverageRequest.getStatus() == PaymentStatusEnum.P_3.getCode()) {
|
|
|
@@ -167,7 +167,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
|
|
|
@Override
|
|
|
public HttpResult auditCallback(ApprovedRequest approvedRequest) {
|
|
|
- String s = JSONObject.toJSONString(approvedRequest);
|
|
|
+ String s = JSON.toJSONString(approvedRequest);
|
|
|
log.info("中煤审核回调参数------>{}", s);
|
|
|
// 主投保单号
|
|
|
String contractNo = approvedRequest.getContractNo();
|
|
|
@@ -197,7 +197,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
orderStatusRequest.setSubProposalNo(insAreaCompany.getInsOrderNo());
|
|
|
OrderStatusResponse orderStatusResponse = zhongmeiRequestApiComponents.orderStatus(orderStatusRequest, OrderStatusResponse.class);
|
|
|
String status = orderStatusResponse.getStatus();
|
|
|
- if (status.equals(PaymentStatusEnum.P_3.getCode())) {
|
|
|
+
|
|
|
+ if (status.equals(String.valueOf(PaymentStatusEnum.P_3.getCode()))) {
|
|
|
insAreaCompany.setJqpolicyno(orderStatusResponse.getSubContractNoJ());
|
|
|
insAreaCompany.setSypolicyno(orderStatusResponse.getSubContractNoS());
|
|
|
insAreaCompany.setJypolicyno(orderStatusResponse.getAccidentNo());
|
|
|
@@ -336,28 +337,26 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
InsAreaCompany insAreaCompany = new InsAreaCompany();
|
|
|
insAreaCompany.setId(quotedPriceResponse.getOrderNo());
|
|
|
insAreaCompany.setOrderno(orderNo);
|
|
|
- insAreaCompany.setReptxt(JSONObject.parseObject(JSON.toJSONString(quotedPriceResponse)));
|
|
|
+ insAreaCompany.setReptxt(JSON.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.setRiskinfo(JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList())));
|
|
|
+ insAreaCompany.setKindinfo(JSON.parseArray(JSON.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.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)));
|
|
|
+ insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
|
|
|
insAreaCompanyService.save(insAreaCompany);
|
|
|
insOrdersService.updateByOrderStatus(orderNo, InsOrderStatus.S_0.getCode());
|
|
|
quoteRespVo.setCompanyId(insAreaCompany.getId());
|
|
|
-// quoteRespVo.setAccident(accident);
|
|
|
quoteRespVo.setTaxArrears(taxArrearsList);
|
|
|
return HttpResult.ok(quotedPriceResponse.getHead().getReturnMessage(), quoteRespVo);
|
|
|
}
|