✨ 末位打卡回单需确认时进入待回单确认
This commit is contained in:
+16
-3
@@ -520,19 +520,32 @@ public class DriverWaybillServiceImpl implements IDriverWaybillService {
|
|||||||
nodePunchMapper.insert(punch);
|
nodePunchMapper.insert(punch);
|
||||||
|
|
||||||
advanceCurrentProcessNode(waybill, nodeCfg);
|
advanceCurrentProcessNode(waybill, nodeCfg);
|
||||||
// 末位打卡节点是到货/卸货/签收、且回单无需确认完成时,本次打卡一并把运单置为完成;
|
// 末位打卡节点是到货/卸货/签收、且运单本身允许完成时,本次打卡就是运单的去向决定点:
|
||||||
|
// 回单无需确认 → 一并完成;回单需业务员确认 → 停在待回单确认等业务员确认。
|
||||||
// isLastDriverPunchNode 与 returnNeedsNoConfirmation 传的就是上面那份 processJson,未再调 resolveProcessJson 取过程配置。
|
// isLastDriverPunchNode 与 returnNeedsNoConfirmation 传的就是上面那份 processJson,未再调 resolveProcessJson 取过程配置。
|
||||||
String nodeKey = WaybillProcessSupport.nodeKey(nodeCfg);
|
String nodeKey = WaybillProcessSupport.nodeKey(nodeCfg);
|
||||||
String nodeName = WaybillProcessSupport.nodeName(nodeCfg);
|
String nodeName = WaybillProcessSupport.nodeName(nodeCfg);
|
||||||
|
String waybillBusinessStatus = waybill.getBusinessStatus();
|
||||||
boolean completed = false;
|
boolean completed = false;
|
||||||
if (WaybillProcessSupport.isLastDriverPunchNode(processJson, nodeKey)
|
if (WaybillProcessSupport.isLastDriverPunchNode(processJson, nodeKey)
|
||||||
&& WaybillProcessSupport.isDeliveryNode(nodeKey, nodeName)
|
&& WaybillProcessSupport.isDeliveryNode(nodeKey, nodeName)
|
||||||
&& WaybillProcessSupport.returnNeedsNoConfirmation(processJson)
|
|
||||||
&& canAutoCompleteWaybill(waybill)) {
|
&& canAutoCompleteWaybill(waybill)) {
|
||||||
completed = waybillService.completeWithoutDeptCheck(waybill.getId());
|
if (WaybillProcessSupport.returnNeedsNoConfirmation(processJson)) {
|
||||||
|
completed = waybillService.completeWithoutDeptCheck(waybill.getId());
|
||||||
|
if (completed) {
|
||||||
|
waybillBusinessStatus = STATUS_COMPLETED;
|
||||||
|
}
|
||||||
|
} else if (WaybillProcessSupport.STATUS_RUNNING.equals(waybill.getBusinessStatus())) {
|
||||||
|
// 只有进行中能进入:canAutoCompleteWaybill 的状态口径含待执行/待调度等,不能替代这一条;
|
||||||
|
// 待回单确认在 isPunchEnded 里算已结束,不能从结束态重进。
|
||||||
|
waybill.setBusinessStatus(WaybillProcessSupport.STATUS_PENDING_RETURN_CONFIRM);
|
||||||
|
waybillService.updateById(waybill);
|
||||||
|
waybillBusinessStatus = WaybillProcessSupport.STATUS_PENDING_RETURN_CONFIRM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DriverNodePunchVO vo = toNodePunchVO(punch);
|
DriverNodePunchVO vo = toNodePunchVO(punch);
|
||||||
vo.setWaybillCompleted(completed);
|
vo.setWaybillCompleted(completed);
|
||||||
|
vo.setWaybillBusinessStatus(waybillBusinessStatus);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user