Commit 40502653 by 崔彦峰

feat(vcp-api): 添加行驶证住址OCR识别功能和财务台账管理模块

- 在CarLicenseOcrResDTO、EvalCarBase实体类和EvalCarBaseReqDTO中新增licenseAddress字段用于存储OCR识别的行驶证住址
- 新增FinancialLedgerDTO用于财务台账查询结果的数据传输
- 创建FinancialLedgerExcelDTO实现财务台账Excel导出功能
- 添加FinancialLedgerPageRequest支持财务台账分页查询请求
- 实现FinancialLedgerRemote远程调用接口提供财务台账相关服务
- 修改AliyunOcrService将OCR识别的地址信息映射到licenseAddress字段
- 更新EvalCarBaseMapper.xml添加licenseAddress等字段的数据库映射配置
- 在CarLicenseOcrVO中增加licenseAddress字段定义
- 创建FinancialLedgerController提供财务台账管理Web接口
- 实现FinancialLedgerService处理财务台账业务逻辑
2 parents 1168834b c93f033d
...@@ -247,4 +247,10 @@ public class EvalCarBaseReqDTO { ...@@ -247,4 +247,10 @@ public class EvalCarBaseReqDTO {
@Schema(description = "车况描述") @Schema(description = "车况描述")
@Size(max = 1000, message = "车况描述长度不能超过1000个字符") @Size(max = 1000, message = "车况描述长度不能超过1000个字符")
private String conditionDescription; private String conditionDescription;
/**
* OCR识别-行驶证住址
*/
@Schema(description = "OCR识别-行驶证住址")
private String licenseAddress;
} }
...@@ -84,4 +84,10 @@ public class CarLicenseOcrResDTO implements Serializable { ...@@ -84,4 +84,10 @@ public class CarLicenseOcrResDTO implements Serializable {
*/ */
@Schema(description = "品牌型号") @Schema(description = "品牌型号")
private String completeBrandModel; private String completeBrandModel;
/**
* OCR识别-行驶证住址
*/
@Schema(description = "OCR识别-行驶证住址")
private String licenseAddress;
} }
package com.gsc4cloud.gsc.vpc.api.dto.web.resdto.financialledger;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 财务台账查询结果 DTO(biz 层返回,供 Service 解析 JSON 字段后填充)
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class FinancialLedgerDTO implements Serializable {
private static final long serialVersionUID = 1L;
// ===== 评估单 =====
@Schema(description = "评估单编号")
private String evalOrderNo;
@Schema(description = "收车价")
private BigDecimal evalPrice;
// ===== 车辆基本信息 =====
@Schema(description = "车牌号")
private String licensePlate;
@Schema(description = "车架号")
private String vin;
@Schema(description = "卖方单位地址/个人地址(OCR识别-行驶证住址)")
private String licenseAddress;
@Schema(description = "登记证号")
private String registrationNo;
@Schema(description = "厂牌(品牌)型号")
private String brandModel;
@Schema(description = "车辆类型")
private String vehicleType;
// ===== 查车宝数据 =====
@Schema(description = "查车宝 data_json 原文(内部字段,不对外暴露)")
private String chaboshiDataJson;
@Schema(description = "排量")
private String displacement;
// ===== 入库时间 =====
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(description = "入库时间")
private Date storageTime;
// ===== 电子合同(二手车转让协议甲方信息,electronic_contract_type=1),JSON 原文供 Service 解析 =====
@Schema(description = "二手车转让协议合同字段JSON(内部字段,不对外暴露)")
private String saleContractField;
// ===== 电子合同解析后的甲方字段(Service 填充) =====
@Schema(description = "卖方单位/个人(甲方名称)")
private String partBName;
@Schema(description = "卖方单位代码/车主身份证号码")
private String partBIdentityCode;
@Schema(description = "电话")
private String partBContactMobile;
// ===== 确认交车合同(electronic_contract_type=4)JSON 原文供 Service 解析 =====
@Schema(description = "确认交车合同字段JSON(内部字段,不对外暴露)")
private String confirmContractField;
// ===== 解析后的证件链接(Service 填充) =====
@Schema(description = "行驶证图片链接")
private String motorRegistrationCertificateUrl;
@Schema(description = "登记证图片链接")
private String motorBookUrl;
}
package com.gsc4cloud.gsc.vpc.api.dto.web.resdto.financialledger;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 财务台账 Excel 导出 DTO
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class FinancialLedgerExcelDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "卖方单位/个人")
private String partBName;
@ExcelProperty(value = "卖方单位代码/车主身份证号码")
private String partBIdentityCode;
@ExcelProperty(value = "电话")
private String partBContactMobile;
@ExcelProperty(value = "卖方单位地址/个人地址")
private String licenseAddress;
@ExcelProperty(value = "登记证号")
private String registrationNo;
@ExcelProperty(value = "厂牌(品牌)型号")
private String brandModel;
@ExcelProperty(value = "车辆类型")
private String vehicleType;
@ExcelProperty(value = "车牌")
private String licensePlate;
@ExcelProperty(value = "车架号")
private String vin;
@ExcelProperty(value = "排量")
private String displacement;
@ExcelProperty(value = "收车价")
private BigDecimal evalPrice;
@DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
@ExcelProperty(value = "入库时间")
private Date storageTime;
}
...@@ -382,6 +382,14 @@ public class EvalCarBase implements Serializable { ...@@ -382,6 +382,14 @@ public class EvalCarBase implements Serializable {
private String brandModel; private String brandModel;
/** /**
* OCR识别-行驶证住址
*/
@TableField(value = "license_address")
@Schema(description = "OCR识别-行驶证住址")
private String licenseAddress;
/**
* 通常是1,3,4级拼接组成车型 * 通常是1,3,4级拼接组成车型
* @return 车型名称 * @return 车型名称
*/ */
......
package com.gsc4cloud.gsc.vpc.api.feign.web.financialledger;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gsc4cloud.gsc.common.core.util.R;
import com.gsc4cloud.gsc.vpc.api.dto.web.resdto.financialledger.FinancialLedgerDTO;
import com.gsc4cloud.gsc.vpc.api.req.PageRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.financialledger.FinancialLedgerPageRequest;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 财务台账远程调用接口
*/
@FeignClient(contextId = "com.gsc4cloud.gsc.vpc.api.feign.web.financialledger.FinancialLedgerRemote", value = "gsc-vcp-biz")
public interface FinancialLedgerRemote {
/**
* 财务台账分页列表
*/
@Operation(summary = "财务台账分页列表")
@PostMapping("/financialLedger/pageList")
R<Page<FinancialLedgerDTO>> pageList(@RequestBody PageRequest<FinancialLedgerPageRequest> request);
/**
* 异步导出财务台账
*/
@Operation(summary = "异步导出财务台账")
@PostMapping("/financialLedger/exportAsync")
R<String> exportAsync(@RequestBody PageRequest<FinancialLedgerPageRequest> request);
}
package com.gsc4cloud.gsc.vpc.api.req.web.financialledger;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* 财务台账分页查询请求
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class FinancialLedgerPageRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 车牌号(模糊搜索)
*/
@Schema(description = "车牌号(模糊搜索)")
private String licensePlate;
/**
* 车架号(模糊搜索)
*/
@Schema(description = "车架号(模糊搜索)")
private String vin;
/**
* 买方单位/个人(模糊搜索)
*/
@Schema(description = "买方单位/个人(模糊搜索)")
private String partBName;
/**
* 入库时间-开始
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(description = "入库时间-开始")
private Date storageStartTime;
/**
* 入库时间-结束
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Schema(description = "入库时间-结束")
private Date storageEndTime;
/**
* 操作人
*/
@Schema(description = "操作人")
private String updatedBy;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!