fix(worker-platform): 支持寄售筛选叠加接单人员
This commit is contained in:
@@ -1526,12 +1526,9 @@ export function buildWorkOrderWhere({
|
||||
if (acceptanceMode) {
|
||||
const rawMode = String(acceptanceMode).trim()
|
||||
if (rawMode === 'internal_consignment') {
|
||||
filters.push(`(
|
||||
wo.material_json->'consignment'->>'inventoryId' IS NOT NULL
|
||||
AND (wo.material_json->'consignment'->>'fulfillmentType' IS NULL OR wo.material_json->'consignment'->>'fulfillmentType' != 'worker_deposit')
|
||||
AND (wo.material_json->'consignment'->>'workerId' IS NULL OR wo.material_json->'consignment'->>'workerId' = '0')
|
||||
AND (wo.assigned_worker_id IS NULL OR wo.assigned_worker_id = 0)
|
||||
)`)
|
||||
// 「寄售来源」与是否已经匹配打手是两个正交条件。
|
||||
// 这里不能内置“必须未指派”,否则再接 workerId 筛选会恒为空。
|
||||
filters.push(`wo.material_json->'consignment'->>'inventoryId' IS NOT NULL`)
|
||||
} else if (rawMode === WORK_ORDER_ACCEPTANCE_MODE.FRIEND_GIFT) {
|
||||
filters.push(`(
|
||||
wo.acceptance_mode = 'friend_gift'
|
||||
|
||||
Reference in New Issue
Block a user