✨ 司机端小程序接口按运次下发列表与详情,并支持整单接单与拒单

新增 /waybill/task/{current,pending-preview,counts,page,detail,accept,reject}:
列表一页若干个运次,详情按是否配载单下发整趟车站点(route_json 顺序,
装N/卸N 指向配载单运单集合里的第 N 张子运单,每站货物取子运单);
一次接单把该运次未走完的子运单一起置为已接单,一次拒单整单拒绝。
旧的运单级端点与写入口语义不变。
This commit is contained in:
2026-10-17 18:13:58 +08:00
parent 9a43863c09
commit 1de48db233
20 changed files with 2139 additions and 20 deletions
@@ -153,6 +153,26 @@ public class DriverWaybillCardVO implements Serializable {
@Schema(description = "运输组织:common普通 / load配载")
private String transportOrgType;
/* ===== 运次(一趟车)字段:运次接口返回,旧运单接口不填 ===== */
@Schema(description = "运次主键:配载单主键或运单主键,按字符串下发(19 位雪花号按数字下发会被前端取整)")
private String tripId;
@Schema(description = "配载单号,未配载为空")
private String loadingNo;
@Schema(description = "展示单号:有配载取配载单号,否则取运单号")
private String tripNo;
@Schema(description = "途经站点:整趟车中间各站按顺序以「 → 」连接")
private String viaName;
@Schema(description = "站点数(整趟车,含起终点)")
private Integer stationCount;
@Schema(description = "货物汇总(整趟车,同名货物合并且单位一致时取数量合计)")
private String cargoSummary;
@Schema(description = "计划发货时间")
private String planShipTime;
@@ -168,6 +188,9 @@ public class DriverWaybillCardVO implements Serializable {
@Schema(description = "装卸点(详情返回)")
private List<DriverRoutePointVO> routePoints;
@Schema(description = "站点任务安排(详情返回,按实际途经顺序,第 1 站即 ①;有配载时含每站装卸与货物条目)")
private List<TripStationVO> stations;
@Schema(description = "过程配置 JSON(详情返回,供前端兜底推导打卡节点)")
private String processJson;
@@ -0,0 +1,105 @@
/**
* 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>
* 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;
import java.math.BigDecimal;
import java.util.List;
/**
* 运次站点(任务安排)
* <p>
* 有配载单时按配载单的路线信息给出实际途经顺序,第 1 站即 ①;站点上的「装N / 卸N」指向配载单运单集合里的第 N 张子运单,
* 同一站可以既卸又装(装卸)。没有路线信息时回退到子运单的起讫点去重成站。
* <p>
* 站点上的货物条目取子运单,不取配载单的货物信息:配载单的货物条数与子运单不一定同数,行序也对不上站点编号。
*/
@Data
@Schema(description = "运次站点")
public class TripStationVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "站序,从 1 开始(展示为 ①②③)")
private Integer index;
@Schema(description = "站名:展示地址优先,回退详细地址")
private String name;
@Schema(description = "详细地址")
private String address;
@Schema(description = "站点标记原文:装N / 卸N")
private List<String> tags;
@Schema(description = "操作类型:load 装货 / unload 卸货 / load_unload 装卸,无从判定时为空")
private String operationType;
@Schema(description = "操作类型文案:装货 / 卸货 / 装卸")
private String operationTypeLabel;
@Schema(description = "该站涉及的货物条目")
private List<TripCargoVO> cargos;
/**
* 站点货物条目
*/
@Data
@Schema(description = "运次站点货物条目")
public static class TripCargoVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "所属子运单主键,按字符串下发")
private String waybillId;
@Schema(description = "所属运单号")
private String waybillNo;
@Schema(description = "货物名称")
private String cargoName;
@Schema(description = "货主名称")
private String customerName;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "数量单位")
private String quantityUnit;
@Schema(description = "该站的操作:load 装货 / unload 卸货")
private String operation;
@Schema(description = "项目名称")
private String projectName;
}
}
@@ -28,6 +28,7 @@ import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
@@ -107,12 +108,45 @@ public class TripVO implements Serializable {
@Schema(description = "到货地")
private String arrivalAddress;
@Schema(description = "起点名称:整趟车首站,展示地址优先、回退详细地址")
private String departureName;
@Schema(description = "途经站点:中间各站按顺序以「 → 」连接,无中间站为空")
private String transitName;
@Schema(description = "终点名称:整趟车末站,展示地址优先、回退详细地址")
private String arrivalName;
@Schema(description = "站点数(整趟车,含起终点)")
private int stationCount;
@Schema(description = "货物汇总:按货物名合并数量,同名同单位取合计")
private String cargoSummary;
@Schema(description = "合计重量:全部子运单同单位时为数量合计,单位不一致时为空")
private BigDecimal totalQuantity;
@Schema(description = "合计重量的单位,与 totalQuantity 同时为空或同时有值")
private String quantityUnit;
@Schema(description = "计划发货日期(配载单,未配载为空)")
private LocalDate estimatedStartDate;
@Schema(description = "计划完成日期(配载单,未配载为空)")
private LocalDate estimatedEndDate;
@Schema(description = "任务备注(配载单的运输说明)")
private String taskRemark;
@Schema(description = "路线信息,仅单个运次详情返回(列表不带,省流量)")
private String routeJson;
@Schema(description = "货物信息,仅单个运次详情返回(列表不带,省流量)")
private String goodsJson;
@Schema(description = "站点(任务安排,按实际途经顺序),仅单个运次详情返回;列表用起/经/终与站点数")
private List<TripStationVO> stations;
@Schema(description = "子运单(可见子单,按创建时间升序)")
private List<TripWaybillVO> waybills;