Bläddra i källkod

Merge remote-tracking branch 'origin/test' into test

dongxin 1 år sedan
förälder
incheckning
b2fdb245db

+ 3 - 6
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -2012,13 +2012,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                         item.setHandlingFeesStatus("2");
                         if (StringUtils.isNotEmpty(item.getTaskId())) {
                             return HttpResult.error("该单据已经开票 ");
+                        }else {
+                            item.setTaskId(importResult.getId());
+                            item.setSettlementTime(LocalDateTime.now());
                         }
-
-//                        else {
-//                            item.setTaskId(importResult.getId());
-//                            item.setSettlementTime(LocalDateTime.now());
-//                            baseMapper.updateById(item);
-//                        }
                     }
                     this.saveOrUpdateBatch(insPlyIncomes);
                 }

+ 10 - 1
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangSubmitResponse.java

@@ -2,6 +2,8 @@ package com.ydtech.modules.order.entity.api.yangguang.response;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
@@ -94,7 +96,7 @@ public class YangGuangSubmitResponse extends YangGuangBaseResponse {
     private List<Clause> Clause;
 
     @JSONField(name = "PtptNonVehicleProductInformationList")
-    private JSONArray PtptNonVehicleProductInformationList;
+    private List<PtptNonVehicleProductInformationList> PtptNonVehicleProductInformationList;
 
     @Data
     public static class Clause implements Serializable {
@@ -129,5 +131,12 @@ public class YangGuangSubmitResponse extends YangGuangBaseResponse {
         private String FcSumPremium;
 
         private String FcProposalNo;
+
+        public DrivingInsuranceDto toDrivingInsuranceDto() {
+            DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+            drivingInsuranceDto.setCode(this.getFcProduct());
+            drivingInsuranceDto.setApplicationNumber(this.getFcProposalNo());
+            return drivingInsuranceDto;
+        }
     }
 }

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

@@ -25,6 +25,7 @@ import com.ydtech.modules.order.entity.api.yangguang.request.*;
 import com.ydtech.modules.order.entity.api.yangguang.response.*;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.BusType;
 import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import com.ydtech.modules.order.entity.dto.ReadPdfUrlListDto;
 import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
 import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
@@ -43,6 +44,7 @@ import com.ydtech.utils.StringUtils;
 import com.ydtech.utils.baidu.FileUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.bcel.generic.LSTORE;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -243,7 +245,12 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
         }
         if (yangGuangSubmitResponse.getPtptNonVehicleProductInformationList() != null) {
-            insAreaCompany.setCrossInsurance(yangGuangSubmitResponse.getPtptNonVehicleProductInformationList());
+            List<DrivingInsuranceDto> collect =
+                    yangGuangSubmitResponse.getPtptNonVehicleProductInformationList()
+                                    .stream().map(YangGuangSubmitResponse.PtptNonVehicleProductInformationList::toDrivingInsuranceDto)
+                                    .collect(Collectors.toList());
+            JSONArray objects = JSON.parseArray(JSON.toJSONString(collect));
+            insAreaCompany.setCrossInsurance(objects);
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
         }
         // 核保转人工
@@ -275,7 +282,12 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
         insAreaCompany.setJqapplyno(yangGuangSubmitResponse.getCiProposalNo() != null ? yangGuangSubmitResponse.getCiProposalNo() :"");
         insAreaCompany.setSyapplyno(yangGuangSubmitResponse.getBiProposalNo() != null ? yangGuangSubmitResponse.getBiProposalNo() :"");
         if (yangGuangSubmitResponse.getPtptNonVehicleProductInformationList() != null) {
-            insAreaCompany.setCrossInsurance(yangGuangSubmitResponse.getPtptNonVehicleProductInformationList());
+            List<DrivingInsuranceDto> collect =
+                    yangGuangSubmitResponse.getPtptNonVehicleProductInformationList()
+                            .stream().map(YangGuangSubmitResponse.PtptNonVehicleProductInformationList::toDrivingInsuranceDto)
+                            .collect(Collectors.toList());
+            JSONArray objects = JSON.parseArray(JSON.toJSONString(collect));
+            insAreaCompany.setCrossInsurance(objects);
         }
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
 
@@ -425,7 +437,13 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             insAreaCompany.setSypolicyno(yangGuangProposalStatusQueryResponse.getBiPolicyNo());
             insAreaCompany.setJqapplyno(yangGuangProposalStatusQueryResponse.getCiProposalNo());
             insAreaCompany.setSyapplyno(yangGuangProposalStatusQueryResponse.getBiProposalNo());
-            insAreaCompany.setAccidentStrInfo(yangGuangProposalStatusQueryResponse.getFCPolicyNo());
+            // 保存非车保单号
+            String fc = yangGuangProposalStatusQueryResponse.getFCPolicyNo();
+            JSONArray object = insAreaCompany.getCrossInsurance();
+            JSONObject newObj = new JSONObject();
+            newObj.put("policyNumber", fc);
+            object.add(newObj);
+            insAreaCompany.setCrossInsurance(object);
             insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
             return HttpResult.ok("更新状态成功");

+ 5 - 0
src/main/java/com/ydtech/utils/OrderUtils.java

@@ -92,6 +92,11 @@ public class OrderUtils {
                 List<AccidentResponseVo> javaList = crossInsuranceJson.toJavaList(AccidentResponseVo.class);
                 return javaList.get(0).getPolicyNumber();
             }
+            //阳光
+            if (companyId.contains(InsuranceEnum.YGBX.getCode())) {
+                List<AccidentResponseVo> javaList = crossInsuranceJson.toJavaList(AccidentResponseVo.class);
+                return javaList.get(0).getPolicyNumber();
+            }
         }
 
         return "";

+ 2 - 2
src/main/resources/application-prod.yml

@@ -238,7 +238,7 @@ yc:
   api:
     # 回调地址
     payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yongCheng/callBack
-    url: http://www.yongcheng.com:17002/
+    url: http://39.98.214.159/yongcheng/
   #    url: http://140.206.189.151:17000/
 
 zm:
@@ -293,7 +293,7 @@ zijin:
     # 新支付
     newPayUrl: http://open.zking.com/api/v1/open/open-aggregate/auth/newPay
     # 订单详情查询服务
-    orderUrl: http://open.zking.com/api/v1/insurance/public/getOrderDetail
+    orderUrl: http://open.zking.com/api/v1/business-order/insurance-order/auth/order/queryOrderDetailById
     # 订单状态查询
     orderDetailUrl: http://open.zking.com/api/v1/insurance/autoMobile/geelyCarInsurance/queryOrderDetail
     # 下载保单地址

+ 2 - 2
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -3610,8 +3610,8 @@
     </select>
 
     <select id="getSumEntryStatus" resultType="java.util.HashMap">
-            select ifnull( COUNT( CASE WHEN iac.entry_status = '2' THEN 1 END ),0) as "entryStatus",
-                   ifnull(COUNT( CASE WHEN iac.entry_status = '3' THEN 1 END ),0) as "outStatus"
+            select ifnull( COUNT( CASE WHEN io.entry_status = '2' THEN 1 END ),0) as "entryStatus",
+                   ifnull(COUNT( CASE WHEN io.entry_status = '3' THEN 1 END ),0) as "outStatus"
             from ins_area_company   iac
             left join  ins_orders io  on  iac.orderno  =io.orderno
             <where>