diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/CertAuditRequest.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/CertAuditRequest.java new file mode 100644 index 00000000..00a69ce8 --- /dev/null +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/CertAuditRequest.java @@ -0,0 +1,62 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *
+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *
+ * 1. This software is for development use only under a valid license + * from BladeX. + *
+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *
+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *
+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *
+ * 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; + +/** + * 管理端认证审核请求 + *
+ * 同一字段 body 与 query 都可传,两处都给时以 body 为准。 + * + * @author Chill + */ +@Data +@Schema(description = "管理端认证审核请求") +public class CertAuditRequest implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @Schema(description = "认证记录主键") + private Long id; + @Schema(description = "true 通过,false 驳回") + private Boolean pass; + @Schema(description = "驳回原因;驳回时必填,≤200 字") + private String rejectReason; + /** + * 审核员修订后的全量认证内容(JSON);空或空白表示不修订 + *
+ * 通过时才生效:它既是写回档案的依据,也会原样留痕到认证记录上。 + */ + @Schema(description = "审核员修订后的全量认证内容JSON;空表示不修订") + private String auditedSnapshotJson; + +} diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/ExceptionMaintenanceRecordRequest.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/ExceptionMaintenanceRecordRequest.java new file mode 100644 index 00000000..bae3f139 --- /dev/null +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/dto/ExceptionMaintenanceRecordRequest.java @@ -0,0 +1,90 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *
+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *
+ * 1. This software is for development use only under a valid license + * from BladeX. + *
+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *
+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *
+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *
+ * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is + * not liable for any claims arising from secondary or illegal development. + *
+ * 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.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 异常处置 → 录入维修记录请求 + *
+ * 车牌号与车船类型不接收前端传值:车牌取自异常处置,车船类型固定「车辆」, + * 避免维修记录挂到与异常无关的车上。 + * + * @author Chill + */ +@Data +@Schema(description = "异常处置录入维修记录请求") +public class ExceptionMaintenanceRecordRequest implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @Schema(description = "异常处置ID") + private Long id; + + @Schema(description = "维修时间") + private LocalDateTime maintenanceTime; + + @Schema(description = "维修位置") + private String location; + + @Schema(description = "维修人") + private String maintainer; + + @Schema(description = "维修单位") + private String company; + + @Schema(description = "联系方式") + private String contact; + + @Schema(description = "更换零件") + private String replacedPart; + + @Schema(description = "费用") + private BigDecimal cost; + + @Schema(description = "里程数(公里)") + private BigDecimal mileage; + + @Schema(description = "出厂时间") + private LocalDateTime factoryTime; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "备注说明") + private String remark; + + @Schema(description = "附件JSON,[{\"name\":\"...\",\"url\":\"...\"}]") + private String attachments; + +} diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/LoadingManage.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/LoadingManage.java index e037a882..1a1283de 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/LoadingManage.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/LoadingManage.java @@ -68,6 +68,9 @@ public class LoadingManage extends TenantEntity { @Schema(description = "联系电话") private String driverPhone; + @Schema(description = "司机ID") + private Long driverId; + @Schema(description = "押运人") private String escortName; diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/MaintenanceRecord.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/MaintenanceRecord.java index 34d88f10..2d0a6219 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/MaintenanceRecord.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/MaintenanceRecord.java @@ -61,6 +61,12 @@ public class MaintenanceRecord extends TenantEntity { */ @Schema(description = "车牌号/船号") private String vehicleNo; + /** + * 关联异常处置ID(小程序录入时写入) + */ + @Schema(description = "关联异常处置ID(小程序录入时写入)") + @TableField(updateStrategy = FieldStrategy.NEVER) + private Long exceptionId; /** * 维修人 */ diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/TransportCertRecord.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/TransportCertRecord.java index 4f1346f4..bfed3f33 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/TransportCertRecord.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/TransportCertRecord.java @@ -28,6 +28,7 @@ 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.JsonIgnore; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.v3.oas.annotations.media.Schema; @@ -125,6 +126,19 @@ public class TransportCertRecord extends TenantEntity { @TableField(updateStrategy = FieldStrategy.NEVER) @Schema(description = "该次提交的全量认证内容JSON") private String snapshotJson; + /** + * 审核通过时确定的修订版内容(JSON) + *
+ * 审核员可以在通过时直接改内容:司机提交的是 {@code snapshotJson}(永不可改), + * 最终写回档案、司机端读到的「当前生效内容」以本字段优先,为 null 才回退到 + * {@code snapshotJson}。为 null 即「审核员没有修订」。 + *
+ * {@code @JsonIgnore}:司机端的 {@code TransportCertRecordVO} 继承本实体, + * 修订版是审核过程的留痕,不该下发给司机。 + */ + @JsonIgnore + @Schema(description = "审核通过时确定的修订版内容JSON;null 表示未修订") + private String auditedSnapshotJson; /** * 驳回原因,仅当审核状态为已驳回时有值 */ diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/AdminHomeBadgesVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/AdminHomeBadgesVO.java index bb6081fb..8b8bf43a 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/AdminHomeBadgesVO.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/AdminHomeBadgesVO.java @@ -38,7 +38,7 @@ public class AdminHomeBadgesVO implements Serializable { @Serial private static final long serialVersionUID = 1L; - @Schema(description = "异常处置待办数(disposalStatus≠completed)") + @Schema(description = "异常处置待办数(disposalStatus=pending)") private long exception; @Schema(description = "风险记录待办数(disposalStatus=pending)") diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ArchiveManageStatsVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ArchiveManageStatsVO.java new file mode 100644 index 00000000..085673f4 --- /dev/null +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ArchiveManageStatsVO.java @@ -0,0 +1,47 @@ +/** + * BladeX Commercial License Agreement + * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved. + *
+ * Use of this software is governed by the Commercial License Agreement + * obtained after purchasing a license from BladeX. + *
+ * 1. This software is for development use only under a valid license + * from BladeX. + *
+ * 2. Redistribution of this software's source code to any third party + * without a commercial license is strictly prohibited. + *
+ * 3. Licensees may copyright their own code but cannot use segments + * from this software for such purposes. Copyright of this software + * remains with BladeX. + *
+ * Using this software signifies agreement to this License, and the software + * must not be used for illegal purposes. + *
+ * Author: Chill Zhuang (bladejava@qq.com) + */ +package org.springblade.transport.pojo.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 调度端档案统计(司机 + 车辆证件有效期) + */ +@Data +@Schema(description = "调度端档案统计") +public class ArchiveManageStatsVO implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @Schema(description = "司机证件有效期统计") + private DriverExpiryStatVO driver = new DriverExpiryStatVO(); + + @Schema(description = "车辆证件有效期统计") + private TransportVehicleExpiryStatVO vehicle = new TransportVehicleExpiryStatVO(); + +} diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/CertAuditDetailVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/CertAuditDetailVO.java index 212eb072..672a7826 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/CertAuditDetailVO.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/CertAuditDetailVO.java @@ -81,6 +81,13 @@ public class CertAuditDetailVO implements Serializable { @Schema(description = "待审快照:本次提交的全量内容") private String pendingSnapshotJson; + /** + * 审核员在本次审核中填写的修订版内容;未修订时为 null + *
+ * 只在「通过」时才会落库,驳回不产生生效内容。审核页据此回显审核员改了什么。
+ */
+ @Schema(description = "本次审核提交的修订版内容;未修订时为 null")
+ private String auditedSnapshotJson;
@Schema(description = "生效快照:该对象当前生效的全量内容;从未认证通过时为 null")
private String effectiveSnapshotJson;
@Schema(description = "生效快照记录ID;null 表示该对象从未认证通过")
diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/DriverVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/DriverVO.java
index 5b22c7ac..1072b4be 100644
--- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/DriverVO.java
+++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/DriverVO.java
@@ -48,6 +48,12 @@ public class DriverVO extends Driver {
@Serial
private static final long serialVersionUID = 1L;
+ /**
+ * 搜索关键字:同时模糊匹配姓名与手机号(小程序列表用,管理端不传)
+ */
+ @TableField(exist = false)
+ @Schema(description = "搜索关键字(姓名 / 手机号)")
+ private String keyword;
/**
* 证件有效期状态:within30-30天内到期,expired-已到期
*/
diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ExceptionDisposalVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ExceptionDisposalVO.java
index d120aa54..b53e854b 100644
--- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ExceptionDisposalVO.java
+++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/ExceptionDisposalVO.java
@@ -106,6 +106,10 @@ public class ExceptionDisposalVO extends ExceptionDisposal {
@Schema(description = "可调整的路线站点,少于两个站时为空")
private List
+ * 由服务层按 {@code auditedSnapshotJson} 是否有内容算出,前端据此打「已修订」标记。
+ */
+ @TableField(exist = false)
+ @Schema(description = "是否经过审核员修订")
+ private Boolean revised;
}
diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TransportVehicleVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TransportVehicleVO.java
index bd4ab362..97106813 100644
--- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TransportVehicleVO.java
+++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TransportVehicleVO.java
@@ -48,6 +48,12 @@ public class TransportVehicleVO extends TransportVehicle {
@Serial
private static final long serialVersionUID = 1L;
+ /**
+ * 搜索关键字:同时模糊匹配车牌、VIN 与所有人(小程序列表用,管理端不传)
+ */
+ @TableField(exist = false)
+ @Schema(description = "搜索关键字(车牌 / VIN / 所有人)")
+ private String keyword;
/**
* 证件有效期状态:within30-30天内到期,expired-已到期
*/
diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TripQueryVO.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TripQueryVO.java
index 750dd6d0..912b2b17 100644
--- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TripQueryVO.java
+++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/vo/TripQueryVO.java
@@ -34,8 +34,10 @@ import java.util.Set;
/**
* 运次查询条件
*
- * 司机端用 {@link #forDriver(String)} 按司机手机号收口;管理端用 {@link #forAdmin()} 不按司机收口。
- * 两者都不给时收口为空集——收口一旦缺省就等于把别人的运次发出去,故缺省不放行。
+ * 司机端用 {@link #forDriver(Long)} 按司机档案 ID 收口;管理端用 {@link #forAdmin()} 不按司机收口。
+ * 两者都不给时收口为空集。
+ *
+ * 归属判据只有司机档案 ID;driver_phone 是派单时的号码快照,不参与判定。
*/
@Data
@Schema(description = "运次查询条件")
@@ -47,8 +49,8 @@ public class TripQueryVO implements Serializable {
@Schema(description = "运次主键(详情按它取单个运次)")
private String tripId;
- @Schema(description = "司机手机号")
- private String driverPhone;
+ @Schema(description = "司机档案 ID(司机端收口判据,空或非正数一律不放行)")
+ private Long driverId;
@Schema(description = "是否不按司机收口(管理端)")
private boolean allDrivers;
@@ -92,9 +94,9 @@ public class TripQueryVO implements Serializable {
@Schema(description = "每页条数(按运次,不是运单)")
private Integer size;
- public static TripQueryVO forDriver(String driverPhone) {
+ public static TripQueryVO forDriver(Long driverId) {
TripQueryVO query = new TripQueryVO();
- query.setDriverPhone(driverPhone);
+ query.setDriverId(driverId);
return query;
}
diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/CertificationAuditController.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/CertificationAuditController.java
index 6e6a024f..77c50af3 100644
--- a/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/CertificationAuditController.java
+++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/CertificationAuditController.java
@@ -36,6 +36,7 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
+import org.springblade.transport.pojo.dto.CertAuditRequest;
import org.springblade.transport.pojo.vo.CertAuditCapabilityVO;
import org.springblade.transport.pojo.vo.CertAuditDetailVO;
import org.springblade.transport.pojo.vo.TransportCertRecordVO;
@@ -43,10 +44,13 @@ import org.springblade.transport.service.ICertAuditService;
import org.springblade.transport.support.CertAuditPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
+import java.util.function.Function;
+
/**
* 认证审核(管理端)
*
@@ -92,13 +96,26 @@ public class CertificationAuditController extends BladeController {
@PostMapping("/audit")
@ApiOperationSupport(order = 3)
- @Operation(summary = "审核认证记录", description = "通过使该记录成为生效快照;驳回只终结该记录,生效快照不变")
+ @Operation(summary = "审核认证记录", description = "通过使该记录成为生效快照;驳回只终结该记录,生效快照不变。通过时可携带修订后的全量认证内容,它将成为新的生效内容并原样留痕")
@PreAuth(CertAuditPermissions.AUDIT_ACTION)
public R
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.transport.controller;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.tool.api.R;
+import org.springblade.transport.pojo.vo.ArchiveManageStatsVO;
+import org.springblade.transport.pojo.vo.DeptTreeNodeVO;
+import org.springblade.transport.service.IManageArchiveService;
+import org.springblade.transport.support.MpUserDataScopeSupport;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 调度端档案(小程序管理端)
+ *
+ * 对外完整路径:{@code /api/blade-transport/archive/manage/**}
+ * (网关 StripPrefix 去掉 {@code blade-transport} 后落入 {@code /archive/manage/**})。
+ * 同时兼容未去前缀直连({@code /blade-transport/archive/manage/**})。
+ * 仅需登录态,不挂管理端菜单鉴权。
+ *
+ * 为什么单独一个接口:管理端 {@code /driver/expiry-stat}、{@code /transport-vehicle/expiry-stat}
+ * 挂在 {@code @PreAuth(menu = "driver")} / {@code @PreAuth(menu = "transport_vehicle")} 下,
+ * 小程序登录的令牌 roleId 是占位值 "0"、查不到 blade_role_menu,必然被拒(401 请求未授权)。
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping({"/archive/manage", "/blade-transport/archive/manage"})
+@Tag(name = "调度端档案", description = "小程序调度端资料页档案统计")
+public class ManageArchiveController extends BladeController {
+
+ /**
+ * 权限不足的业务码。小程序请求层把 401 当会话失效,接口一律不得回 401。
+ */
+ private static final int FORBIDDEN_CODE = 403;
+
+ private static final String FORBIDDEN_MSG = "仅调度端管理员可选择组织";
+
+ private final IManageArchiveService manageArchiveService;
+ private final MpUserDataScopeSupport mpUserDataScopeSupport;
+
+ @GetMapping("/stats")
+ @ApiOperationSupport(order = 1)
+ @Operation(summary = "档案统计", description = "司机档案与车辆档案的总数、30 天内到期数、已到期数;不按组织收口")
+ public R
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.transport.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.transport.pojo.entity.Driver;
+import org.springblade.transport.pojo.vo.DriverVO;
+import org.springblade.transport.service.IDriverService;
+import org.springblade.transport.support.MpUserDataScopeSupport;
+import org.springblade.transport.wrapper.DriverWrapper;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.LocalDate;
+
+/**
+ * 调度端司机档案管理(小程序)
+ *
+ * 对外完整路径:{@code /api/blade-transport/archive/manage/driver/**}
+ * (网关 StripPrefix 去掉 {@code blade-transport} 后落入 {@code /archive/manage/driver/**}),
+ * 同时兼容未去前缀直连。
+ *
+ * 为什么不复用管理端的 {@code /driver/**}:那些接口挂在 {@code @PreAuth(menu = "driver")} 下,
+ * 小程序令牌的 roleId 是占位值 "0"、查不到 blade_role_menu,对任何小程序账号都必然被拒。
+ * 这里不挂 {@code @PreAuth},改成方法内显式判定管理员身份,且**权限不足必须回业务 403**:
+ * 小程序请求层把 401 一律当会话失效(清令牌 + 回登录页),回 401 会把越权访问变成被踢下线。
+ *
+ * @author Chill
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping({"/archive/manage/driver", "/blade-transport/archive/manage/driver"})
+@Tag(name = "调度端司机档案", description = "小程序调度端司机管理")
+public class ManageArchiveDriverController extends BladeController {
+
+ private static final int DEFAULT_CURRENT = 1;
+ private static final int DEFAULT_SIZE = 10;
+ private static final int MAX_SIZE = 100;
+
+ /**
+ * 权限不足的业务码。小程序请求层把 401 当会话失效,接口一律不得回 401。
+ */
+ private static final int FORBIDDEN_CODE = 403;
+
+ private static final String FORBIDDEN_MSG = "仅调度端管理员可管理司机档案";
+
+ private final IDriverService driverService;
+ private final MpUserDataScopeSupport mpUserDataScopeSupport;
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 1)
+ @Operation(summary = "司机档案分页", description = "keyword 同时模糊匹配姓名与手机号;status 不传为启用停用全量;expireStatus 取 within30 / expired")
+ public R
+ * Use of this software is governed by the Commercial License Agreement
+ * obtained after purchasing a license from BladeX.
+ *
+ * 1. This software is for development use only under a valid license
+ * from BladeX.
+ *
+ * 2. Redistribution of this software's source code to any third party
+ * without a commercial license is strictly prohibited.
+ *
+ * 3. Licensees may copyright their own code but cannot use segments
+ * from this software for such purposes. Copyright of this software
+ * remains with BladeX.
+ *
+ * Using this software signifies agreement to this License, and the software
+ * must not be used for illegal purposes.
+ *
+ * Author: Chill Zhuang (bladejava@qq.com)
+ */
+package org.springblade.transport.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.transport.pojo.entity.TransportVehicle;
+import org.springblade.transport.pojo.vo.TransportVehicleVO;
+import org.springblade.transport.service.ITransportVehicleService;
+import org.springblade.transport.support.MpUserDataScopeSupport;
+import org.springblade.transport.wrapper.TransportVehicleWrapper;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.LocalDate;
+
+/**
+ * 调度端车辆档案管理(小程序)
+ *
+ * 对外完整路径:{@code /api/blade-transport/archive/manage/vehicle/**}
+ * (网关 StripPrefix 去掉 {@code blade-transport} 后落入 {@code /archive/manage/vehicle/**}),
+ * 同时兼容未去前缀直连。
+ *
+ * 与管理端 {@code /transport-vehicle/**} 的关系、以及为什么必须回业务 403 而不是 401,
+ * 见 {@link ManageArchiveDriverController} 的类注释。
+ *
+ * @author Chill
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping({"/archive/manage/vehicle", "/blade-transport/archive/manage/vehicle"})
+@Tag(name = "调度端车辆档案", description = "小程序调度端车辆管理")
+public class ManageArchiveVehicleController extends BladeController {
+
+ private static final int DEFAULT_CURRENT = 1;
+ private static final int DEFAULT_SIZE = 10;
+ private static final int MAX_SIZE = 100;
+
+ /**
+ * 权限不足的业务码。小程序请求层把 401 当会话失效,接口一律不得回 401。
+ */
+ private static final int FORBIDDEN_CODE = 403;
+
+ private static final String FORBIDDEN_MSG = "仅调度端管理员可管理车辆档案";
+
+ private final ITransportVehicleService transportVehicleService;
+ private final MpUserDataScopeSupport mpUserDataScopeSupport;
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 1)
+ @Operation(summary = "车辆档案分页", description = "keyword 同时模糊匹配车牌、VIN 与所有人;status 不传为启用停用全量;expireStatus 取 within30 / expired")
+ public R
+ * 不复用 blade-system 的部门接口:那些接口全挂在 {@code @PreAuth(menu = "dept")} 下,
+ * 小程序令牌的 roleId 是占位值 "0"、查不到 blade_role_menu,任何小程序账号都会被拒。
+ * 这里直接按租户读表,只取组织选择需要的四列。
+ */
+public interface ManageArchiveDeptMapper {
+
+ /**
+ * 租户内启用中的部门,按排序号升序(不含已删除)
+ */
+ @Select("SELECT id, parent_id AS parentId, dept_name AS deptName, sort FROM blade_dept "
+ + "WHERE is_deleted = 0 AND status = 1 AND tenant_id = #{tenantId} "
+ + "ORDER BY sort, id")
+ List> deptTree() {
+ if (!mpUserDataScopeSupport.isMpDispatcher()) {
+ return R.fail(FORBIDDEN_CODE, FORBIDDEN_MSG);
+ }
+ return R.data(manageArchiveService.deptTree());
+ }
+
+}
diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/ManageArchiveDriverController.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/ManageArchiveDriverController.java
new file mode 100644
index 00000000..e5e25fcb
--- /dev/null
+++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/controller/ManageArchiveDriverController.java
@@ -0,0 +1,180 @@
+/**
+ * BladeX Commercial License Agreement
+ * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
+ *