|
|
@@ -503,9 +503,22 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
// 支付请求
|
|
|
PaymentRequest paymentRequest = new PaymentRequest(parameters, insAreaCompany.getId(), insAreaCompany.getInsOrderNo());
|
|
|
- PaymentResponse paymentResponse = boHaiRequestApiComponent.payment(paymentRequest, parameters.getSysSourceCode());
|
|
|
- String payUrl = paymentResponse.getData().getPayUrl();
|
|
|
- insAreaCompany.setPaymentLink(payUrl);
|
|
|
+ int whileNum = 5;
|
|
|
+ PaymentResponse paymentResponse = null;
|
|
|
+ while(whileNum > 1){
|
|
|
+ Thread.sleep(3000);
|
|
|
+ paymentResponse = boHaiRequestApiComponent.payment(paymentRequest, parameters.getSysSourceCode());
|
|
|
+ if(paymentResponse.getResponseCode().equals(ResponseCode.R_Z00001.getCode())) {
|
|
|
+ String payUrl = paymentResponse.getData().getPayUrl();
|
|
|
+ insAreaCompany.setPaymentLink(payUrl);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ whileNum--;
|
|
|
+ }
|
|
|
+ if(!paymentResponse.getResponseCode().equals(ResponseCode.R_Z00001.getCode())){
|
|
|
+ throw new SystemException(paymentResponse.getResponseMsg());
|
|
|
+ }
|
|
|
+
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("核保通过");
|
|
|
} else if (i == 2) {
|
|
|
@@ -574,8 +587,11 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
|
|
|
public HttpResult<Object> getOrderDetail(String subOrderNo) throws Exception {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
|
|
|
List<StatusDocumentsResponse.DataDTO.DocumentListDTO> documentList = getDocumentListDTO(insAreaCompany);
|
|
|
+ documentList = documentList.stream().filter(x -> !x.getInsuranceType().equals("2")).collect(Collectors.toList());
|
|
|
List<StatusDocumentsResponse.DataDTO.DocumentListDTO> documentListDTOS =
|
|
|
- documentList.stream().filter(x -> ResultCode.RC_B5.getCode().equals(x.getStatus())).collect(Collectors.toList());
|
|
|
+ documentList.stream()
|
|
|
+ .filter(x -> !x.getInsuranceType().equals("2"))
|
|
|
+ .filter(x -> ResultCode.RC_B5.getCode().equals(x.getStatus())).collect(Collectors.toList());
|
|
|
|
|
|
if (documentListDTOS.size() == documentList.size()) {
|
|
|
for (StatusDocumentsResponse.DataDTO.DocumentListDTO documentListDTO : documentListDTOS) {
|