Przeglądaj źródła

将未承保状态的订单刷成已经承保状态的订单,同时更新支付时间,调用承保接口完成更新承保状态,接口如果返回支付时间赋值,没有赋值当前时间,轨迹表中添加自动刷新和admin记录是系统刷新

hxl13994548489 2 lat temu
rodzic
commit
56b3bfa5bd
28 zmienionych plików z 718 dodań i 30 usunięć
  1. 10 1
      src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java
  2. 13 2
      src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java
  3. 11 4
      src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java
  4. 8 0
      src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java
  5. 12 0
      src/main/java/com/ydtech/modules/order/service/InsCrawlerOrderService.java
  6. 11 0
      src/main/java/com/ydtech/modules/order/service/InsOrdersTrackService.java
  7. 9 2
      src/main/java/com/ydtech/modules/order/service/YongchengOrderApiService.java
  8. 12 1
      src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java
  9. 10 0
      src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java
  10. 82 0
      src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java
  11. 71 0
      src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java
  12. 74 0
      src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java
  13. 15 2
      src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java
  14. 31 0
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  15. 14 2
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersTrackServiceImpl.java
  16. 96 0
      src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java
  17. 51 1
      src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java
  18. 46 1
      src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java
  19. 15 7
      src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java
  20. 4 6
      src/main/java/com/ydtech/modules/xxl/handler/QueryStatusHandler.java
  21. 2 0
      src/main/java/com/ydtech/modules/xxl/service/BaseQueryStatusService.java
  22. 17 0
      src/main/java/com/ydtech/modules/xxl/service/impl/DaJiaQueryStatusService.java
  23. 15 0
      src/main/java/com/ydtech/modules/xxl/service/impl/GuoRenQueryStatusService.java
  24. 15 0
      src/main/java/com/ydtech/modules/xxl/service/impl/HuaTaiQueryStatusService.java
  25. 23 1
      src/main/java/com/ydtech/modules/xxl/service/impl/InsCrawlerQueryStatusService.java
  26. 16 0
      src/main/java/com/ydtech/modules/xxl/service/impl/YongChengQueryStatusService.java
  27. 18 0
      src/main/java/com/ydtech/modules/xxl/service/impl/ZhongMeiQueryStatusService.java
  28. 17 0
      src/main/java/com/ydtech/modules/xxl/service/impl/ZijinQueryStatusService.java

+ 10 - 1
src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java

@@ -41,5 +41,14 @@ public interface DaJiaOrderService extends BaseOrderService<Object>{
      */
     HttpResult<Object> accidentalDrivingInfo(String accidentalId);
 
-
+    /**
+    * @Description 自动更新承保状态
+    * @Author  xingming
+    * @Date   2024/3/28 16:36
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void verifyPaymentNew(String companyId);
 }

+ 13 - 2
src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java

@@ -3,9 +3,8 @@ package com.ydtech.modules.order.service;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.guoren.CarModelResp;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
-import com.ydtech.modules.order.entity.api.guoren.response.SpecialAgreementResponse;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreement;
 import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
 import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceQueryVo;
@@ -81,4 +80,16 @@ public interface GuorenOrderApiService {
     HttpResult<String> getPolicyPrintApi(PolicyPrintVo policyPrintVo);
 
 
+    /**
+    * @Description 更新支付状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:47
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void insOrderInfoNew(String companyId);
+
+
 }

+ 11 - 4
src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java

@@ -2,10 +2,6 @@ package com.ydtech.modules.order.service;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
-import com.ydtech.modules.ins.model.ya.CarModelDTO;
-import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
-import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
-import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.po.InsHuataiContributing;
 import com.ydtech.modules.order.entity.vo.*;
@@ -79,4 +75,15 @@ public interface HuaTaiOrderApiService{
      *//*
     HttpResult<Object> getPaymentUrl(String companyId);*/
 
+    /**
+    * @Description  更新订单状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:53
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void paymentEnquiryNew(String companyId);
+
 }

+ 8 - 0
src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java

@@ -37,6 +37,14 @@ public interface InsAreaCompanyService extends IService<InsAreaCompany> {
      */
     void updateCompanyAndOrders(InsAreaCompany insAreaCompany);
 
+
+    /**
+     * 修改子订单 并且修改订单状态 最新
+     *
+     * @param insAreaCompany
+     */
+    void updateCompanyAndOrdersNew(InsAreaCompany insAreaCompany);
+
     /**
      * 插入子订单 并且修改订单状态
      *

+ 12 - 0
src/main/java/com/ydtech/modules/order/service/InsCrawlerOrderService.java

@@ -47,4 +47,16 @@ public interface InsCrawlerOrderService extends BaseOrderService<Object> {
      * @return Object
      */
     HttpResult<Object> auditStatusQuery(String subOrderNo);
+
+
+    /**
+    * @Description  更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:32
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void verifyPaymentNew(String insAreaCompanyId);
 }

+ 11 - 0
src/main/java/com/ydtech/modules/order/service/InsOrdersTrackService.java

@@ -20,6 +20,17 @@ public interface InsOrdersTrackService extends IService<InsOrdersTrack> {
      */
     void addingTrajectories(InsAreaCompany insAreaCompany);
 
+    /**
+    * @Description 添加轨迹自动填充
+    * @Author  hxl
+    * @Date   2024/3/28 15:54
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    void addingTrajectoriesNew(InsAreaCompany insAreaCompany);
+
     /**
      * 通过订单号查询报价轨迹
      *

+ 9 - 2
src/main/java/com/ydtech/modules/order/service/YongchengOrderApiService.java

@@ -3,7 +3,6 @@ package com.ydtech.modules.order.service;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.esm.model.EsmInsAttachInsure;
-import com.ydtech.modules.ins.model.yc.CallBackRequest;
 import com.ydtech.modules.ins.model.yc.pay.response.AccidentResponse;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
@@ -12,7 +11,6 @@ import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
 
 import java.util.List;
-import java.util.Map;
 
 public interface YongchengOrderApiService {
 
@@ -73,4 +71,13 @@ public interface YongchengOrderApiService {
      */
     HttpResult getPolicyPrintApi(PolicyPrintVo policyPrintVo);
 
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/3/28 17:01
+     *  @Description: 更新承保状态和支付时间
+     */
+    public void callbackAnOrderNew(String insAreaCompanyId);
+
 }

+ 12 - 1
src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java

@@ -7,7 +7,6 @@ import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.response.RideAccidentQueryResponse;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
 
@@ -82,4 +81,16 @@ public interface ZhongMeiOrderApiService extends BaseOrderService<AccidentalDriv
      * @return
      */
     HttpResult<List<RideAccidentQueryResponse.RideAccidentDTO>> rideAccidentQuery(GeneralNonCarProductReqVo reqVo);
+
+
+    /**
+    * @Description  更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:06
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void paymentEnquiryNew(String companyId);
 }

+ 10 - 0
src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java

@@ -88,4 +88,14 @@ public interface ZijinOrderApiService {
      * @param companyId 子订单号
      */
     HttpResult<Object> auditStatusQuery(String companyId);
+
+    /**
+    * @Description   更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:18
+    * @Param
+    * @Return
+    * @Exception
+    */
+    public void getOrderDetailNew(String companyId);
 }

+ 82 - 0
src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java

@@ -932,5 +932,87 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
     }
 
+    /**
+     * 查询订单状态
+     *
+     * @param companyId
+     * @return
+     */
+    @Override
+    public void verifyPaymentNew(String companyId) {
+        try {
+            InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+            //获取公司配置信息
+            DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
+            configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
+            ODR2010Request odr2010Request = new ODR2010Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters);
+            ODR2010Response odr2010Response = daJiaRequestApiComponents.verifyPayment(odr2010Request);
+            if (odr2010Response.getStatus().equals(Message.M0000.getCode())) {
+                List<ODR2010Response.ResultDTO> result = odr2010Response.getResult();
+                //是否人工核保
+                if (checkArtificial(result)) {
+                    //是否存在核保退回
+                    if (checkBack(result)) {
+                       // insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+                       // insAreaCompanyService.updateById(insAreaCompany);
+                    } else
+                        //存在 核保通过 并且 不存在支付连接 则 生成支付连接
+                        if (!checkPayLink(result, insAreaCompany)) {
+                            //核保成功  获取支付二维码
+                            //驾意险 返回数据
+                           // List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
+                           // if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
+                           //     policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
+                           //             NVHLODR1001Response.policyInfosDTO.class);
+                           // }
+                            //ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters,
+                            //        policyInfosDTOS);
+                           // ODR1011Response payNo = daJiaRequestApiComponents.getPayNo(odr1011Request);
+                           // if (payNo.getStatus().equals(Message.M0000.getCode())) {
+                                //获取支付二维码成功  保存支付二维码
+                             //   insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                             //   insAreaCompany.setPaymentLink(payNo.getResult().getSignInfoUrl());
+                             //   insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                           // } else {
+                               // return HttpResult.error("获取支付二维码失败");
+                           // }
+                        }
+                }
+                //是否存在保单生成
+                if (checkBdGen(result) && !"3".equals(insAreaCompany.getOrderstatus())) {
+                    List<ODR2010Response.ResultDTO> collect =
+                            result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
+
+                    //如果交强和商业都不为空
+                    if (insAreaCompany.getJqapplyno() != null && insAreaCompany.getSyapplyno() != null) {
+                        if (collect.size() < 2) {
+                          //  return HttpResult.ok("查询订单状态成功");
+                        }
+                    }
 
+                    for (int i = 0, length = collect.size(); i < length; i++) {
+                        //交强或商业 的 保单号
+                        if (collect.get(i).getProdNo().equals(CProdNo.JQ.getCode())) {
+                            insAreaCompany.setJqpolicyno(collect.get(i).getPlyNo());
+                        } else if (collect.get(i).getProdNo().equals(CProdNo.SY.getCode())) {
+                            insAreaCompany.setSypolicyno(collect.get(i).getPlyNo());
+                        } else if (collect.get(i).getProdNo().equals(CProdNo.SY_XNY.getCode())) {
+                            //新能源保单号
+                            insAreaCompany.setSypolicyno(collect.get(i).getPlyNo());
+                        }
+                        //设置签单时间
+                        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                        LocalDateTime parse = LocalDateTime.parse(collect.get(i).getIssueTm(), formatter);
+                        insAreaCompany.setPayDate(parse);
+                    }
+                    //更新订单状态
+                    insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                    insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+                }
+            }
+           // return HttpResult.ok("查询订单状态成功");
+        } catch (Exception e) {
+           // throw new RuntimeException(e.getMessage());
+        }
+    }
 }

+ 71 - 0
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -544,6 +544,9 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
     }
 
 
+
+
+
     @Override
     @Transactional
     public HttpResult callBackApi(HttpServletRequest request) {
@@ -1089,4 +1092,72 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
     }
 
 
+    /**
+     * 更新内部状态和支付时间
+     */
+    @Override
+    @Transactional
+    public void insOrderInfoNew(String companyId) {
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(companyId);
+        // 获取协议配置信息
+        InsOrderStatusResp iosr = insOrderStatus(iac);
+
+        if (null != iosr && CollUtil.isNotEmpty(iosr.getData())) {
+            InsOrderStatusResp.DataDTO jqDataDTO =
+                    iosr.getData().stream().filter(a -> a.getProposalNo().equals(iac.getJqapplyno())).findFirst().orElse(null);
+            InsOrderStatusResp.DataDTO syDataDTO =
+                    iosr.getData().stream().filter(b -> b.getProposalNo().equals(iac.getSyapplyno())).findFirst().orElse(null);
+
+            //待核保订单处理
+            /**
+            if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
+                //单交
+                boolean jqBoo = null != jqDataDTO && null == syDataDTO && jqDataDTO.getUnderwriteFlag().equals("1");
+                //单商
+                boolean syBoo = null != syDataDTO && null == jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1");
+                //交商
+                boolean jqSyBoo =
+                        null != syDataDTO && null != jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1") && jqDataDTO.getUnderwriteFlag().equals("1");
+                if (jqBoo || syBoo || jqSyBoo) {
+                    iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                    更新支付链接
+                    SignatureResponse signature = guorenRequestApiComponent.signature(iac);
+                    iac.setPaymentLink(signature.getQrCode());
+
+                    insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+                    return HttpResult.ok();
+                } else {
+                    //return HttpResult.ok("核保状态未更新");
+                }
+
+            }
+            **/
+
+            boolean updateFlag = false;
+            if (null != jqDataDTO && StringUtils.isNotEmpty(jqDataDTO.getPolicyNo())) {
+                iac.setJqpolicyno(jqDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+            if (null != syDataDTO && StringUtils.isNotEmpty(syDataDTO.getPolicyNo())) {
+                iac.setSypolicyno(syDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+
+            // 支付
+            if (updateFlag) {
+                //设置支付时间
+                if(iac.getPayDate()==null){
+                    iac.setPayDate(LocalDateTime.now());
+                }
+                iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                guorenRequestApiComponent.queryNoCarPolicyNo(iac);
+                insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+               // return HttpResult.ok("订单已支付,订单状态修改完成");
+            } else {
+               // return HttpResult.error("订单还未支付哦");
+            }
+        }
+    }
+
 }

+ 74 - 0
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -42,6 +42,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -336,6 +337,9 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
      * @param companyId 子订单号
      * @return
      */
+
+
+
     @Override
     public HttpResult<Object> paymentEnquiry(String companyId) {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
@@ -723,6 +727,76 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
                 huaTaiRequestApiComponents.submitStatus(huaTaiSubmitStatusQueryRequest, HuaTaiSubmitStatusQueryResponse.class, huaTaiConfigureParameters.getInsuredCode());
         return submitStatusQueryResponse;
     }
+
+    /**
+    * @Description  更新支付状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:49
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void paymentEnquiryNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
+
+        // 1. 协议id获取配置实体
+        HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
+           //  return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
+            return;
+        }
+        // 2. 组装请求体
+        HuaTaiOrderStatusRequest orderStatusRequest = new HuaTaiOrderStatusRequest(insAreaCompany, huaTaiConfigureParameters);
+        orderStatusRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
+        HuaTaiOrderStatusResponse orderStatusResponse = huaTaiRequestApiComponents.orderStatus(orderStatusRequest,
+                HuaTaiOrderStatusResponse.class, huaTaiConfigureParameters.getInsuredCode());
+
+        boolean jqExistFlag = false;
+        boolean syExistFlag = false;
+        String jqFailReason = "";
+        String syFailReason = "";
+        List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
+        for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
+            //交强保单号存值
+            if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno().equals(payDetai.getBUSINESSNO())) {
+                if ("1".equals(payDetai.getPOLICYSTATUS())) {
+                    jqExistFlag = true;
+                    insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
+                } else {
+                    jqFailReason = payDetai.getFAILREASON();
+                }
+            }
+            //商业保单号存值
+            if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(payDetai.getBUSINESSNO())) {
+                if ("1".equals(payDetai.getPOLICYSTATUS())) {
+                    syExistFlag = true;
+                    insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
+                } else {
+                    syFailReason = payDetai.getFAILREASON();
+                }
+            }
+        }
+
+        if (jqExistFlag || syExistFlag) {
+            //设置支付时间
+            if(insAreaCompany.getPayDate()==null){
+                insAreaCompany.setPayDate(LocalDateTime.now());
+            }
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("保单生成成功");
+        } else {
+            if (StringUtils.isNotEmpty(jqFailReason) || StringUtils.isNotEmpty(syFailReason)) {
+              //  return HttpResult.error("保单生成失败,原因为:" + jqFailReason + syFailReason);
+            } else {
+              //  return HttpResult.error("保单生成失败,华泰返回异常,请联系管理员排查!");
+            }
+        }
+    }
 }
 
 

+ 15 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -2,7 +2,6 @@ package com.ydtech.modules.order.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
 import com.ydtech.modules.order.entity.InsAreaCompany;
@@ -15,7 +14,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
 
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -57,6 +55,21 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         insOrdersTrackService.addingTrajectories(insAreaCompany);
         insOrdersService.updateByOrderStatus(insAreaCompany);
     }
+    /**
+    * @Description   新的订单内部状态修改
+    * @Author  xingming
+    * @Date   2024/3/28 15:58
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void updateCompanyAndOrdersNew(InsAreaCompany insAreaCompany) {
+        baseMapper.updateById(insAreaCompany);
+        insOrdersTrackService.addingTrajectoriesNew(insAreaCompany);
+        insOrdersService.updateByOrderStatus(insAreaCompany);
+    }
 
     @Override
     public void insertCompanyAndOrders(InsAreaCompany insAreaCompany) {

+ 31 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -419,4 +419,35 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         return HttpResult.ok("核保通过");
     }
 
+
+    @Override
+    public void verifyPaymentNew(String insAreaCompanyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(insAreaCompanyId);
+        // 请求地址
+        String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_5);
+        //组装参数
+        CrawlerBaseRequest crawlerBaseRequest = new CrawlerBaseRequest(insAreaCompany.getInsOrderNo());
+        CrawlerVerifyPaymentResponse crawlerAuditResponse = insCrawlerOrderComponents.request(apiUrl, insAreaCompany.getCompanyId(),
+                PtlCrawlerApiType.API_5.getDesc(), crawlerBaseRequest, CrawlerVerifyPaymentResponse.class);
+
+        // 0未缴费,1已缴费
+        if (crawlerAuditResponse.getState() == CrawlerVerifyPaymentConstants.PAID) {
+            // 保单号
+            insAreaCompany.setJqpolicyno(crawlerAuditResponse.getJqApplication());
+            insAreaCompany.setSypolicyno(crawlerAuditResponse.getSyApplication());
+
+            //设置支付时间
+            if(insAreaCompany.getPayDate()==null){
+                insAreaCompany.setPayDate(LocalDateTime.now());
+            }
+            // 3 交叉销售
+            List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("支付成功");
+        }
+
+       // throw new SystemException("此订单还未缴费");
+    }
 }

+ 14 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersTrackServiceImpl.java

@@ -26,8 +26,20 @@ public class InsOrdersTrackServiceImpl extends ServiceImpl<InsOrdersTrackMapper,
         InsOrdersTrack insOrdersTrack = new InsOrdersTrack(insAreaCompany, sysUser.getId(), sysUser.getName());
         this.baseMapper.insert(insOrdersTrack);
     }
-
-
+    /**
+    * @Description  添加轨迹自动填充
+    * @Author  hxl
+    * @Date   2024/3/28 15:53
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void addingTrajectoriesNew(InsAreaCompany insAreaCompany) {
+        InsOrdersTrack insOrdersTrack = new InsOrdersTrack(insAreaCompany, "admin", "自动操作");
+        this.baseMapper.insert(insOrdersTrack);
+    }
 }
 
 

+ 96 - 0
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -754,6 +754,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     /**
      * 补传回调
      */
+
+
+
     @Override
     public HttpResult callbackAnOrder(String quoteOrderNo) {
 
@@ -1353,4 +1356,97 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     }
 
+     /**
+     * @Description  更新订单状态和支付时间
+     * @Author  xingming
+     * @Date   2024/3/28 16:55
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    @Override
+    public void callbackAnOrderNew(String insAreaCompanyId) {
+
+        InsAreaCompany iac = insAreaCompanyService.getById(insAreaCompanyId);
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+        //AssertionUtils.isEmpty(iac, "报价订单不存在");
+
+        if (StringUtils.isEmpty(iac.getAgreementId())) {
+           // return HttpResult.error("协议号空");
+        }
+
+        // 获取协议配置信息
+        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
+
+        //0 支付回调 1核保回调 5直接返回字符串信息
+        String type = "5";
+        //组装参数
+        CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac, ycConfigureParameters.gainAuthorityDataXml(), type);
+        //接口请求
+        try {
+            submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
+            String cleanStr = yongchengRequestApiComponents.payCallback(o);
+            CallBackRequest param = CallBackRequest.buildCallBackParam(cleanStr);
+            log.info("永诚API方式 - 补传回调 - 参数:{},车牌号:{}", JSON.toJSONString(param), order.getLicenseno());
+
+            //成功
+            if (param.getResult().equals("0")) {
+
+                if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
+                    /**
+                    buildCallBackStatus(iac, param.getJqstatus());
+                    if (StringUtils.isNotEmpty(param.getBizPolicyNo())) {
+                        iac.setSypolicyno(param.getBizPolicyNo());
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getCiPolicyNo())) {
+                        iac.setJqpolicyno(param.getCiPolicyNo());
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getYwPolicyAppNo())) {
+                        DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+                        drivingInsuranceDto.setPolicyNumber(param.getYwPolicyNo());
+                        drivingInsuranceDto.setApplicationNumber(param.getYwPolicyAppNo());
+                        JSONArray objects = JSON.parseArray(JSON.toJSONString(Collections.singletonList(drivingInsuranceDto)));
+                        iac.setCrossInsurance(objects);
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getPay_date()) && !"null".equals(param.getPay_date())) {
+                        iac.setPayDate(LocalDateTime.parse(param.getPay_date(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+                    }
+                    **/
+                } else {
+                    iac = buildCallBack(iac, param);
+                }
+                /**
+                if (iac.getOrderstatus().equals(InsOrderStatusEnum.TO_BACK.getCode())) {
+                    iac.setAuditopinion("交强审核意见:" + param.getJqmessage() + "| 商业审核意见:" + param.getSymessage());
+                }
+                **/
+                //设置支付时间
+                if(iac.getPayDate()==null){
+                    iac.setPayDate(LocalDateTime.now());
+                }
+                StringBuffer sss = new StringBuffer();
+                sss.append("变更前订单状态:" + order.getOrderstatus());
+                sss.append("变更前子订单状态:" + iac.getOrderstatus());
+                sss.append("变更后订单状态:" + order.getOrderstatus());
+                log.info("-----------订单状态变动----------:" + sss);
+                insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+
+            } else {
+                //失败原因
+                log.info(String.format("永诚API方式 - 补传回调 - 失败,交强保单号:{} ,商业保单号:{},类型:{}", param.getCiPolicyNo(), param.getBizPolicyNo(),
+                        param.getType()));
+               // return HttpResult.error(param.getMessage());
+            }
+            //return HttpResult.ok("操作成功,状态已更新。");
+        } catch (JsonProcessingException jsonProcessingException) {
+            jsonProcessingException.printStackTrace();
+        }
+
+       // throw new SystemException("获取支付连接失败");
+    }
+
 }

+ 51 - 1
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java

@@ -279,7 +279,6 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         insImagesUploadCacheComponents.setUploadImageCache(companyId, insTaskImagesBase64s);
         return HttpResult.ok("上传文件成功");
     }
-
     @Override
     public HttpResult<Object> underwritingCallback(CoverageRequest coverageRequest) {
         try {
@@ -688,6 +687,57 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         return sumAmount;
     }
 
+    /**
+    * @Description  更新投保状态和支付状态
+    * @Author  hxl
+    * @Date   2024/3/28 17:04
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void paymentEnquiryNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
+            //return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
+            return;
+        }
+
+        // 2. 组装请求体
+        OrderStatusRequest orderStatusRequest = new OrderStatusRequest();
+        orderStatusRequest.setBusinessNo(insAreaCompany.getId());
+        orderStatusRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+
+        OrderStatusResponse orderStatusResponse = zhongmeiRequestApiComponents.orderStatus(orderStatusRequest, OrderStatusResponse.class);
+        String status = orderStatusResponse.getStatus();
+
+        // 3. 承保成功修改状态
+        if (status.equals(String.valueOf(PaymentStatusEnum.P_2.getCode()))) {
+            insAreaCompany.setJqpolicyno(orderStatusResponse.getSubContractNoJ());
+            insAreaCompany.setSypolicyno(orderStatusResponse.getSubContractNoS());
+            String payDate = orderStatusResponse.getPayDate();
+            //支付时间
+            if (StringUtils.isNotEmpty(payDate)) {
+                insAreaCompany.setPayDate(LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+            }
+            if (orderStatusResponse.getAccidentPolicyNos() != null) {
+                insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(orderStatusResponse.getAccidentPolicyNos())));
+            }
+            //承保状态
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+
+            //return HttpResult.ok(PaymentStatusEnum.P_2.getMeaning());
+        }
+
+        //return HttpResult.error(Enum.valueOf(PaymentStatusEnum.class, "P_" + status).getMeaning());
+    }
 }
 
 

+ 46 - 1
src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

@@ -391,7 +391,12 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 
         return HttpResult.ok("撤单成功");
     }
-
+    /**
+     *  @version 
+     *  @author: hxl
+     *  @Date: 2024/3/28 16:03
+     *  @Description:
+     */ 
     @Override
     public HttpResult<Object> paymentCallbacks(PaymentCallbacksRequest paymentCallbacksRequest) {
 
@@ -575,6 +580,46 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 //        feeRuleSchemeService.dealFeeOrderInfo(quoteInfoVo, quoteRespVo, ptlAgreementAttribution.getId(), insAreaCompany.getId());
         return HttpResult.ok("报价成功", quoteRespVo);
     }
+    /**
+    * @Description  更新订单状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:17
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void getOrderDetailNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+
+        // 1 通过 协议id获取配置实体
+        HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(insAreaCompany.getAgreementId());
+
+        // 2 请求查看订单状态
+        OrderNoRequest orderNoRequest = new OrderNoRequest(insAreaCompany.getId());
+        QueryOrderDetailResponse queryOrderDetailResponse = zijinRequestApiComponents.getOrderDetail(orderNoRequest, httpHeaders);
+        QueryOrderDetailResponse.ResultObjDTO resultObj = queryOrderDetailResponse.getResultObj();
+
+        String orderStatus = resultObj.getOrderStatus();
 
+        // 3. 订单生效以后修改状态
+        if (OrderStatusEnum.O_4.getCode().equals(orderStatus)) {
+            // 3.1 非车险订单存入数据
+            String payTime = resultObj.getPayTime();
+            //更新支付时间
+            if (StringUtils.isNotEmpty(payTime)) {
+                insAreaCompany.setPayDate(LocalDateTime.parse(payTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+            }
 
+            List<DrivingInsuranceDto> drivingInsuranceDto = queryOrderDetailResponse.getDrivingInsuranceDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsuranceDto)));
+            //更新承保状态
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("订单已支付,订单状态修改完成");
+        }
+
+        //return HttpResult.ok("订单还未支付哦.");
+    }
 }

+ 15 - 7
src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.order.components.gouren.GuorenRequestApiComponent;
 import com.ydtech.modules.order.components.huatai.HuaTaiRequestApiComponents;
 import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
 import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
+import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
 import com.ydtech.modules.xxl.service.BaseQueryStatusService;
@@ -24,37 +25,44 @@ public class QueryStatusFactory {
             return new YongChengQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (YongchengRequestApiComponents) map.get("yongchengRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (YongchengOrderApiService) map.get("yongchengOrderApiService"));
         } else if (companyId.startsWith("DJPC1000000")) {
             return new DaJiaQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (DaJiaRequestApiComponents) map.get("daJiaRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (DaJiaOrderService) map.get("daJiaOrderService"));
         } else if (companyId.startsWith("XDCX1000000")){
             return new GuoRenQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (GuorenRequestApiComponent) map.get("guorenRequestApiComponent"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (GuorenOrderApiService) map.get("guorenOrderApiService"));
         } else if(companyId.startsWith("HTIC1000000")){
             return new HuaTaiQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (HuaTaiRequestApiComponents) map.get("huaTaiRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (HuaTaiOrderApiService) map.get("huaTaiOrderApiService"));
         } else if(companyId.startsWith("ZMBX1000000")){
             return new ZhongMeiQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZhongmeiRequestApiComponents) map.get("zhongmeiRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (ZhongMeiOrderApiService) map.get("zhongMeiOrderApiService"));
         } else if(companyId.startsWith("ZKIC1000000")){
             return new ZijinQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZijinRequestApiComponents) map.get("zijinRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (ZijinOrderApiService) map.get("zijinOrderApiService"));
         } else if(companyId.startsWith("TPBX1000000") || companyId.startsWith("TPIC1000000") || companyId.startsWith("HBIC1000000") || companyId.startsWith("GPIC1000000") ||
                     companyId.startsWith("HNIC1000000") || companyId.startsWith("ZAPA1000000")){
-            return new ReptileQueryStatusService(
+            return new InsCrawlerQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (PtlCrawlerApiService) map.get("ptlCrawlerApiService"),
+                    (InsCrawlerOrderComponents) map.get("insCrawlerOrderComponents"),
                     (InsCrawlerOrderComponents) map.get("insCrawlerOrderComponents"));
         } else {
             return null;

+ 4 - 6
src/main/java/com/ydtech/modules/xxl/handler/QueryStatusHandler.java

@@ -1,8 +1,6 @@
 package com.ydtech.modules.xxl.handler;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xxl.job.core.handler.annotation.XxlJob;
-import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
 import com.ydtech.modules.order.components.ZhongmeiRequestApiComponents;
@@ -12,16 +10,13 @@ import com.ydtech.modules.order.components.huatai.HuaTaiRequestApiComponents;
 import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
 import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
-import com.ydtech.modules.order.entity.InsOrders;
-import com.ydtech.modules.order.entity.InsOrdersTrack;
 import com.ydtech.modules.order.service.InsOrdersTrackService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
+import com.ydtech.modules.xxl.factory.QueryStatusFactory;
 import com.ydtech.modules.xxl.mapper.XxlInsAreaCompanyMapper;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
-import com.ydtech.modules.xxl.model.QueryStatusResult;
 import com.ydtech.modules.xxl.service.BaseQueryStatusService;
-import com.ydtech.modules.xxl.factory.QueryStatusFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -94,6 +89,8 @@ public class QueryStatusHandler {
                     //根据保险公司编号id获取对应的承保接口的service
                     BaseQueryStatusService queryStatusService = QueryStatusFactory.getQueryStatusService(components, insAreaCompany.getCompanyId());
                     if (queryStatusService != null) {
+                        queryStatusService.updateOrderStatusAndPayDate(insAreaCompany);
+                        /**
                         QueryStatusResult queryStatusResult = queryStatusService.queryStatus(insAreaCompany);
                         if (queryStatusResult.getStatus()) {
                             //更新 ins_area_company
@@ -128,6 +125,7 @@ public class QueryStatusHandler {
                             insOrdersTrack.setCreateTime(LocalDateTime.now());
                             insOrdersTrackService.save(insOrdersTrack);
                         }
+                         **/
                     }
                 } catch (Exception e) {
                     e.printStackTrace();

+ 2 - 0
src/main/java/com/ydtech/modules/xxl/service/BaseQueryStatusService.java

@@ -7,4 +7,6 @@ import org.springframework.stereotype.Service;
 @Service
 public interface BaseQueryStatusService {
     QueryStatusResult queryStatus(InsAreaCompany insAreaCompany);
+
+    void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany);
 }

+ 17 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/DaJiaQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.dajia.DaJiaRequestApiComponents;
 import com.ydtech.modules.order.entity.api.dajia.DaJiaConfigureParameters;
 import com.ydtech.modules.order.entity.api.dajia.request.ODR2010Request;
 import com.ydtech.modules.order.entity.api.dajia.response.ODR2010Response;
+import com.ydtech.modules.order.service.DaJiaOrderService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -28,6 +29,9 @@ public class DaJiaQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final DaJiaRequestApiComponents daJiaRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final DaJiaOrderService daJiaOrderService;
+
+
 
     /**
      *
@@ -64,4 +68,17 @@ public class DaJiaQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        daJiaOrderService.verifyPaymentNew(insAreaCompany.getId());
+    }
 }

+ 15 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/GuoRenQueryStatusService.java

@@ -6,6 +6,7 @@ import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.gouren.GuorenRequestApiComponent;
 import com.ydtech.modules.order.entity.api.guoren.constants.PlatformInterfaceCode;
 import com.ydtech.modules.order.entity.api.guoren.request.ApplicationDetailsRequest;
+import com.ydtech.modules.order.service.GuorenOrderApiService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
 import com.ydtech.modules.xxl.model.QueryStatusResult;
@@ -29,6 +30,7 @@ public class GuoRenQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final GuorenRequestApiComponent guorenRequestApiComponent;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final GuorenOrderApiService  guorenOrderApiService;
 
     public InsOrderStatusResp insOrderStatus(InsAreaCompany iac) {
         ApplicationDetailsRequest applicationDetailsRequest = new ApplicationDetailsRequest();
@@ -76,4 +78,17 @@ public class GuoRenQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        guorenOrderApiService.insOrderInfoNew(insAreaCompany.getId());
+    }
 }

+ 15 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/HuaTaiQueryStatusService.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.order.entity.api.huatai.constants.HuaTaiSubmitCommon;
 import com.ydtech.modules.order.entity.api.huatai.request.HuaTaiSubmitStatusQueryRequest;
 import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiSubmitStatusQueryResponse;
 import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
+import com.ydtech.modules.order.service.HuaTaiOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -32,6 +33,7 @@ public class HuaTaiQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final HuaTaiRequestApiComponents huaTaiRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final HuaTaiOrderApiService huaTaiOrderApiService;
 
     public HuaTaiSubmitStatusQueryResponse submitStatus(InsAreaCompany insAreaCompany,
                                                          HuaTaiConfigureParameters huaTaiConfigureParameters,
@@ -152,4 +154,17 @@ public class HuaTaiQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        huaTaiOrderApiService.paymentEnquiryNew(insAreaCompany.getId());
+    }
 }

+ 23 - 1
src/main/java/com/ydtech/modules/xxl/service/impl/ReptileQueryStatusService.java → src/main/java/com/ydtech/modules/xxl/service/impl/InsCrawlerQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
 import com.ydtech.modules.order.entity.crawler.constants.CrawlerVerifyPaymentConstants;
 import com.ydtech.modules.order.entity.crawler.request.CrawlerBaseRequest;
 import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
+import com.ydtech.modules.order.service.InsCrawlerOrderService;
 import com.ydtech.modules.protocol.entity.constants.PtlCrawlerApiType;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -18,11 +19,20 @@ import java.time.format.DateTimeFormatter;
 
 @Service
 @RequiredArgsConstructor
-public class ReptileQueryStatusService implements BaseQueryStatusService {
+/**
+ *  @version 爬虫对接
+ *  @author: hxl
+ *  @Date: 2024/3/28 17:38
+ *  @Description:
+ */
+public class InsCrawlerQueryStatusService implements BaseQueryStatusService {
 
     private final ConfigureParametersComponents configureParametersComponents;
     private final PtlCrawlerApiService ptlCrawlerApiService;
     private final InsCrawlerOrderComponents insCrawlerOrderComponents;
+    private final InsCrawlerOrderService insCrawlerOrderService;
+
+
     /**
      *
      * @param insAreaCompany 业务订单
@@ -46,4 +56,16 @@ public class ReptileQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+     /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        insCrawlerOrderService.verifyPaymentNew(insAreaCompany.getId());
+    }
 }

+ 16 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/YongChengQueryStatusService.java

@@ -11,6 +11,7 @@ import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponen
 import com.ydtech.modules.order.entity.api.yongcheng.constants.MessageStatusCode;
 import com.ydtech.modules.order.entity.api.yongcheng.request.AccidentUnderwritingRequest;
 import com.ydtech.modules.order.entity.api.yongcheng.response.AccidentUnderwritingResponse;
+import com.ydtech.modules.order.service.YongchengOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -36,6 +37,8 @@ public class YongChengQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final YongchengRequestApiComponents yongchengRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+
+    private final YongchengOrderApiService yongchengOrderApiService;
     public void submitPolicy(BigDecimal jyPremium, YcConfigureParameters ycConfigureParameters, String insOrderNo) throws JsonProcessingException {
         if (jyPremium.compareTo(new BigDecimal(0)) <= 0) {
             return;
@@ -108,4 +111,17 @@ public class YongChengQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        yongchengOrderApiService.callbackAnOrderNew(insAreaCompany.getId());
+    }
 }

+ 18 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/ZhongMeiQueryStatusService.java

@@ -7,6 +7,7 @@ import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.PaymentStatu
 import com.ydtech.modules.order.entity.api.zhongmei.request.OrderStatusRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.response.OrderStatusResponse;
 import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
+import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -28,6 +29,10 @@ public class ZhongMeiQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final ZhongmeiRequestApiComponents zhongmeiRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final ZhongMeiOrderApiService zhongMeiOrderApiService;
+
+
+
     /**
      *
      * @param insAreaCompany 业务订单
@@ -64,4 +69,17 @@ public class ZhongMeiQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        zhongMeiOrderApiService.paymentEnquiryNew(insAreaCompany.getId());
+    }
 }

+ 17 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/ZijinQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.OrderStatusEnum;
 import com.ydtech.modules.order.entity.api.zijin.request.OrderNoRequest;
 import com.ydtech.modules.order.entity.api.zijin.response.QueryOrderDetailResponse;
+import com.ydtech.modules.order.service.ZijinOrderApiService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
 import com.ydtech.modules.xxl.model.QueryStatusResult;
@@ -25,6 +26,9 @@ public class ZijinQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final ZijinRequestApiComponents zijinRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final ZijinOrderApiService zijinOrderApiService;
+
+
 
     /**
      *
@@ -55,4 +59,17 @@ public class ZijinQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        zijinOrderApiService.getOrderDetailNew(insAreaCompany.getId());
+    }
 }