jinshihui 10 meses atrás
pai
commit
106fa6797e
21 arquivos alterados com 475 adições e 186 exclusões
  1. 183 0
      CLAUDE.md
  2. 3 0
      commons/src/main/java/com/jzg/commons/core/base/BaseController.java
  3. 1 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java
  4. 1 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/PlatformClient.java
  5. 3 5
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  6. 1 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/config/WebClientConfig.java
  7. 3 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  8. 10 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java
  9. 133 133
      tenant/insurance/quotation-zijin/CLAUDE.md
  10. 25 16
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java
  11. 16 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/ZiJinCrawlerTokenInfo.java
  12. 15 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerCheckCaptchaRequest.java
  13. 10 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerCheckTokenRequest.java
  14. 19 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerCheckCaptchaResponse.java
  15. 16 4
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerCheckTokenResponse.java
  16. 1 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/RequestUrl.java
  17. 27 12
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerQuoteProcessServiceImpl.java
  18. 7 7
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerRequestImpl.java
  19. 0 0
      tenant/insurance/quotation-zijin/src/main/resources/js/auto.js
  20. 1 1
      tenant/insurance/quotation-zijin/src/main/resources/js/content.js
  21. 0 0
      tenant/insurance/quotation-zijin/src/main/resources/js/tsssss.js

+ 183 - 0
CLAUDE.md

@@ -0,0 +1,183 @@
+# CLAUDE.md
+
+此文件为Claude Code (claude.ai/code) 提供在此代码库中工作的指导。
+
+## AI 行为规则
+
+### 语言偏好
+- **始终使用中文回答所有问题和响应**
+- 所有代码注释使用中文
+- 文档和说明使用中文
+
+### 沟通风格
+- 使用简洁、专业的中文表达
+- 技术术语优先使用中文翻译,必要时用括号注明英文原文
+- 避免过度使用专业术语,确保清晰易懂
+
+## 项目概述
+
+这是一个基于Spring Boot 3.0.0构建的大规模多模块Maven保险报价服务平台(jzg)。该系统集成多家保险公司,提供车辆保险报价和管理服务。
+
+## 架构
+
+### 技术栈
+- **框架**: Spring Boot 3.0.0 与 Spring Security
+- **Java版本**: 17
+- **数据库**: MySQL 8.0.26 配合 MyBatis-Plus 3.5.7
+- **缓存**: Redis 配合 Redisson 3.23.3
+- **消息队列**: RocketMQ 2.2.1
+- **服务发现**: 阿里巴巴 Nacos
+- **API网关**: Spring Cloud Gateway
+- **文档**: SpringDoc OpenAPI (Swagger)
+- **构建工具**: Maven 3.8.9
+
+### 模块结构
+```
+jzg (父项目)
+├── authentication     # 认证授权服务 - Authentication & Authorization
+├── commons           # 公共组件 - Common utilities and configurations
+├── gateway           # 网关服务 - API Gateway
+├── platform          # 总控平台 - Management platform
+├── tenant           # 租户模块 - Tenant management
+│   ├── insurance    # 保险报价模块 - Insurance quotation
+│   │   ├── quotation-commons    # 报价通用组件
+│   │   ├── quotation-summary    # 报价汇总
+│   │   └── quotation-*          # 各保险公司报价模块 (渤海/大家/恒邦/华农/华泰/国任/泰康/太平洋/阳光/永诚/中安/中美等)
+│   ├── organization # 组织管理
+│   ├── costsorrule  # 成本规则
+│   └── openfeign    # OpenFeign客户端
+├── rocketmq         # 消息队列
+└── consoleStatistics # 控制台统计
+```
+
+## 构建命令
+
+```bash
+# 清理并编译整个项目
+mvn clean compile
+
+# 打包所有模块(跳过测试)
+mvn package -DskipTests
+
+# 安装到本地仓库
+mvn install
+
+# 运行指定模块(例如:网关)
+cd gateway
+mvn spring-boot:run
+
+# 使用指定配置文件运行
+mvn spring-boot:run -Dspring-boot.run.profiles=dev
+
+# 运行测试
+mvn test
+
+# 构建指定模块
+mvn clean package -pl gateway -am
+```
+
+## 开发环境配置
+
+### 前置条件
+- Java 17+
+- Maven 3.8+
+- MySQL 8.0+
+- Redis
+- RocketMQ
+- Node.js(如果涉及前端开发)
+
+### 配置文件
+每个模块都包含application.yml文件:
+- `application.yml` - 主配置文件
+- `application-dev.yml` - 开发环境配置
+- `application-test.yml` - 测试环境配置
+
+### 数据库配置
+- 使用MyBatis-Plus进行ORM操作
+- Mapper XML文件位于 `src/main/resources/mapper/` 目录
+- 支持多租户,具备租户特定的数据模式
+
+## 核心架构模式
+
+### 1. 多租户架构
+- `@IgnoreTenant` 注解用于忽略租户隔离的操作
+- 通过AOP切面实现租户感知的数据访问
+- 租户特定的配置管理
+
+### 2. 历史记录追踪系统
+需要历史记录追踪的服务应该:
+- 继承 `HistoryDataService` 并实现 `getHistoryData()` 方法
+- 使用 `@OperatorTrajectory` 注解:
+```java
+@OperatorTrajectory(
+    type = "C|U|D",           // 创建/更新/删除
+    systemCode = "JZG",
+    serviceTag = "userRoleService",
+    primary = "id"            // 主键字段名
+)
+```
+
+### 3. API网关模式
+- 所有外部请求通过网关模块
+- 通过Nacos进行服务发现
+- 负载均衡和健康管理
+
+### 4. 保险公司集成模式
+每个保险公司模块(quotation-*)遵循相似模式:
+- 请求/响应加密(RSA)
+- API客户端组件
+- MongoDB用于报价数据持久化
+- 公司特定的枚举和配置
+
+## 常见开发任务
+
+### 添加新保险公司
+1. 在 `tenant/insurance/quotation-{company}` 下创建新模块
+2. 遵循现有模式(例如:quotation-bohai)
+3. 实现RSA加密和数字签名
+4. 添加MongoDB实体用于报价存储
+5. 创建API客户端组件
+
+### 服务开发
+1. 继承适当的基础服务
+2. 添加历史记录追踪注解
+3. 使用commons模块的通用工具
+4. 如适用,遵循多租户模式
+
+### API开发
+- 使用SpringDoc OpenAPI注解
+- 遵循RESTful约定
+- 使用 `SystemException` 实现适当的错误处理
+- 使用 `InsuranceLog` 进行结构化日志记录
+
+## 核心组件
+
+### 安全与认证
+- 自定义认证:`JzgUserDetailsService`、`JzgAuthenticationProvider`
+- JWT令牌:`JzgTokenService`
+- 多平台支持:微信、支付宝集成
+
+### 数据访问
+- MyBatis-Plus配合自定义配置
+- Redis缓存配合Redisson
+- 多租户数据隔离
+- 通过 `MyBatisMetaObjectHandler` 自动处理审计字段
+
+### 消息队列
+- RocketMQ集成用于异步处理
+- 自定义消息模板和处理
+
+### 文件存储
+- MinIO集成用于文件存储
+- 支持多种文件类型和元数据
+
+## 测试
+- Spring Boot测试框架
+- 测试数据文件位于 `src/test/data/`
+- 外部API调用的模拟配置
+
+## 部署说明
+- 使用Nacos进行服务发现和配置管理
+- 网关处理外部路由和负载均衡
+- 每个模块可独立部署
+- 支持多环境配置文件

+ 3 - 0
commons/src/main/java/com/jzg/commons/core/base/BaseController.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.TokenExpireException;
 import jakarta.servlet.http.HttpServletRequest;
+import lombok.extern.slf4j.Slf4j;
 import org.redisson.api.RedissonClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -17,6 +18,7 @@ import java.util.List;
 import java.util.Objects;
 
 @Component
+@Slf4j
 public class BaseController {
 
     @Autowired
@@ -131,6 +133,7 @@ public class BaseController {
      */
     public String getUserSystemCode(){
         String authorizationHeader = getToken();
+        log.info("authorizationHeader的值:{}",authorizationHeader);
         if(authorizationHeader == null){
             //如果是内部请求的话 返回空值
             return "";

+ 1 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/CarInfoVo.java

@@ -33,7 +33,7 @@ public class CarInfoVo implements Serializable {
     private String orderNo;
 
     /**
-     * 车牌
+     * 车牌
      */
     @Schema(description = "车牌号")
     private String licenseNo;

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

@@ -32,7 +32,7 @@ public interface PlatformClient {
 
     /**
      *根据保司ID查询保险公司信息
-     * @param id
+     * @param id 保险公司id
      * @param authToken
      * @return HttpResult<EsmInsCompany>
      */

+ 3 - 5
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java

@@ -1,5 +1,7 @@
 package com.jzg.quotation.commons.component;
 
+import com.alibaba.fastjson.parser.Feature;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.alibaba.fastjson2.JSON;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.config.WebClientConfig;
@@ -20,6 +22,7 @@ import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
 import java.io.IOException;
+import java.lang.reflect.Type;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
@@ -51,7 +54,6 @@ public class RequestComponent {
         if (jsonStr == null) {
             return null;
         }
-
         // 正则表达式匹配非法控制字符(除了 \r, \n, \t 之外的所有控制字符)
         // ASCII 0-31 除了 9(\t), 10(\n), 13(\r) 之外的所有控制字符
         Pattern pattern = Pattern.compile("[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f]");
@@ -333,7 +335,6 @@ public class RequestComponent {
                     null
                 );
             }
-
             String responseBody = rawResponse.getBody();
             if (responseBody == null) {
                 responseBody = "";
@@ -355,15 +356,12 @@ public class RequestComponent {
                     null
                 );
             }
-
             // 构建返回的ResponseEntity
             HttpHeaders responseHeaders = new HttpHeaders();
             responseHeaders.setContentType(MediaType.APPLICATION_JSON);
-
             return ResponseEntity.status(rawResponse.getStatusCode())
                     .headers(responseHeaders)
                     .body(result);
-
         } catch (WebClientResponseException e) {
             // 如果是WebClientResponseException,记录详细信息
             log.error("WebClient请求失败,状态码: {}, 响应头: {}",

+ 1 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/config/WebClientConfig.java

@@ -81,7 +81,7 @@ public class WebClientConfig {
             log.info("Client request: {}", clientRequest.url());
             // 打印请求头信息
             clientRequest.headers().forEach((key, values) -> {
-                log.info("请求头: {}: {}", key, values);
+                //log.info("请求头: {}: {}", key, values);
             });
             return Mono.just(clientRequest);
         })).build();

+ 3 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -219,9 +219,11 @@ public class UnifyOrderManager {
     public HttpResult<QuoteResultsVo> quote(@RequestBody QuoteVo quoteVo) throws Exception {
         HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(quoteVo.getOrder().getInsuranceCompanyId(), baseController.getToken());
         AssertionUtils.isFail(esmInsCompanyHttpResult.getCode() != 200, esmInsCompanyHttpResult.getMsg());
+        String companyName = CompanyConstants.getCompanyNameByCode(esmInsCompanyHttpResult.getData().getCompanyCode());
+        log.info("保司名称:{}",companyName);
 
         String systemCode = getSystemCode();
-        String companyName = CompanyConstants.getCompanyNameByCode(esmInsCompanyHttpResult.getData().getCompanyCode());
+        log.info("systemCode的值:{}", systemCode);
         //先默认第一个协议
         HttpResult<List<PtlAgreement>> byCompanyId = orgClient.getByCompanyId(esmInsCompanyHttpResult.getData().getId(), baseController.getToken(), systemCode);
         if (byCompanyId.getData().isEmpty()) {

+ 10 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -114,6 +114,16 @@ public class CompanyFactory {
         throw new SystemException("报价类型出错,请联系管理员处理。");
     }
 
+    /**
+     * 根据保司编码获取报价请求基类
+     * @param companyCode
+     * @param apiType
+     * @param sysQuoteConfigService
+     * @param sysQuoteRedisService
+     * @param platformClient
+     * @param baseController
+     * @return QuotationBaseService
+     */
     public QuotationBaseService getQuoteService(String companyCode, int apiType, SysQuoteConfigService sysQuoteConfigService, SysQuoteRedisService sysQuoteRedisService,
                                                 PlatformClient platformClient, BaseController baseController) {
         // 获取service

+ 133 - 133
tenant/insurance/quotation-zijin/CLAUDE.md

@@ -1,158 +1,158 @@
 # CLAUDE.md
 
-This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+此文件为Claude Code (claude.ai/code)在此代码库中工作时提供指导。
 
-## Project Overview
+## 项目概述
 
-This is a Java-based multi-module Maven project for an insurance quotation platform, specifically focused on integrating with ZiJin Insurance Company. The project follows a microservices architecture with Spring Boot 3.0 and WebFlux for reactive programming.
+这是一个基于Java的多模块Maven保险报价平台项目,专门专注于与紫金保险公司集成。项目采用微服务架构,使用Spring Boot 3.0和WebFlux进行响应式编程。
 
-## Build and Development Commands
+## 构建和开发命令
 
-### Maven Commands
+### Maven命令
 ```bash
-# Build the entire project
+# 构建整个项目
 mvn clean compile
 
-# Install all dependencies
+# 安装所有依赖
 mvn clean install
 
-# Build and run specific module
+# 构建并运行特定模块
 mvn spring-boot:run -pl quotation-zijin
 
-# Package for deployment
+# 打包用于部署
 mvn clean package
 
-# Run specific module with Spring Boot
+# 使用Spring Boot运行特定模块
 mvn spring-boot:run -pl quotation-zijin
 ```
 
-### Java Version
-- Java 17 (source and target)
+### Java版本
+- Java 17(源码和目标)
 
-### Key Dependencies
+### 关键依赖
 - Spring Boot 3.0.0 with WebFlux
 - Spring Data MongoDB
 - MyBatis Plus
-- OpenFeign for service communication
-- Hutool utilities
-- RocketMQ for messaging
-- ZXing for QR code processing
-- WeChat integration (commons module)
-
-## Architecture
-
-### Multi-Module Structure
-The project is organized as a multi-module Maven project:
-- **Parent**: `tenant` - Common dependencies and configurations
-- **Business**: `insurance` - Insurance-related sub-modules
-- **Quotation Modules**: Each insurance company has its own module (`quotation-zijin`, `quotation-bohai`, `quotation-huatai`, etc.)
-- **Commons**: `quotation-commons` - Shared utilities and base classes
-
-### ZiJin Module Architecture
-The `quotation-zijin` module follows a layered architecture:
-
-#### API Layer (`com.jzg.quotation.zijin.api`)
-- **Purpose**: External API interface and business logic
-- **Key Components**:
-  - `component/`: Business components (caching, request handling, error handling)
-  - `entity/request/`: API request DTOs
-  - `entity/response/`: API response DTOs
-  - `entity/po/`: MongoDB entities
-  - `service/`: Business service interfaces and implementations
-  - `enums/`: Business enumerations
-
-#### Crawler Layer (`com.jzg.quotation.zijin.crawler`)
-- **Purpose**: Web scraping and external system integration
-- **Key Components**:
-  - `component/`: Crawling components
-  - `entity/request/`: Crawling request DTOs
-  - `entity/response/`: Crawling response DTOs
-  - `service/`: Crawling service interfaces and implementations
-  - `enums/`: Crawling-related enumerations
-
-### Design Patterns
-- **Layered Architecture**: Clear separation between API and Crawler layers
-- **Repository Pattern**: Data access through Spring Data MongoDB
-- **Service Pattern**: Business logic encapsulation in service layers
-- **DTO Pattern**: Data transfer objects for API communication
-- **Strategy Pattern**: Different implementations for different insurance companies
-
-## Business Domain
-
-### Core Business Processes
-1. **Vehicle Quotation Process**:
-   - Vehicle information validation and crawling
-   - Premium calculation based on risk factors
-   - Quote generation and presentation
-   - Policy customization options
-
-2. **Order Management Process**:
-   - Order creation and tracking
-   - Premium calculation and validation
-   - Payment link generation
-   - Policy document generation
-   - Status updates and notifications
-
-3. **Customer Management Process**:
-   - Customer information validation
-   - Policy holder and insured person management
-   - Document upload and verification
-   - Communication and notifications
-
-### Key Insurance Types
-- **Compulsory Insurance** (交通事故责任强制保险)
-- **Commercial Insurance** (商业险)
-- **Vehicle Damage Insurance** (车损险)
-- **Third-party Liability Insurance** (第三者责任险)
-- **Additional Coverage** (附加险)
-
-## Key Classes and Interfaces
-
-### Important Service Classes
-- `ZiJinApiRequestComponent`: Handles API request logic
-- `ZiJinCrawlerRequestComponent`: Manages crawling requests
-- `ZiJinCrawlerOrderService`: Order management and processing
-- `ResponseMessageAbstractHandler`: Response processing and error handling
-
-### Key Request/Response DTOs
-- `CalculatePremiumRequest`: Premium calculation request
-- `GetAccessTokenRequest`: Authentication token request
-- `ModelQueryRequest`: Vehicle model query request
-- `ZiJinApiOrder`: Order entity for MongoDB
-
-### Configuration and Enums
-- `RequestUrl`: Enum for API endpoints
-- `RiskCodeEnum`: Risk type enumeration
-- `OrderStatusEnum`: Order status tracking
-- `MotorVehicleInsuranceEnum`: Insurance type enumeration
-
-## Development Guidelines
-
-### Working with Insurance Company Integrations
-Each insurance company module follows the same pattern but with different implementations:
-1. API layer for external interface
-2. Crawler layer for external system integration
-3. Separate request/response DTOs
-4. Company-specific business logic
-
-### Database Operations
-- Uses MongoDB as primary database
-- Spring Data MongoDB for repository operations
-- PO classes in `entity/po/` package
-
-### External Integration Points
-- Insurance company APIs (ZiJin systems)
-- Vehicle information crawling services
-- Payment gateway integration
-- WeChat integration for notifications
-
-### Error Handling
-- Custom exception components for different error scenarios
-- Structured response handling with ResultEnum
-- Comprehensive logging for debugging
-
-## Testing
-No specific test configuration found in the current structure. Standard Maven test commands apply:
+- OpenFeign用于服务通信
+- Hutool工具库
+- RocketMQ消息队列
+- ZXing二维码处理
+- 微信集成(commons模块)
+
+## 架构
+
+### 多模块结构
+项目组织为多模块Maven项目:
+- **父模块**: `tenant` - 公共依赖和配置
+- **业务模块**: `insurance` - 保险相关子模块
+- **报价模块**: 每个保险公司都有自己的模块(`quotation-zijin`、`quotation-bohai`、`quotation-huatai`等)
+- **公共模块**: `quotation-commons` - 共享工具和基础类
+
+### 紫金模块架构
+`quotation-zijin`模块遵循分层架构:
+
+#### API层(`com.jzg.quotation.zijin.api`)
+- **用途**: 外部API接口和业务逻辑
+- **核心组件**:
+  - `component/`: 业务组件(缓存、请求处理、错误处理)
+  - `entity/request/`: API请求DTO
+  - `entity/response/`: API响应DTO
+  - `entity/po/`: MongoDB实体
+  - `service/`: 业务服务接口和实现
+  - `enums/`: 业务枚举
+
+#### 爬虫层(`com.jzg.quotation.zijin.crawler`)
+- **用途**: 网页爬取和外部系统集成
+- **核心组件**:
+  - `component/`: 爬取组件
+  - `entity/request/`: 爬取请求DTO
+  - `entity/response/`: 爬取响应DTO
+  - `service/`: 爬取服务接口和实现
+  - `enums/`: 爬取相关枚举
+
+### 设计模式
+- **分层架构**: API层和爬虫层清晰分离
+- **仓储模式**: 通过Spring Data MongoDB进行数据访问
+- **服务模式**: 业务逻辑封装在服务层中
+- **DTO模式**: 用于API通信的数据传输对象
+- **策略模式**: 不同保险公司的不同实现
+
+## 业务领域
+
+### 核心业务流程
+1. **车辆报价流程**:
+   - 车辆信息验证和爬取
+   - 基于风险因素的保费计算
+   - 报价生成和展示
+   - 保单定制选项
+
+2. **订单管理流程**:
+   - 订单创建和跟踪
+   - 保费计算和验证
+   - 支付链接生成
+   - 保单文档生成
+   - 状态更新和通知
+
+3. **客户管理流程**:
+   - 客户信息验证
+   - 投保人和被保险人管理
+   - 文档上传和验证
+   - 沟通和通知
+
+### 主要保险类型
+- **交强险** (交通事故责任强制保险)
+- **商业险** (商业保险)
+- **车损险** (车辆损失险)
+- **第三者责任险** (第三者责任保险)
+- **附加险** (附加保险)
+
+## 核心类和接口
+
+### 重要服务类
+- `ZiJinApiRequestComponent`: 处理API请求逻辑
+- `ZiJinCrawlerRequestComponent`: 管理爬取请求
+- `ZiJinCrawlerOrderService`: 订单管理和处理
+- `ResponseMessageAbstractHandler`: 响应处理和错误处理
+
+### 关键请求/响应DTO
+- `CalculatePremiumRequest`: 保费计算请求
+- `GetAccessTokenRequest`: 认证令牌请求
+- `ModelQueryRequest`: 车型查询请求
+- `ZiJinApiOrder`: MongoDB的订单实体
+
+### 配置和枚举
+- `RequestUrl`: API端点枚举
+- `RiskCodeEnum`: 风险类型枚举
+- `OrderStatusEnum`: 订单状态跟踪
+- `MotorVehicleInsuranceEnum`: 保险类型枚举
+
+## 开发指南
+
+### 保险公司集成工作
+每个保险公司模块遵循相同模式但实现不同:
+1. 外部接口的API层
+2. 外部系统集成的爬虫层
+3. 分离的请求/响应DTO
+4. 公司特定的业务逻辑
+
+### 数据库操作
+- 使用MongoDB作为主数据库
+- Spring Data MongoDB用于仓储操作
+- PO类位于`entity/po/`包中
+
+### 外部集成点
+- 保险公司API(紫金系统)
+- 车辆信息爬取服务
+- 支付网关集成
+- 微信通知集成
+
+### 错误处理
+- 针对不同错误场景的自定义异常组件
+- 使用ResultEnum的结构化响应处理
+- 用于调试的全面日志记录
+
+## 测试
+当前结构中未找到特定的测试配置。应用标准Maven测试命令:
 ```bash
 mvn test
 mvn surefire:test

+ 25 - 16
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java

@@ -35,10 +35,10 @@ public class ZiJinCrawlerRequestComponent {
     // 循环次数
     public static final int CIRCULATE_NUMBER = 3;
 
-    
+
     private final RequestComponent requestComponent;
 
-    
+
     private final ZiJinCrawlerProperties ziJinCrawlerProperties;
 
     /**
@@ -59,9 +59,9 @@ public class ZiJinCrawlerRequestComponent {
             }
             HttpHeaders headers = setHttpHeaders();
 
+            String requestUrl = RequestUrl.CAPTCHA.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()) + "?expirationType=H5";
             Map<String, String> requestBody = new HashMap<>();
             requestBody.put("expirationType", "H5");
-            String requestUrl = RequestUrl.CAPTCHA.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()) + "?expirationType=H5";
             // 请求
             String jsonString = JSON.toJSONString(requestBody);
             ResponseEntity<ZiJinCrawlerCaptchaResponse> responseEntity = requestComponent.post(requestUrl, jsonString, ZiJinCrawlerCaptchaResponse.class, headers);
@@ -71,7 +71,7 @@ public class ZiJinCrawlerRequestComponent {
             String captcha = captchaImg.split(",")[1].trim();
             // 识别验证码的内容
             String captchaContent = CaptchaUtil.performOCR(captcha);
-            log.info("验证码内容:{}",captchaContent);
+            log.info("验证码内容:{}", captchaContent);
             ziJinCrawlerCaptchaResponse.setCaptchaContent(captchaContent);
         } catch (Exception e) {
             e.printStackTrace();
@@ -88,7 +88,7 @@ public class ZiJinCrawlerRequestComponent {
      * @return ZiJinCrawlerCommonLoginResponse
      */
     public ZiJinCrawlerCommonLoginResponse commonLogin(ZiJinCrawlerCommonLoginRequest ziJinCrawlerCommonLoginRequest) throws IOException {
-        log.info("ziJinCrawlerCommonLoginRequest请求参数的值:{}",JSON.toJSONString(ziJinCrawlerCommonLoginRequest));
+        log.info("ziJinCrawlerCommonLoginRequest请求参数的值:{}", JSON.toJSONString(ziJinCrawlerCommonLoginRequest));
 
         HttpHeaders httpHeaders = setHttpHeaders();
         httpHeaders.setContentLength(144);
@@ -99,17 +99,21 @@ public class ZiJinCrawlerRequestComponent {
 
 
     /**
-     *校验验证码
+     * 校验验证码并获取token
      *
      * @param ziJinCrawlerCheckCaptchaRequest
      * @return ZiJinCrawlerCheckCaptchaResponse
      */
-    public ZiJinCrawlerCheckCaptchaResponse checkCaptchaAndGetToken(ZiJinCrawlerCheckCaptchaRequest ziJinCrawlerCheckCaptchaRequest) throws IOException {
-        log.info("ziJinCrawlerCheckCaptchaRequest请求参数的值:{}",JSON.toJSONString(ziJinCrawlerCheckCaptchaRequest));
+    public ZiJinCrawlerCheckCaptchaResponse checkCaptchaAndGetToken(ZiJinCrawlerCheckCaptchaRequest ziJinCrawlerCheckCaptchaRequest,String token) throws IOException {
+        log.info("ziJinCrawlerCheckCaptchaRequest请求参数的值:{}", JSON.toJSONString(ziJinCrawlerCheckCaptchaRequest));
 
         HttpHeaders httpHeaders = setHttpHeaders();
         httpHeaders.setContentLength(289);
-        ResponseEntity<ZiJinCrawlerCheckCaptchaResponse> responseEntity = requestComponent.post(RequestUrl.CHECKCAPTCHAANDGETTOKEN.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), ziJinCrawlerCheckCaptchaRequest, ZiJinCrawlerCheckCaptchaResponse.class, httpHeaders);
+        //需要单独设置这个
+        httpHeaders.set("Authorization", token);
+        httpHeaders.set("loginToken", token);
+        String jsonString = JSON.toJSONString(ziJinCrawlerCheckCaptchaRequest);
+        ResponseEntity<ZiJinCrawlerCheckCaptchaResponse> responseEntity = requestComponent.post(RequestUrl.CHECKCAPTCHAANDGETTOKEN.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerCheckCaptchaResponse.class, httpHeaders);
         return responseEntity.getBody();
     }
 
@@ -117,15 +121,19 @@ public class ZiJinCrawlerRequestComponent {
      * 校验token
      *
      * @param ziJinCrawlerCheckTokenRequest
+     * @param token
      * @return ZiJinCrawlerCheckTokenResponse
      */
-    public ZiJinCrawlerCheckTokenResponse checkToken(ZiJinCrawlerCheckTokenRequest ziJinCrawlerCheckTokenRequest) throws IOException {
-        log.info("ziJinCrawlerCheckTokenRequest请求参数的值:{}",JSON.toJSONString(ziJinCrawlerCheckTokenRequest));
+    public ZiJinCrawlerCheckTokenResponse checkToken(ZiJinCrawlerCheckTokenRequest ziJinCrawlerCheckTokenRequest,String token) throws IOException {
+        log.info("ziJinCrawlerCheckTokenRequest请求参数的值:{}", JSON.toJSONString(ziJinCrawlerCheckTokenRequest));
 
         HttpHeaders httpHeaders = setHttpHeaders();
-        //需要单独设置这个
         httpHeaders.setContentLength(66);
-        ResponseEntity<ZiJinCrawlerCheckTokenResponse> responseEntity = requestComponent.post(RequestUrl.CHECK_TOKEN.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), ziJinCrawlerCheckTokenRequest, ZiJinCrawlerCheckTokenResponse.class, httpHeaders);
+        //需要单独设置这个
+        httpHeaders.set("Authorization", token);
+        httpHeaders.set("loginToken", token);
+        String jsonString = JSON.toJSONString(ziJinCrawlerCheckTokenRequest);
+        ResponseEntity<ZiJinCrawlerCheckTokenResponse> responseEntity = requestComponent.post(RequestUrl.CHECK_TOKEN.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerCheckTokenResponse.class, httpHeaders);
         return responseEntity.getBody();
     }
 
@@ -175,6 +183,7 @@ public class ZiJinCrawlerRequestComponent {
     public ZiJinCrawlerCarResponse car(ZiJinCrawlerCarRequest ziJinCrawlerCarRequest, HttpHeaders headers) throws IOException {
         //设置headers
         HttpHeaders httpHeaders = setHttpHeaders();
+
         String jsonString = JSON.toJSONString(ziJinCrawlerCarRequest);
         ResponseEntity<ZiJinCrawlerCarResponse> responseEntity = requestComponent.post(RequestUrl.CAR.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerCarResponse.class, httpHeaders);
         return responseEntity.getBody();
@@ -237,7 +246,7 @@ public class ZiJinCrawlerRequestComponent {
         HttpHeaders httpHeaders = setHttpHeaders();
         String jsonString = JSON.toJSONString(ziJinCrawlerUnderwritingRequest);
         ResponseEntity<ZiJinCrawlerUnderwritingResponse> responseEntity = requestComponent.post(RequestUrl.UNDERWRITING.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerUnderwritingResponse.class, httpHeaders);
-        return  responseEntity.getBody();
+        return responseEntity.getBody();
     }
 
 
@@ -257,7 +266,6 @@ public class ZiJinCrawlerRequestComponent {
     }
 
 
-
     /**
      * 获取支付链接
      *
@@ -377,6 +385,7 @@ public class ZiJinCrawlerRequestComponent {
 
     /**
      * 获取Cookie的值
+     *
      * @return String
      * @throws IOException
      */
@@ -389,6 +398,7 @@ public class ZiJinCrawlerRequestComponent {
 
     /**
      * 设置HTTP请求头
+     *
      * @return HttpHeaders
      * @throws IOException
      */
@@ -398,7 +408,6 @@ public class ZiJinCrawlerRequestComponent {
         headers.setContentType(MediaType.APPLICATION_JSON);
         //获取cookie的值
         String cookie = getCookie();
-        log.info("cookie的值:{}", cookie);
         headers.set("Cookie", cookie);
         // 设置请求头
         headers.set("Accept", "application/json, text/plain, */*, application/problem+json");

+ 16 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/ZiJinCrawlerTokenInfo.java

@@ -1,5 +1,7 @@
 package com.jzg.quotation.zijin.crawler.entity;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import java.io.Serial;
 import java.io.Serializable;
@@ -19,16 +21,22 @@ public class ZiJinCrawlerTokenInfo implements Serializable {
     /**
      * 登录公司编码
      */
+    @JSONField(ordinal = 1)
+    @JsonProperty("loginComCode")
     private String loginComCode;
 
     /**
      * 用户编码
      */
+    @JSONField(ordinal = 2)
+    @JsonProperty("userCode")
     private String userCode;
 
     /**
      * 附加信息
      */
+    @JSONField(ordinal = 3)
+    @JsonProperty("attach")
     private Attach attach;
 
     /**
@@ -39,21 +47,29 @@ public class ZiJinCrawlerTokenInfo implements Serializable {
         /**
          * 登录公司名称
          */
+        @JSONField(ordinal = 1)
+        @JsonProperty("loginComName")
         private String loginComName;
 
         /**
          * 登录标识
          */
+        @JSONField(ordinal = 2)
+        @JsonProperty("loginflag")
         private String loginflag;
 
         /**
          * 用户编码
          */
+        @JSONField(ordinal = 3)
+        @JsonProperty("userCode")
         private String userCode;
 
         /**
          * 账号类型
          */
+        @JSONField(ordinal = 4)
+        @JsonProperty("accountType")
         private String accountType;
     }
 }

+ 15 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerCheckCaptchaRequest.java

@@ -1,27 +1,41 @@
 package com.jzg.quotation.zijin.crawler.entity.request;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 
+import java.io.Serial;
+import java.io.Serializable;
+
 /**
  * @description: 紫金财险验证码校验请求实体
  * @author:
  * @date:
  **/
 @Data
-public class ZiJinCrawlerCheckCaptchaRequest {
+public class ZiJinCrawlerCheckCaptchaRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 6226153661487131463L;
 
     /**
      * token信息
      */
+    @JSONField(ordinal = 1)
+    @JsonProperty("tokenInfo")
     private String tokenInfo;
 
     /**
      * 验证码ID
      */
+    @JSONField(ordinal = 2)
+    @JsonProperty("captchaId")
     private String captchaId;
 
     /**
      * 验证码值
      */
+    @JSONField(ordinal = 3)
+    @JsonProperty("captchaVal")
     private String captchaVal;
 }

+ 10 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerCheckTokenRequest.java

@@ -1,10 +1,14 @@
 package com.jzg.quotation.zijin.crawler.entity.request;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serial;
+import java.io.Serializable;
+
 /**
  * @version
  * @description: 紫金财险【校验token】请求
@@ -14,11 +18,16 @@ import lombok.NoArgsConstructor;
 @AllArgsConstructor
 @NoArgsConstructor
 @Data
-public class ZiJinCrawlerCheckTokenRequest {
+public class ZiJinCrawlerCheckTokenRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 8284344493981188764L;
 
+    @JSONField(ordinal = 1)
     @JsonProperty("expirationType")
     private String expirationType;
 
+    @JSONField(ordinal = 2)
     @JsonProperty("token")
     private String token;
 

+ 19 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerCheckCaptchaResponse.java

@@ -1,9 +1,11 @@
 package com.jzg.quotation.zijin.crawler.entity.response;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 
 /**
- * @description: 紫金财险验证码校验响应实体
+ * @description: 紫金财险校验验证码并获取token响应实体
  * @author:
  * @date:
  **/
@@ -13,16 +15,22 @@ public class ZiJinCrawlerCheckCaptchaResponse {
     /**
      * 返回码
      */
+    @JSONField(ordinal = 1)
+    @JsonProperty("rtnCode")
     private String rtnCode;
 
     /**
      * 返回消息
      */
+    @JSONField(ordinal = 2)
+    @JsonProperty("rtnMsg")
     private String rtnMsg;
 
     /**
      * 数据对象
      */
+    @JSONField(ordinal = 3)
+    @JsonProperty("data")
     private DataDTO data;
 
     /**
@@ -34,26 +42,36 @@ public class ZiJinCrawlerCheckCaptchaResponse {
         /**
          * 创建时间
          */
+        @JSONField(ordinal = 1)
+        @JsonProperty("createTime")
         private String createTime;
 
         /**
          * 过期时间(秒)
          */
+        @JSONField(ordinal = 2)
+        @JsonProperty("expiration")
         private Integer expiration;
 
         /**
          * 过期类型
          */
+        @JSONField(ordinal = 3)
+        @JsonProperty("expirationType")
         private String expirationType;
 
         /**
          * token值
          */
+        @JSONField(ordinal = 4)
+        @JsonProperty("token")
         private String token;
 
         /**
          * token信息(JSON字符串)
          */
+        @JSONField(ordinal = 5)
+        @JsonProperty("tokenInfo")
         private String tokenInfo;
     }
 }

+ 16 - 4
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerCheckTokenResponse.java

@@ -1,9 +1,14 @@
 package com.jzg.quotation.zijin.crawler.entity.response;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.io.Serial;
+import java.io.Serializable;
+
 /**
  * @version
  * @description: 紫金财险【校验token】 响应
@@ -12,21 +17,28 @@ import lombok.NoArgsConstructor;
  **/
 @NoArgsConstructor
 @Data
-public class ZiJinCrawlerCheckTokenResponse {
+public class ZiJinCrawlerCheckTokenResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -4526799066942748084L;
 
+    @JSONField(ordinal = 1)
     @JsonProperty("msg")
     private String msg;
 
+    @JSONField(ordinal = 2, serialzeFeatures = SerializerFeature.WriteMapNullValue)
     @JsonProperty("tokenInfo")
     private String tokenInfo;
 
-    @JsonProperty("userRole")
-    private Boolean valid;
+    @JSONField(ordinal = 3)
+    @JsonProperty("valid")
+    private boolean valid;
 
+    @JSONField(ordinal = 4, serialzeFeatures = SerializerFeature.WriteMapNullValue)
     @JsonProperty("userName")
     private String userName;
 
+    @JSONField(ordinal = 5, serialzeFeatures = SerializerFeature.WriteMapNullValue)
     @JsonProperty("email")
     private String email;
-
 }

+ 1 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/RequestUrl.java

@@ -15,7 +15,7 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     CAPTCHA("/api/v1/insurance/public/captcha/genImg", "生成验证码"),
     COMMONLOGIN("/kscd-frontend/login/commonLogin", "公共登录"),
     CHECKCAPTCHAANDGETTOKEN("/kscd-frontend/login/checkCaptchaAndGetToken", "校验验证码并获取token"),
-    CHECK_TOKEN("/api_vhl_prod/api/checkToken", "校验token"),
+    CHECK_TOKEN("/kscd-frontend/login/checkToken", "校验token"),
     //归属信息
     // 报价
     CAR("/api/v1/insurance/public/vehicle-model/jingyou/preFill", "查询车辆信息"),

+ 27 - 12
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerQuoteProcessServiceImpl.java

@@ -62,14 +62,25 @@ public class ZiJinCrawlerQuoteProcessServiceImpl implements ZiJinCrawlerQuotePro
             }
             log.info("公共登录响应:{}", JSON.toJSONString(ziJinCrawlerCommonLoginResponse));
 
-            //3、校验验证码
+            //3、校验验证码并获取token
             ZiJinCrawlerCheckCaptchaRequest ziJinCrawlerCheckCaptchaRequest = new ZiJinCrawlerCheckCaptchaRequest();
-            // 设置验证码校验请求参数
-            ziJinCrawlerCheckCaptchaRequest.setTokenInfo("{\"loginComCode\":\"2140000601\",\"userCode\":\"214000151\",\"attach\":{\"loginComName\":\"山西分公司直销业务一部\",\"loginflag\":\"common\",\"userCode\":\"214000151\",\"accountType\":\"9\"}}");
+            ZiJinCrawlerTokenInfo ziJinCrawlerTokenInfo = new ZiJinCrawlerTokenInfo();
+            ziJinCrawlerTokenInfo.setLoginComCode(ziJinCrawlerCommonLoginResponse.getData().getData().get(0).getComCode());
+            ziJinCrawlerTokenInfo.setUserCode(username);
+            ZiJinCrawlerTokenInfo.Attach attach = new ZiJinCrawlerTokenInfo.Attach();
+            attach.setLoginComName(ziJinCrawlerCommonLoginResponse.getData().getData().get(0).getComName());
+            attach.setLoginflag("common");
+            attach.setUserCode(username);
+            attach.setAccountType("9");
+            ziJinCrawlerTokenInfo.setAttach(attach);
+            log.info("ziJinCrawlerTokenInfo对象的值:{}", JSON.toJSONString(ziJinCrawlerTokenInfo));
+            // 设置校验验证码请求参数
+            ziJinCrawlerCheckCaptchaRequest.setTokenInfo(JSON.toJSONString(ziJinCrawlerTokenInfo));
             ziJinCrawlerCheckCaptchaRequest.setCaptchaId(ziJinCrawlerCaptchaResponse.getCaptchaId());
             ziJinCrawlerCheckCaptchaRequest.setCaptchaVal(ziJinCrawlerCaptchaResponse.getCaptchaContent());
+            String commonToken = ziJinCrawlerCommonLoginResponse.getData().getToken();
 
-            ZiJinCrawlerCheckCaptchaResponse ziJinCrawlerCheckCaptchaResponse = ziJinCrawlerRequestComponent.checkCaptchaAndGetToken(ziJinCrawlerCheckCaptchaRequest);
+            ZiJinCrawlerCheckCaptchaResponse ziJinCrawlerCheckCaptchaResponse = ziJinCrawlerRequestComponent.checkCaptchaAndGetToken(ziJinCrawlerCheckCaptchaRequest,commonToken);
             log.info("校验验证码并且获取token响应:{}", JSON.toJSONString(ziJinCrawlerCheckCaptchaResponse));
             //成功
             if("0000".equals(ziJinCrawlerCheckCaptchaResponse.getRtnCode())){
@@ -79,20 +90,23 @@ public class ZiJinCrawlerQuoteProcessServiceImpl implements ZiJinCrawlerQuotePro
                 ZiJinCrawlerCheckTokenRequest ziJinCrawlerCheckTokenRequest = new ZiJinCrawlerCheckTokenRequest();
                 ziJinCrawlerCheckTokenRequest.setExpirationType("H5");
                 ziJinCrawlerCheckTokenRequest.setToken(token);
-                ZiJinCrawlerCheckTokenResponse ziJinCrawlerCheckTokenResponse = ziJinCrawlerRequestComponent.checkToken(ziJinCrawlerCheckTokenRequest);
-                if(ziJinCrawlerCheckTokenResponse.getValid()){
+
+                ZiJinCrawlerCheckTokenResponse ziJinCrawlerCheckTokenResponse = ziJinCrawlerRequestComponent.checkToken(ziJinCrawlerCheckTokenRequest,token);
+                log.info("校验token响应:{}", JSON.toJSONString(ziJinCrawlerCheckTokenResponse));
+                if(ziJinCrawlerCheckTokenResponse.isValid()){
                     String userName = ziJinCrawlerCheckTokenResponse.getUserName();
                     String tokenInfo = ziJinCrawlerCheckTokenResponse.getTokenInfo();
-                    ZiJinCrawlerTokenInfo ziJinCrawlerTokenInfo = JSON.parseObject(tokenInfo, ZiJinCrawlerTokenInfo.class);
-                    String userCode = ziJinCrawlerTokenInfo.getUserCode();
+                    ZiJinCrawlerTokenInfo ziJinCrawlerTokenInfo1 = JSON.parseObject(tokenInfo, ZiJinCrawlerTokenInfo.class);
+                    String userCode = ziJinCrawlerTokenInfo1.getUserCode();
                     //缓存用户信息
                     return ziJinCrawlerCacheComponent.cacheAuthorization(token, userCode, userName);
                 }else{
+                    log.error("校验token失败,响应:{}", JSON.toJSONString(ziJinCrawlerCheckTokenResponse));
                     return ziJinCrawlerCheckTokenResponse.getMsg();
                 }
             }else{
-                log.error("校验验证码失败,响应:{}", JSON.toJSONString(ziJinCrawlerCheckCaptchaResponse));
-                throw new SystemException("校验验证码失败");
+                log.error("校验验证码并获取token失败,响应:{}", JSON.toJSONString(ziJinCrawlerCheckCaptchaResponse));
+                throw new SystemException("校验验证码并获取token失败");
             }
         } catch (IOException e) {
             e.printStackTrace();
@@ -109,10 +123,11 @@ public class ZiJinCrawlerQuoteProcessServiceImpl implements ZiJinCrawlerQuotePro
     @Override
     public HttpHeaders getHeaders(String username, String password) {
         String authorization = ziJinCrawlerCacheComponent.getAuthorization(username);
-        if (authorization == null) {
+        log.info("authorization:{}", authorization);
+        /*if (authorization == null) {
             login(username, password);
             authorization = ziJinCrawlerCacheComponent.getAuthorization(username);
-        }
+        }*/
 
         HttpHeaders headers = new HttpHeaders();
         headers.set("Authorization", authorization);

+ 7 - 7
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerRequestImpl.java

@@ -81,6 +81,8 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
     public QuoteResultsVo quote(QuoteVo quoteVo) {
         // 归属信息
         AttributionInformationVo attributionInformationVo = quoteVo.getOrder().getAttributionInformationVo();
+        log.info("attributionInformationVo参数的值:{}", JSON.toJSONString(attributionInformationVo));
+
         HttpHeaders headers = ziJinCrawlerQuoteProcessService.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         String userCode = ziJinCrawlerCacheComponent.getUserCode(attributionInformationVo.getUsername());
         log.info("userCode:{}", userCode);
@@ -91,16 +93,14 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
 
         // 1.2 构建归属信息(机构、套餐、渠道信息)
         //ProposalInfoDTO proposalInfoDTO = boHaiBuildingAttributionInformation.build(parameters, userCode, headers);
-
-        // 查询车辆信息
-        ZiJinCrawlerCarResponse ziJinCrawlerCarResponse = null;
         try {
+            // 查询车辆信息
             ZiJinCrawlerCarRequest ziJinCrawlerCarRequest = new ZiJinCrawlerCarRequest();
             ziJinCrawlerCarRequest.setChannelCode("KSCD_PROD");
-            ziJinCrawlerCarRequest.setComCode(parameters.getComCode());
-            ziJinCrawlerCarRequest.setLicenseNo("");
-            ziJinCrawlerCarRequest.setVin("");
-            ziJinCrawlerCarResponse = ziJinCrawlerRequestComponent.car(ziJinCrawlerCarRequest, headers);
+            ziJinCrawlerCarRequest.setComCode("2140000601");
+            ziJinCrawlerCarRequest.setLicenseNo(quoteVo.getCarInfoVo().getLicenseNo());
+            ziJinCrawlerCarRequest.setVin(quoteVo.getCarInfoVo().getVinNo());
+            ZiJinCrawlerCarResponse ziJinCrawlerCarResponse = ziJinCrawlerRequestComponent.car(ziJinCrawlerCarRequest, headers);
             log.info("ziJinCrawlerCarResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerCarResponse));
 
             // 车辆和交通查询(获取订单号)

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
tenant/insurance/quotation-zijin/src/main/resources/js/auto.js


+ 1 - 1
tenant/insurance/quotation-zijin/src/main/resources/js/content.js

@@ -1 +1 @@
-___content ="YY56opjZZYpD6yKMLhYJcP809.vkKBnTsE.gn_po3nzpe7o1dAL4NpfvHR1sa5ClXPEqRkRXfD4NGtCbV9a39SQgY92EbmoMuVHmwva9SnubHt.t8jK8MMblrSCy58WZDEYw4ODa_s4hn2KDoyCJyC6xFpwSLa2UUGz942IbSSMDJHjj_mqH0AHpOPYS5eYYFs_.uAiO14V";
+___content ="WId8AiamdwfDpeb3pahkThuRvzTveYSEgb6YVJs87tPu0tNFS9FmCJypqHmScyTsoPew_qsV5KL1hcLkbzEkowFh7e0Ad0mB9tnwH9zFvu_Ysu3hfCT2VPnpB9oSNO.3LcjxaqHUgoVCA6qV3SzEon9Vu9HOCCKqLt9daEeU0gEnTOdn_Uy2FeyeUWu1P3hoggG6.FMqQ3g";

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
tenant/insurance/quotation-zijin/src/main/resources/js/tsssss.js


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff