fix: complete phase4 receiving acceptance chain
This commit is contained in:
@@ -107,8 +107,9 @@ export async function run(context) {
|
||||
const plan = records(plans.data)[0]
|
||||
if (plan) {
|
||||
context.assert(MODULE, '入仓计划关键字段正确', plans.response,
|
||||
longId(plan.id) && longId(plan.sourceOrderId) && nonBlank(plan.planNo) && id(plan.customerId) === customerId && nonBlank(plan.status),
|
||||
`id=${id(plan.id) || 'missing'}, sourceOrderId=${id(plan.sourceOrderId) || 'missing'}, planNo=${plan.planNo || 'missing'}, status=${plan.status || 'missing'}; ${trace(plans.response)}`, OPTIONS)
|
||||
longId(plan.lineId) && longId(plan.planId) && longId(plan.orderId)
|
||||
&& nonBlank(plan.planNo) && id(plan.customerId) === customerId && nonBlank(plan.status),
|
||||
`lineId=${id(plan.lineId) || 'missing'}, planId=${id(plan.planId) || 'missing'}, orderId=${id(plan.orderId) || 'missing'}, planNo=${plan.planNo || 'missing'}, status=${plan.status || 'missing'}; ${trace(plans.response)}`, OPTIONS)
|
||||
const detail = await overseasGet(context, '查询入仓计划详情', query(`/api/platform/v1/last-leg/inbound-plans/${encodeURIComponent(plan.planNo)}`, { customerId }))
|
||||
context.assert(MODULE, '入仓计划详情对应列表记录', detail.response,
|
||||
detail.data?.planNo === plan.planNo && longId(detail.data?.sourceOrderId)
|
||||
|
||||
Reference in New Issue
Block a user