🔀 合并认证记录功能分支到 master
认证记录不可变快照数据模型、司机端提交与记录查询、管理端审核、 小程序证件 OCR 适配、接单可用性门槛(带开关可回退),含迁移脚本与单元测试。
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 证件 OCR 识别请求(小程序)
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "证件OCR识别请求")
|
||||
public class OcrRecognizeRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "已上传图片的地址,必须是百度可访问的HTTP或HTTPS地址")
|
||||
private String imageUrl;
|
||||
@Schema(description = "证件类型:idcard-身份证,driver-驾驶证,vehicle-行驶证,road_transport-道路运输证")
|
||||
private String type;
|
||||
@Schema(description = "正副面:front或back,默认front")
|
||||
private String side;
|
||||
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 司机端个人认证提交请求
|
||||
* <p>
|
||||
* 一次提交承载个人认证的**全部**内容(身份证 + 驾驶证 + 从业资格证),
|
||||
* 三证一起提交、一起审核,不拆开。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "司机端个人认证提交请求")
|
||||
public class PersonCertSubmitRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "真实姓名")
|
||||
private String realName;
|
||||
@Schema(description = "身份证号")
|
||||
private String idCardNo;
|
||||
@Schema(description = "身份证正面照")
|
||||
private String idCardFrontUrl;
|
||||
@Schema(description = "身份证反面照")
|
||||
private String idCardBackUrl;
|
||||
@Schema(description = "身份证有效期起")
|
||||
private LocalDate idCardValidStart;
|
||||
@Schema(description = "身份证有效期止")
|
||||
private LocalDate idCardValidEnd;
|
||||
@Schema(description = "身份证长期有效")
|
||||
private Integer idCardLongTerm;
|
||||
|
||||
@Schema(description = "驾驶证档案编号")
|
||||
private String driverFileNo;
|
||||
@Schema(description = "准驾车型")
|
||||
private String driverClass;
|
||||
@Schema(description = "驾驶证主页照片")
|
||||
private String driverLicenseFrontUrl;
|
||||
@Schema(description = "驾驶证副页照片")
|
||||
private String driverLicenseBackUrl;
|
||||
@Schema(description = "驾驶证有效期起")
|
||||
private LocalDate driverValidStart;
|
||||
@Schema(description = "驾驶证有效期止")
|
||||
private LocalDate driverValidEnd;
|
||||
@Schema(description = "驾驶证长期有效")
|
||||
private Integer driverLongTerm;
|
||||
|
||||
@Schema(description = "从业资格证类型")
|
||||
private String qualificationType;
|
||||
@Schema(description = "从业资格证号")
|
||||
private String qualificationNo;
|
||||
@Schema(description = "从业资格证封面页")
|
||||
private String qualificationFront;
|
||||
@Schema(description = "从业资格证内容页")
|
||||
private String qualificationBack;
|
||||
@Schema(description = "从业资格证有效期起")
|
||||
private LocalDate qualificationValidStart;
|
||||
@Schema(description = "从业资格证有效期止")
|
||||
private LocalDate qualificationValidEnd;
|
||||
@Schema(description = "从业资格证长期有效")
|
||||
private Integer qualificationLongTerm;
|
||||
|
||||
@Schema(description = "大头照")
|
||||
private String headPhoto;
|
||||
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 司机端车辆认证提交请求
|
||||
* <p>
|
||||
* 一次提交承载该车辆认证的**全部**内容(行驶证 + 道路运输证),两证一起提交、一起审核。
|
||||
* 提交只产生新的待审记录,不覆盖车辆当前已生效的认证内容。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "司机端车辆认证提交请求")
|
||||
public class VehicleCertSubmitRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "车辆ID:新增时为空,重新认证时必填")
|
||||
private Long id;
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNo;
|
||||
@Schema(description = "所有人:行驶证登记的单位名称,不是司机")
|
||||
private String ownerName;
|
||||
@Schema(description = "车牌颜色")
|
||||
private String plateColor;
|
||||
@Schema(description = "车辆类型")
|
||||
private String vehicleType;
|
||||
@Schema(description = "车辆识别代号(车架号),选填")
|
||||
private String vin;
|
||||
|
||||
@Schema(description = "外廓长度,毫米")
|
||||
private Integer outerLength;
|
||||
@Schema(description = "外廓宽度,毫米")
|
||||
private Integer outerWidth;
|
||||
@Schema(description = "外廓高度,毫米")
|
||||
private Integer outerHeight;
|
||||
@Schema(description = "核定载质量,KG")
|
||||
private Integer approvedLoadKg;
|
||||
@Schema(description = "准牵引总质量,KG")
|
||||
private Integer tractionMassKg;
|
||||
@Schema(description = "能源类型")
|
||||
private String energyType;
|
||||
@Schema(description = "业务关系:自有 / 管理挂靠 / 业务合作")
|
||||
private String businessRelation;
|
||||
@Schema(description = "强制报废日期")
|
||||
private LocalDate compulsoryScrapDate;
|
||||
@Schema(description = "强制报废长期有效:0否 1是")
|
||||
private Integer compulsoryScrapLongTerm;
|
||||
|
||||
@Schema(description = "行驶证档案编号")
|
||||
private String drivingLicenseNo;
|
||||
@Schema(description = "行驶证主页正面照片")
|
||||
private String drivingLicenseImage;
|
||||
@Schema(description = "行驶证主页反面照片")
|
||||
private String drivingLicenseMainBack;
|
||||
@Schema(description = "行驶证副页正面照片")
|
||||
private String drivingLicenseViceFront;
|
||||
@Schema(description = "行驶证副页反面照片")
|
||||
private String drivingLicenseViceBack;
|
||||
@Schema(description = "行驶证有效期起")
|
||||
private LocalDate drivingLicenseStartDate;
|
||||
@Schema(description = "行驶证有效期止")
|
||||
private LocalDate drivingLicenseEndDate;
|
||||
@Schema(description = "行驶证长期有效:0否 1是")
|
||||
private Integer drivingLicenseLongTerm;
|
||||
|
||||
@Schema(description = "道路运输证号")
|
||||
private String roadTransportCertNo;
|
||||
@Schema(description = "道路运输证照片")
|
||||
private String roadTransportCertImage;
|
||||
@Schema(description = "道路运输证有效期起")
|
||||
private LocalDate roadTransportCertStartDate;
|
||||
@Schema(description = "道路运输证有效期止")
|
||||
private LocalDate roadTransportCertEndDate;
|
||||
@Schema(description = "道路运输证长期有效:0否 1是")
|
||||
private Integer roadTransportCertLongTerm;
|
||||
|
||||
@Schema(description = "机动车登记编号")
|
||||
private String registrationNo;
|
||||
@Schema(description = "机动车登记本照片")
|
||||
private String registrationImage;
|
||||
|
||||
}
|
||||
+45
@@ -28,6 +28,9 @@ package org.springblade.transport.pojo.entity;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -111,6 +114,21 @@ public class Driver extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "身份证反面照")
|
||||
private String idCardBack;
|
||||
/**
|
||||
* 身份证有效期起
|
||||
*/
|
||||
@Schema(description = "身份证有效期起")
|
||||
private LocalDate idCardValidStart;
|
||||
/**
|
||||
* 身份证有效期止
|
||||
*/
|
||||
@Schema(description = "身份证有效期止")
|
||||
private LocalDate idCardValidEnd;
|
||||
/**
|
||||
* 身份证长期有效
|
||||
*/
|
||||
@Schema(description = "身份证长期有效")
|
||||
private Integer idCardLongTerm;
|
||||
/**
|
||||
* 大头照
|
||||
*/
|
||||
@@ -221,5 +239,32 @@ public class Driver extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 最新提交状态展示缓存:0审核中 1已通过 2已驳回 3已作废,null 表示从未提交
|
||||
* <p>
|
||||
* 仅为列表展示而冗余,<b>不是</b>可用性判据;「是否已认证」一律读生效快照指针。
|
||||
*/
|
||||
@Schema(description = "最新提交状态展示缓存:0审核中 1已通过 2已驳回 3已作废,null为从未提交")
|
||||
private Integer certificationStatus;
|
||||
/**
|
||||
* 最新一次驳回原因展示缓存
|
||||
*/
|
||||
@Schema(description = "最新一次驳回原因展示缓存")
|
||||
private String certificationRejectReason;
|
||||
/**
|
||||
* 生效快照指针:指向 blade_transport_cert_record.id
|
||||
* <p>
|
||||
* 「该司机是否已认证」的<b>唯一</b>判据。为 null 表示从未认证通过;
|
||||
* 一经设置<b>永不回退</b>——提交、驳回、作废都不得修改它,
|
||||
* 因此重新提交认证不会让一个已认证的司机失去接单资格。
|
||||
* <p>
|
||||
* ⚠️ {@code READ_ONLY}:本字段<b>只能由审核通过时</b>写入。
|
||||
* 司机档案的 {@code /submit} 直接以本实体接收请求体,若允许反序列化,
|
||||
* 调用方就能自行填一个记录 ID 把自己「认证」掉,绕过审核。
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "生效快照指针")
|
||||
private Long effectiveCertRecordId;
|
||||
|
||||
}
|
||||
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 认证记录实体类
|
||||
* <p>
|
||||
* 认证对象(司机 / 车辆)<b>每一次提交</b>所产生的、<b>不可变</b>的快照。
|
||||
* 记录一经创建,其 {@code snapshotJson} 与提交元信息永不修改;被同对象的后续提交取代时
|
||||
* 标记为「已作废」,而<b>不是</b>删除。判定某个对象「是否已认证」只看它持有的生效快照指针,
|
||||
* 与记录表里的任何一条记录的状态都无关。
|
||||
* <p>
|
||||
* ⚠️ <b>{@code status} 承载的是「审核状态」,不是 BladeX 的「启用 / 停用」。</b>
|
||||
* 该字段继承自 {@link TenantEntity},带来两条必须堵住的框架通道:
|
||||
* 一是 {@code BaseServiceImpl#resolveEntity} 在插入时会把 {@code null} 的 {@code status}
|
||||
* <b>静默填成 {@code 1}</b>(恰好是 {@link #STATUS_APPROVED});
|
||||
* 二是继承来的 {@code changeStatus(ids, 1)} 会直接写 {@code status},等于批量通过审核。
|
||||
* 二者都已在 {@code TransportCertRecordServiceImpl} 中封堵(前者校验抛错、后者覆写抛错)。
|
||||
* 审核必须逐条、带审核人与审核时间落库,不得借道 {@code changeStatus} 批量改状态。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("blade_transport_cert_record")
|
||||
@Schema(description = "认证记录")
|
||||
public class TransportCertRecord extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 认证对象类型:司机
|
||||
*/
|
||||
public static final String BIZ_TYPE_DRIVER = "driver";
|
||||
/**
|
||||
* 认证对象类型:车辆
|
||||
*/
|
||||
public static final String BIZ_TYPE_VEHICLE = "vehicle";
|
||||
|
||||
/**
|
||||
* 审核状态:审核中(即该对象的「待审快照」)
|
||||
*/
|
||||
public static final Integer STATUS_PENDING = 0;
|
||||
/**
|
||||
* 审核状态:已通过(该对象最新一条已通过者即其「生效快照」)
|
||||
*/
|
||||
public static final Integer STATUS_APPROVED = 1;
|
||||
/**
|
||||
* 审核状态:已驳回(审核的否定结论,需带驳回原因)
|
||||
*/
|
||||
public static final Integer STATUS_REJECTED = 2;
|
||||
/**
|
||||
* 审核状态:已作废(被同对象的再次提交取代,非驳回)
|
||||
*/
|
||||
public static final Integer STATUS_SUPERSEDED = 3;
|
||||
|
||||
/**
|
||||
* 驳回原因最大长度,与 {@code reject_reason} 列宽保持一致
|
||||
*/
|
||||
public static final int REJECT_REASON_MAX_LENGTH = 200;
|
||||
|
||||
/**
|
||||
* 认证对象类型:driver-司机,vehicle-车辆
|
||||
* <p>
|
||||
* {@code NEVER}:记录一经创建,认证对象的身份不可改。
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
@Schema(description = "认证对象类型:driver-司机,vehicle-车辆")
|
||||
private String bizType;
|
||||
/**
|
||||
* 认证对象主键:司机ID 或 车辆ID(车辆按具体车辆,不是司机)
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "认证对象主键")
|
||||
private Long bizId;
|
||||
/**
|
||||
* 展示键:司机姓名 / 车牌号,供审核列表直接展示
|
||||
*/
|
||||
@Schema(description = "展示键:司机姓名 / 车牌号")
|
||||
private String bizKey;
|
||||
/**
|
||||
* 该次提交的全量认证内容(JSON),一经创建不可修改
|
||||
* <p>
|
||||
* {@code NEVER}:本字段<b>永不进入 UPDATE 语句</b>,因此不存在「某条链路
|
||||
* 忘了保护快照」的可能。改内容只能靠<b>新提交一条记录</b>。
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
@Schema(description = "该次提交的全量认证内容JSON")
|
||||
private String snapshotJson;
|
||||
/**
|
||||
* 驳回原因,仅当审核状态为已驳回时有值
|
||||
*/
|
||||
@Schema(description = "驳回原因")
|
||||
private String rejectReason;
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
@Schema(description = "提交时间")
|
||||
private LocalDateTime submitTime;
|
||||
/**
|
||||
* 提交人
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "提交人")
|
||||
private Long submitUser;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@Schema(description = "审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "审核人")
|
||||
private Long auditUser;
|
||||
|
||||
}
|
||||
+29
@@ -26,6 +26,9 @@
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -63,6 +66,11 @@ public class TransportVehicle extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNo;
|
||||
/**
|
||||
* 所有人:行驶证登记的单位名称,不是司机
|
||||
*/
|
||||
@Schema(description = "所有人(行驶证登记的单位名称,不是司机)")
|
||||
private String ownerName;
|
||||
/**
|
||||
* 车牌颜色
|
||||
*/
|
||||
@@ -73,6 +81,11 @@ public class TransportVehicle extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "车辆类型")
|
||||
private String vehicleType;
|
||||
/**
|
||||
* 车辆识别代号(车架号)
|
||||
*/
|
||||
@Schema(description = "车辆识别代号(车架号)")
|
||||
private String vin;
|
||||
/**
|
||||
* 外廓长度,毫米
|
||||
*/
|
||||
@@ -224,5 +237,21 @@ public class TransportVehicle extends TenantEntity {
|
||||
/** 认证驳回原因 */
|
||||
@Schema(description = "认证驳回原因")
|
||||
private String certificationRejectReason;
|
||||
/**
|
||||
* 生效快照指针:指向 blade_transport_cert_record.id
|
||||
* <p>
|
||||
* 「该车辆是否已认证」的<b>唯一</b>判据。为 null 表示从未认证通过;
|
||||
* 一经设置<b>永不回退</b>——重新提交、待审、被驳回都不得修改它,
|
||||
* 因此重新提交认证不会让一辆已认证的车掉出可用池。
|
||||
* 改造后 {@link #certificationStatus} 降级为「最新提交状态」的展示缓存。
|
||||
* <p>
|
||||
* ⚠️ {@code READ_ONLY}:本字段<b>只能由审核通过时</b>写入。
|
||||
* {@code POST /transport-vehicle/submit} 直接以本实体接收请求体,
|
||||
* 若允许反序列化,调用方就能自行填一个记录 ID 把自己「认证」掉,绕过审核。
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "生效快照指针")
|
||||
private Long effectiveCertRecordId;
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -56,4 +56,14 @@ public class BaiduOcrResultVO implements Serializable {
|
||||
@Schema(description = "百度OCR原始返回结果")
|
||||
private Map<String, Object> result;
|
||||
|
||||
/**
|
||||
* 归一化后的业务字段
|
||||
* <p>
|
||||
* 键与提交请求里的字段同名({@code plateNo}、{@code ownerName}…),调用方直接回填即可,
|
||||
* 不需要认识百度那套中文键名。只包含**识别到**的字段,没识别到的不出现(而不是给空串),
|
||||
* 调用方据此就能区分「没识别到」与「识别到空值」,不会把用户已填的内容覆盖成空。
|
||||
*/
|
||||
@Schema(description = "归一化后的业务字段,键与提交请求同名")
|
||||
private Map<String, Object> fields;
|
||||
|
||||
}
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 认证审核详情视图
|
||||
* <p>
|
||||
* 审核是「拿新提交的内容和当前生效的内容比」的过程,所以这里**同时**给出两侧:
|
||||
* {@code pendingSnapshotJson} 是本次待审的全量内容,
|
||||
* {@code effectiveSnapshotJson} 是该对象当前生效的全量内容。
|
||||
* 前端对这两个 JSON 做字段级 diff,即可看出司机这次改了什么。
|
||||
* <p>
|
||||
* 两侧的 JSON 结构完全一致(同一套提交结构),因此可以逐键直接比较。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "认证审核详情")
|
||||
public class CertAuditDetailVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "认证记录主键")
|
||||
private Long id;
|
||||
@Schema(description = "认证对象类型:driver-司机,vehicle-车辆")
|
||||
private String bizType;
|
||||
@Schema(description = "认证对象主键")
|
||||
private Long bizId;
|
||||
@Schema(description = "展示键:司机姓名 / 车牌号")
|
||||
private String bizKey;
|
||||
@Schema(description = "审核状态:0审核中 1已通过 2已驳回 3已作废")
|
||||
private Integer status;
|
||||
@Schema(description = "状态中文文案")
|
||||
private String statusText;
|
||||
@Schema(description = "本次提交时间")
|
||||
private LocalDateTime submitTime;
|
||||
@Schema(description = "本次提交人")
|
||||
private Long submitUser;
|
||||
@Schema(description = "本次提交人姓名")
|
||||
private String submitUserName;
|
||||
|
||||
@Schema(description = "待审快照:本次提交的全量内容")
|
||||
private String pendingSnapshotJson;
|
||||
@Schema(description = "生效快照:该对象当前生效的全量内容;从未认证通过时为 null")
|
||||
private String effectiveSnapshotJson;
|
||||
@Schema(description = "生效快照记录ID;null 表示该对象从未认证通过")
|
||||
private Long effectiveRecordId;
|
||||
|
||||
/**
|
||||
* 该对象是否已认证
|
||||
* <p>
|
||||
* 审核页据此提示「本次驳回不会影响该对象继续使用」——
|
||||
* 已认证的对象即便本次被驳回,既得认证依然有效。
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "该对象当前是否已认证")
|
||||
private Boolean certified;
|
||||
|
||||
}
|
||||
+76
-16
@@ -44,29 +44,89 @@ public class DriverVehicleCardVO implements Serializable {
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "所有人(行驶证登记的单位名称,不是司机)")
|
||||
private String ownerName;
|
||||
|
||||
@Schema(description = "车牌颜色")
|
||||
private String plateColor;
|
||||
|
||||
@Schema(description = "车辆类型")
|
||||
private String vehicleType;
|
||||
|
||||
@Schema(description = "行驶证主页照片")
|
||||
private String licenseFrontUrl;
|
||||
|
||||
@Schema(description = "行驶证副页照片")
|
||||
private String licenseBackUrl;
|
||||
|
||||
@Schema(description = "道路运输证号")
|
||||
private String roadTransportNo;
|
||||
|
||||
@Schema(description = "道路运输证照片")
|
||||
private String roadTransportUrl;
|
||||
|
||||
@Schema(description = "车架号")
|
||||
@Schema(description = "车辆识别代号(车架号),选填")
|
||||
private String vin;
|
||||
|
||||
@Schema(description = "发动机号")
|
||||
private String engineNo;
|
||||
@Schema(description = "外廓长度,毫米")
|
||||
private Integer outerLength;
|
||||
|
||||
@Schema(description = "外廓宽度,毫米")
|
||||
private Integer outerWidth;
|
||||
|
||||
@Schema(description = "外廓高度,毫米")
|
||||
private Integer outerHeight;
|
||||
|
||||
@Schema(description = "核定载质量,KG")
|
||||
private Integer approvedLoadKg;
|
||||
|
||||
@Schema(description = "准牵引总质量,KG")
|
||||
private Integer tractionMassKg;
|
||||
|
||||
@Schema(description = "能源类型")
|
||||
private String energyType;
|
||||
|
||||
@Schema(description = "业务关系:自有 / 管理挂靠 / 业务合作")
|
||||
private String businessRelation;
|
||||
|
||||
@Schema(description = "强制报废日期")
|
||||
private String compulsoryScrapDate;
|
||||
|
||||
@Schema(description = "强制报废长期有效:0否 1是")
|
||||
private Integer compulsoryScrapLongTerm;
|
||||
|
||||
@Schema(description = "行驶证档案编号")
|
||||
private String drivingLicenseNo;
|
||||
|
||||
@Schema(description = "行驶证主页正面照片")
|
||||
private String drivingLicenseImage;
|
||||
|
||||
@Schema(description = "行驶证主页反面照片")
|
||||
private String drivingLicenseMainBack;
|
||||
|
||||
@Schema(description = "行驶证副页正面照片")
|
||||
private String drivingLicenseViceFront;
|
||||
|
||||
@Schema(description = "行驶证副页反面照片")
|
||||
private String drivingLicenseViceBack;
|
||||
|
||||
@Schema(description = "行驶证有效期起")
|
||||
private String drivingLicenseStartDate;
|
||||
|
||||
@Schema(description = "行驶证有效期止")
|
||||
private String licenseValidEnd;
|
||||
private String drivingLicenseEndDate;
|
||||
|
||||
@Schema(description = "行驶证长期有效:0否 1是")
|
||||
private Integer drivingLicenseLongTerm;
|
||||
|
||||
@Schema(description = "道路运输证号")
|
||||
private String roadTransportCertNo;
|
||||
|
||||
@Schema(description = "道路运输证照片")
|
||||
private String roadTransportCertImage;
|
||||
|
||||
@Schema(description = "道路运输证有效期起")
|
||||
private String roadTransportCertStartDate;
|
||||
|
||||
@Schema(description = "道路运输证有效期止")
|
||||
private String roadTransportCertEndDate;
|
||||
|
||||
@Schema(description = "道路运输证长期有效:0否 1是")
|
||||
private Integer roadTransportCertLongTerm;
|
||||
|
||||
@Schema(description = "机动车登记编号")
|
||||
private String registrationNo;
|
||||
|
||||
@Schema(description = "机动车登记本照片")
|
||||
private String registrationImage;
|
||||
|
||||
@Schema(description = "认证状态:0认证中 1认证通过 2认证驳回")
|
||||
private Integer certificationStatus;
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.transport.pojo.entity.TransportCertRecord;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 认证记录视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "认证记录")
|
||||
public class TransportCertRecordVO extends TransportCertRecord {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
/**
|
||||
* 提交人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "提交人姓名")
|
||||
private String submitUserName;
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "审核人姓名")
|
||||
private String auditUserName;
|
||||
/**
|
||||
* 状态中文文案:审核中 / 已通过 / 已驳回 / 已作废
|
||||
* <p>
|
||||
* 由服务层统一翻译后下发,避免小程序、Web、接口三处各造一套说法。
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "状态中文文案")
|
||||
private String statusText;
|
||||
/**
|
||||
* 司机姓名(认证对象档案的**当前**姓名,不是提交时的历史值)
|
||||
* <p>
|
||||
* 司机侧取认证对象本身;车辆侧取提交该记录的司机。
|
||||
* 解析不到档案时为空——存量订正记录里没有账号的那些司机补不出人,如实留空。
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "司机姓名")
|
||||
private String driverName;
|
||||
/**
|
||||
* 司机手机号(认证对象档案的**当前**手机号,明文下发)
|
||||
* <p>
|
||||
* 审核员靠它联系司机核实材料,故不脱敏;认证快照里从来没有手机号,
|
||||
* 它只有司机档案这一个来源。
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "司机手机号")
|
||||
private String driverMobile;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user