feat(shipping-notice): 实现滚动履约功能,优化发货通知流程与代码清理

清理废弃的ShippingCase相关代码与依赖,统一使用ShippingNotice直接关联客户数据。调整库存网关依赖规则,支持仅对库存满足或已人工放行的订单行生成发货Excel,实现滚动履约逻辑。
This commit is contained in:
hugo committed 2026-08-26 02:47:07 +08:00
1 parent 7cfd5d167e
commit 1e5aedb9ed
235 files changed
+11394 -9613

No files matched your search

@@ -30,8 +30,8 @@ def test_unuploaded_resend_voids_old_task_and_keeps_new_active(app):
assert new.lifecycle_status == 'active'
def test_uploaded_resend_requires_cancellation_receipt_before_new_can_continue(app):
"""关键断言:已上传旧版必须先有撤销回执,后继版才恢复活动状态。"""
def test_uploaded_resend_requires_external_cancellation_confirmation_before_new_can_continue(app):
"""关键断言:已上传旧版须登记外部撤销确认;不要求回执号或文件。"""
with app.app_context():
old, new, user = _tasks(uploaded=True)
establish_task_supersession(old_task=old, new_task=new, actor_id=user.id, reason='customer resend')
@@ -39,7 +39,11 @@ def test_uploaded_resend_requires_cancellation_receipt_before_new_can_continue(a
assert new.lifecycle_status == 'blocked'
with pytest.raises(ConflictError):
assert_task_not_supersession_blocked(new)
complete_freight_cancellation(cancellation_id=row.id, actor_id=user.id, freight_receipt_no='CANCEL-1', receipt_asset_id=1)
complete_freight_cancellation(
cancellation_id=row.id,
actor_id=user.id,
note='已在货代平台确认撤销',
)
assert row.status == 'cancelled'
assert old.lifecycle_status == 'voided'
assert new.lifecycle_status == 'active'