소스 검색

订单详情增加返回出口总费用和代理人留点总费用;报价查询费用异常systemCode缺失修复;核保查询费用systemCode缺失修复;保存权益时补充订单号;

郭子栋 5 달 전
부모
커밋
229f2d132e

+ 5 - 0
commons/src/main/java/com/jzg/commons/entity/vo/InsFeeOrdersVo.java

@@ -157,5 +157,10 @@ public class InsFeeOrdersVo {
         this.availableAmount = insFeeOrders.getAvailableAmount() != null ? insFeeOrders.getAvailableAmount() : BigDecimal.ZERO;
         this.remainingAmount = insFeeOrders.getRemainingAmount() != null ? insFeeOrders.getRemainingAmount() : BigDecimal.ZERO;
         this.usedAmount = insFeeOrders.getUsedAmount() != null ? insFeeOrders.getUsedAmount() : BigDecimal.ZERO;
+
+        //出口总费用
+        this.totalExportPremium = insFeeOrders.getJqExportPremium().add(insFeeOrders.getSyExportPremium().add(insFeeOrders.getJyExportPremium()));
+        //出口留点总费用
+        this.totalExportKeepPointPremium = insFeeOrders.getJqExportKeepPointPremium().add(insFeeOrders.getSyExportKeepPointPremium().add(insFeeOrders.getJyExportKeepPointPremium()));
     }
 }

+ 1 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/OrgClient.java

@@ -174,7 +174,7 @@ public interface OrgClient {
      * 获取费用信息
      */
     @GetMapping(value = "/ptlAgreementCost/queryById")
-    public HttpResult queryCostById(@RequestParam("id") String id, @RequestHeader("Authorization") String authToken);
+    public HttpResult queryCostById(@RequestParam("id") String id, @RequestHeader("Authorization") String authToken,@RequestHeader("system_code")String systemCode);
 
     /**
      * 获取承保规则详情

+ 1 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/aspect/AuditVerificationAspect.java

@@ -95,7 +95,7 @@ public class AuditVerificationAspect {
 
             // 通过费用id 查找规则id
             String costId = insFeeOrders.getCostId();
-            HttpResult httpResult = orgClient.queryCostById(costId,baseController.getToken());
+            HttpResult httpResult = orgClient.queryCostById(costId,baseController.getToken(),baseController.getSystemCode());
             AssertionUtils.isFail(httpResult.getCode() == 500,"费用查找失败");
             PtlAgreementCost ptlAgreementCost = JSONObject.parseObject(JSONObject.toJSONString(httpResult.getData()),PtlAgreementCost.class);
             AssertionUtils.isFail(Objects.isNull(ptlAgreementCost),"费用查找失败");

+ 5 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/client/LocalLivingClient.java

@@ -1,10 +1,11 @@
 package com.jzg.quotation.summary.client;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.jzg.quotation.summary.entity.Result;
 import com.jzg.quotation.summary.entity.dto.*;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsPackageVO;
 import com.jzg.quotation.summary.entity.vo.ChannelRightsVO;
+import com.jzg.quotation.summary.utils.FeignConfig;
 import jakarta.validation.Valid;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
@@ -14,7 +15,7 @@ import java.util.List;
 /**
  * 调用生活服务平台client
  */
-@FeignClient(value = "jeecg-boot", url = "${feign.client.jeecg-boot.url}")
+@FeignClient(value = "jeecg-boot", url = "${feign.client.jeecg-boot.url}" ,configuration = FeignConfig.class)
 public interface LocalLivingClient {
     /**
      * 渠道api认证-登录
@@ -44,7 +45,7 @@ public interface LocalLivingClient {
      * @return 分页结果
      */
     @PostMapping(value = "/channel/api/rightsGrant/package/list")
-    Result<Page<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO);
+    Result<IPage<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO);
 
     /**
      * 查询权益套餐明细
@@ -60,5 +61,5 @@ public interface LocalLivingClient {
      * @return 分页结果
      */
     @PostMapping(value = "/channel/api/rightsGrant/rights/list")
-    Result<Page<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO);
+    Result<IPage<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO);
 }

+ 7 - 7
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/RightsGrantController.java

@@ -1,6 +1,6 @@
 package com.jzg.quotation.summary.controller;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.quotation.summary.client.LocalLivingClient;
 import com.jzg.quotation.summary.entity.Result;
@@ -74,11 +74,11 @@ public class RightsGrantController {
 
     @Operation(summary = "权益套餐-分页查询")
     @PostMapping(value = "package/list")
-    public HttpResult<Page<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO) {
+    public HttpResult<IPage<ChannelRightsPackageVO>> queryRightsPackagePage(@RequestBody ChannelRightsPackageQueryDTO queryDTO) {
         //调生活服务平台
-        Result<Page<ChannelRightsPackageVO>> result = localLivingClient.queryRightsPackagePage(queryDTO);
+        Result<IPage<ChannelRightsPackageVO>> result = localLivingClient.queryRightsPackagePage(queryDTO);
         //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
-        HttpResult<Page<ChannelRightsPackageVO>> rightsPackageResult = new HttpResult<>();
+        HttpResult<IPage<ChannelRightsPackageVO>> rightsPackageResult = new HttpResult<>();
 
         rightsPackageResult.setData(result.getResult());
         rightsPackageResult.setCode(result.getCode());
@@ -107,11 +107,11 @@ public class RightsGrantController {
      */
     @Operation(summary = "权益券-分页查询")
     @PostMapping(value = "/rights/list")
-    public HttpResult<Page<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO) {
+    public HttpResult<IPage<ChannelRightsVO>> queryRightsPage(@RequestBody ChannelRightsQueryDTO queryDTO) {
         //调生活服务平台
-        Result<Page<ChannelRightsVO>> result = localLivingClient.queryRightsPage(queryDTO);
+        Result<IPage<ChannelRightsVO>> result = localLivingClient.queryRightsPage(queryDTO);
         //把生活服务平台查询到的数据封装成返回jzg前端HttpResult对象
-        HttpResult<Page<ChannelRightsVO>> rightsResult = new HttpResult<>();
+        HttpResult<IPage<ChannelRightsVO>> rightsResult = new HttpResult<>();
         rightsResult.setData(result.getResult());
         rightsResult.setCode(result.getCode());
         rightsResult.setMsg(result.getMessage());

+ 2 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrderRightsInfoServiceImpl.java

@@ -75,6 +75,7 @@ public class InsOrderRightsInfoServiceImpl implements InsOrderRightsInfoService
                     insOrderRights.setReceiverMobile(rightsGrantReceiverDTO.getReceiverMobile());
                     insOrderRights.setReceiverName(rightsGrantReceiverDTO.getReceiverName());
                     insOrderRights.setReceiverType(rightsGrantReceiverDTO.getReceiverType());
+                    insOrderRights.setOrderId(insFeeOrders.getOrderNo());
                     insOrderRightsList.add(insOrderRights);
                 }
                 insOrderRightsService.saveInsOrderRights(insOrderRightsList);
@@ -92,6 +93,7 @@ public class InsOrderRightsInfoServiceImpl implements InsOrderRightsInfoService
                     insOrderRightsPackage.setReceiverMobile(rightsGrantReceiverDTO.getReceiverMobile());
                     insOrderRightsPackage.setReceiverName(rightsGrantReceiverDTO.getReceiverName());
                     insOrderRightsPackage.setReceiverType(rightsGrantReceiverDTO.getReceiverType());
+                    insOrderRightsPackage.setOrderId(insFeeOrders.getOrderNo());
                     insOrderRightsPackageList.add(insOrderRightsPackage);
                 }
                 insOrderRightsPackageService.saveInsOrderRightsPackage(insOrderRightsPackageList);

+ 88 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/utils/FeignConfig.java

@@ -0,0 +1,88 @@
+package com.jzg.quotation.summary.utils;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import org.springframework.beans.factory.ObjectFactory;
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
+import org.springframework.cloud.openfeign.support.SpringDecoder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 类描述:
+ *
+ * @author Administrator
+ * @version 1.0
+ * @date 2026/3/21 10:09
+ */
+// 1. 创建配置文件
+@Configuration
+public class FeignConfig {
+    @Bean
+    public ObjectMapper objectMapper() {
+        ObjectMapper mapper = new ObjectMapper();
+
+        // 注册 Java 8 时间模块
+        mapper.registerModule(new JavaTimeModule());
+        mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+
+        // 注册 IPage 反序列化器
+        SimpleModule module = new SimpleModule();
+        module.addDeserializer(IPage.class, new JsonDeserializer<IPage<?>>() {
+            @Override
+            public IPage<?> deserialize(JsonParser p, DeserializationContext ctxt)
+                    throws IOException {
+                ObjectMapper mapper = (ObjectMapper) p.getCodec();
+                JsonNode node = mapper.readTree(p);
+
+                Page<Object> page = new Page<>();
+
+                if (node.has("records") && node.get("records").isArray()) {
+                    List<Object> records = new ArrayList<>();
+                    for (JsonNode item : node.get("records")) {
+                        records.add(mapper.treeToValue(item, Object.class));
+                    }
+                    page.setRecords(records);
+                }
+
+                if (node.has("total")) {
+                    page.setTotal(node.get("total").asLong());
+                }
+                if (node.has("size")) {
+                    page.setSize(node.get("size").asLong());
+                }
+                if (node.has("current")) {
+                    page.setCurrent(node.get("current").asLong());
+                }
+                if (node.has("pages")) {
+                    page.setPages(node.get("pages").asLong());
+                }
+
+                return page;
+            }
+        });
+
+        mapper.registerModule(module);
+        return mapper;
+    }
+    @Bean
+    public SpringDecoder feignDecoder(ObjectMapper objectMapper) {
+        // 使用 Spring 的 HttpMessageConverter
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        converter.setObjectMapper(objectMapper);
+
+        ObjectFactory<HttpMessageConverters> objectFactory = () -> new HttpMessageConverters(converter);
+        return new SpringDecoder(objectFactory);
+    }
+}
+