✨ 已结束运单的打卡卡片仅展示不可提交

This commit is contained in:
2026-10-20 14:40:18 +08:00
parent aa0226e77b
commit 0bdfad6a8d
2 changed files with 18 additions and 0 deletions
@@ -67,6 +67,9 @@ public class DriverPunchNodeVO implements Serializable {
@Schema(description = "不可打卡的原因,供司机端展示")
private String lockReason;
@Schema(description = "运单已结束(完成/取消):卡片仅展示、不可提交")
private Boolean ended;
@Schema(description = "是否展示该卡(在途可能因频次/时段隐藏)")
private Boolean visible;
@@ -1642,6 +1642,20 @@ public class DriverWaybillServiceImpl implements IDriverWaybillService {
+ WaybillProcessSupport.firstUnfinishedPrerequisiteName(processJson, unfinished) + "」打卡");
}
// 已结束的运单不再接受打卡:卡片留着给司机回看,未打卡的节点一律不可提交。
// 文案压过异常与顺序门禁——结束没有解除途径,说「处理完就能打」是错的。
// 已打卡的节点只置 ended:它们要继续可展开回看照片与时间,原因文案也不再适用。
String endedReason = WaybillProcessSupport.punchEndedReason(waybill.getBusinessStatus());
if (endedReason != null) {
for (DriverPunchNodeVO vo : nodes) {
vo.setEnded(true);
if (!Boolean.TRUE.equals(vo.getDone())) {
vo.setActionable(false);
vo.setLockReason(endedReason);
}
}
}
// 是否允许展开:顺序门禁不允许展开(还没轮到,展开也没用);
// 异常门禁允许展开——那里出过事,司机需要看到回填内容与「异常详情」。
for (DriverPunchNodeVO vo : nodes) {
@@ -1679,6 +1693,7 @@ public class DriverWaybillServiceImpl implements IDriverWaybillService {
for (DriverPunchNodeVO vo : nodes) {
if (!Boolean.TRUE.equals(vo.getDone())
&& !Boolean.TRUE.equals(vo.getEnded())
&& !Boolean.TRUE.equals(vo.getBlocked())
&& !Boolean.TRUE.equals(vo.getBlockedByOrder())) {
vo.setDefaultExpanded(true);