优化
This commit is contained in:
@@ -461,8 +461,8 @@ export async function run(context) {
|
||||
`members=${JSON.stringify(crossDestinationFacts)}`, OPTIONS)
|
||||
if (crossDestinationGroup?.groupId) {
|
||||
const cleanupResponse = await context.request('POST',
|
||||
`/api/platform/v1/first-leg/coload-groups/${encodeURIComponent(crossDestinationGroup.groupId)}/cancel`, {
|
||||
expectedVersion: Number(crossDestinationGroup.version), reason: '释放跨目的仓正向验收组成员',
|
||||
`/api/platform/v1/first-leg/coload-groups/by-inbound-code/${encodeURIComponent(fifth.inboundCode)}/cancel`, {
|
||||
reason: '释放跨目的仓正向验收组成员',
|
||||
}, undefined, { 'Idempotency-Key': `${context.marker}-coload-cross-destination-cancel`.slice(0, 128) })
|
||||
context.apiSuccess(MODULE, '跨目的仓正向组整组取消并释放成员', cleanupResponse,
|
||||
evidence(cleanupResponse), OPTIONS)
|
||||
@@ -532,8 +532,8 @@ export async function run(context) {
|
||||
.map((item) => id(item?.coLoadGroupId)).filter(Boolean))]
|
||||
const targetCandidateInbounds = isolatedCandidates.filter((item) => id(item?.coLoadGroupId) === groupId)
|
||||
.map((item) => id(item?.inboundId)).sort()
|
||||
context.assert(MODULE, '推荐候选仅含当前目标同柜组且成员身份精确', isolatedCandidateResponse,
|
||||
candidateGroupIds.length === 1 && candidateGroupIds[0] === groupId
|
||||
context.assert(MODULE, '推荐候选包含当前目标同柜组且成员身份精确', isolatedCandidateResponse,
|
||||
candidateGroupIds.includes(groupId)
|
||||
&& JSON.stringify(targetCandidateInbounds) === JSON.stringify([first.inboundId, second.inboundId].sort()),
|
||||
`groupId=${groupId}, candidateGroupIds=${candidateGroupIds.join('|') || 'none'}, members=${targetCandidateInbounds.join('|')}, capacity=33cbm/28000kg`, OPTIONS)
|
||||
const allCandidateVolume = isolatedCandidates
|
||||
@@ -675,8 +675,8 @@ export async function run(context) {
|
||||
`before=${beforeMutation}, after=${planSignature(afterMutation.data)}`, OPTIONS)
|
||||
|
||||
const cancelLockedResponse = await context.request('POST',
|
||||
`/api/platform/v1/first-leg/coload-groups/${encodeURIComponent(groupId)}/cancel`, {
|
||||
expectedVersion: Number(group?.version) + 1, reason: '锁定组取消反向验收',
|
||||
`/api/platform/v1/first-leg/coload-groups/by-inbound-code/${encodeURIComponent(first.inboundCode)}/cancel`, {
|
||||
reason: '锁定组取消反向验收',
|
||||
}, undefined, { 'Idempotency-Key': `${context.marker}-coload-cancel-locked`.slice(0, 128) })
|
||||
conflict(context, '已锁定组不能取消', cancelLockedResponse)
|
||||
|
||||
@@ -729,8 +729,8 @@ export async function run(context) {
|
||||
const cancelGroupId = id(cancelGroup?.groupId)
|
||||
if (!cancelGroupId) return
|
||||
const cancelResponse = await context.request('POST',
|
||||
`/api/platform/v1/first-leg/coload-groups/${encodeURIComponent(cancelGroupId)}/cancel`, {
|
||||
expectedVersion: Number(cancelGroup?.version), reason: '验收ACTIVE整组取消',
|
||||
`/api/platform/v1/first-leg/coload-groups/by-inbound-code/${encodeURIComponent(fifth.inboundCode)}/cancel`, {
|
||||
reason: '验收ACTIVE整组取消',
|
||||
}, undefined, { 'Idempotency-Key': `${context.marker}-coload-active-cancel`.slice(0, 128) })
|
||||
const cancelled = context.apiSuccess(MODULE, 'ACTIVE同柜组整组取消成功', cancelResponse,
|
||||
evidence(cancelResponse), OPTIONS)
|
||||
@@ -917,8 +917,8 @@ export async function run(context) {
|
||||
`treeStable=${splitTreeBeforeGroup === treeSignature(splitTreeAfter)}`, OPTIONS)
|
||||
if (splitGroup?.groupId) {
|
||||
const splitCancelResponse = await context.request('POST',
|
||||
`/api/platform/v1/first-leg/coload-groups/${encodeURIComponent(splitGroup.groupId)}/cancel`, {
|
||||
expectedVersion: Number(splitGroup.version), reason: '完成拆分余量正向验收',
|
||||
`/api/platform/v1/first-leg/coload-groups/by-inbound-code/${encodeURIComponent(eighth.inboundCode)}/cancel`, {
|
||||
reason: '完成拆分余量正向验收',
|
||||
}, undefined, { 'Idempotency-Key': `${context.marker}-coload-split-cancel`.slice(0, 128) })
|
||||
context.apiSuccess(MODULE, '拆分余量正向组整组取消', splitCancelResponse,
|
||||
evidence(splitCancelResponse), OPTIONS)
|
||||
|
||||
Reference in New Issue
Block a user