✨ 运单详情打卡记录支持管理端编辑(含打卡状态)
新增 POST /waybill-manage/punch-record/save:按运单当前过程配置补录或修正
节点打卡与在途打卡,打卡状态也在可编辑之列。
- punched=false 即取消打卡:清除该节点全部打卡流水(时间轴上「未打卡」的判据
就是没有流水);在途节点没有节点 key 可定位单条,故清空该运单全部在途流水
- 节点以当前过程配置为准回写 key/name,前端带旧值也不会写歪
- 编辑按字段显式更新:updateById 会跳过 null 字段,清空地址/货量/照片保存后不生效
- 编辑不改 exception_flag(与异常处置表绑定);管理端补录 driver_id 留空
- 凭证图按 [{type,url}] 回写,避免展示层按下标回推类型时换序串标
- 补 8 个服务单测 + 3 个 MockMvc 端点绑定测试
This commit is contained in:
+114
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* 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.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理端打卡记录编辑请求
|
||||
* <p>
|
||||
* 承载时间轴上单条打卡记录的全部可编辑项,字段按过程配置取舍:
|
||||
* 打卡定位(地址/经纬度)、上传货量(重量/体积/数量)、上传凭证(照片)。
|
||||
* <p>
|
||||
* {@code punched=false} 表示取消打卡,服务端会清除该节点的打卡流水
|
||||
* ——时间轴上「未打卡」的判据就是没有流水,故不能只改状态位。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "管理端打卡记录编辑请求")
|
||||
public class WaybillPunchRecordSaveRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "运单ID")
|
||||
private Long waybillId;
|
||||
|
||||
@Schema(description = "打卡类型:node=过程节点打卡,enroute=在途打卡")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "过程节点 key")
|
||||
private String nodeCode;
|
||||
|
||||
@Schema(description = "过程节点名称")
|
||||
private String nodeName;
|
||||
|
||||
@Schema(description = "打卡状态:true 已打卡,false 未打卡")
|
||||
private Boolean punched;
|
||||
|
||||
@Schema(description = "打卡时间 yyyy-MM-dd HH:mm:ss,为空时取当前时间")
|
||||
private String punchTime;
|
||||
|
||||
@Schema(description = "打卡地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private String longitude;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private String latitude;
|
||||
|
||||
@Schema(description = "重量(吨)")
|
||||
private String weight;
|
||||
|
||||
@Schema(description = "体积(方)")
|
||||
private String volume;
|
||||
|
||||
@Schema(description = "数量(件)")
|
||||
private String quantity;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "打卡凭证图,按上传顺序回写凭证类型")
|
||||
private List<Photo> photos = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 打卡凭证图
|
||||
* <p>
|
||||
* 类型随图一起回写:展示层对「逗号分隔的裸 URL」按凭证类型下标回推标签,
|
||||
* 编辑换了顺序就会串标,所以这里保留原类型。
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "打卡凭证图")
|
||||
public static class Photo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "凭证类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "图片URL")
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user