Browse Source

工作室批量修改

helixiao 1 year ago
parent
commit
91004c5468

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

@@ -249,31 +249,31 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
     @Override
     public HttpResult<Object> verifyPayment(String subOrderNo) {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
-//        // 请求地址
-//        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());
-//            // 3 交叉销售
-//            List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
-//            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
-//
-//            //  add  by  hxl  添加自动更新状态
-//            insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
+        // 请求地址
+        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());
+            // 3 交叉销售
+            List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
+
+            //  add  by  hxl  添加自动更新状态
+            insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
 
             insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
             return HttpResult.ok("支付成功");
-//        }
-//
-//        throw new SystemException("此订单还未缴费");
+        }
+
+        throw new SystemException("此订单还未缴费");
     }
 
     @Override