QUERY PLAN
Aggregate (cost=2062.14..2062.15 rows=1 width=8)
-> Sort (cost=2058.90..2059.44 rows=216 width=301)
Sort Key: (CASE WHEN ((sub.verify_status = 0) OR (sub.stop_verify_status = 0) OR (sub.cancel_verify_status = 0)) THEN 1 ELSE 2 END), sub.created_at DESC
-> Result (cost=23.64..2050.53 rows=216 width=301)
-> Append (cost=23.64..2046.75 rows=216 width=20)
-> Subquery Scan on sub (cost=23.64..23.71 rows=2 width=20)
-> Group (cost=23.64..23.69 rows=2 width=305)
Group Key: r.id, rvr.status, rsvr.status
-> Sort (cost=23.64..23.65 rows=2 width=30)
Sort Key: r.id, rvr.status, rsvr.status
-> Hash Left Join (cost=13.37..23.63 rows=2 width=30)
Hash Cond: (r.id = rsvr.erp_purchase_inbound_id)
Filter: ((CASE WHEN (1 = r.verify_type) THEN rvr.status ELSE CASE WHEN (r.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr.status = 0) THEN NULL::integer ELSE rvr.status END END END = 0) OR (CASE WHEN (1 = r.verify_type) THEN rsvr.status ELSE CASE WHEN (r.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr.status = 0) THEN NULL::integer ELSE rsvr.status END END END = 0))
-> Hash Left Join (cost=12.32..21.77 rows=209 width=26)
Hash Cond: (r.id = rvr.erp_purchase_inbound_id)
-> Seq Scan on tbl_erp_purchase_inbounds r (cost=0.00..8.65 rows=209 width=22)
Filter: (status <> 0)
-> Hash (cost=12.31..12.31 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_inbound_verify_rels rvr (cost=0.00..12.31 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_inbound_stop_verify_rels rsvr (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 2" (cost=137.88..139.36 rows=33 width=20)
-> Group (cost=137.88..139.03 rows=33 width=309)
Group Key: r_1.id, rvr_1.status, rsvr_1.status, rcvr.status
-> Sort (cost=137.88..137.96 rows=33 width=38)
Sort Key: r_1.id, rvr_1.status, rsvr_1.status, rcvr.status
-> Hash Left Join (cost=7.43..137.05 rows=33 width=38)
Hash Cond: (r_1.id = rcvr.erp_purchase_order_id)
Filter: ((CASE WHEN (1 = r_1.verify_type) THEN rvr_1.status ELSE CASE WHEN (r_1.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_1.status = 0) THEN NULL::integer ELSE rvr_1.status END END END = 0) OR (CASE WHEN (1 = r_1.verify_type) THEN rsvr_1.status ELSE CASE WHEN (r_1.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_1.status = 0) THEN NULL::integer ELSE rsvr_1.status END END END = 0) OR (CASE WHEN (1 = r_1.verify_type) THEN rcvr.status ELSE CASE WHEN (r_1.next_cancel_verify_user = 1000) THEN 0 ELSE CASE WHEN (rcvr.status = 0) THEN NULL::integer ELSE rcvr.status END END END = 0))
-> Hash Left Join (cost=6.38..127.66 rows=2212 width=34)
Hash Cond: (r_1.id = rsvr_1.erp_purchase_order_id)
-> Hash Left Join (cost=5.14..118.12 rows=2212 width=30)
Hash Cond: (r_1.id = rvr_1.erp_purchase_order_id)
-> Seq Scan on tbl_erp_purchase_orders r_1 (cost=0.00..104.67 rows=2212 width=26)
Filter: (status <> 0)
-> Hash (cost=5.12..5.12 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_order_verify_rels rvr_1 (cost=0.00..5.12 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.23..1.23 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_order_stop_verify_rels rsvr_1 (cost=0.00..1.23 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_order_cancel_verify_rels rcvr (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 3" (cost=24.36..24.40 rows=1 width=20)
-> Group (cost=24.36..24.39 rows=1 width=305)
Group Key: r_2.id, rvr_2.status, rsvr_2.status
-> Sort (cost=24.36..24.37 rows=1 width=30)
Sort Key: r_2.id, rvr_2.status, rsvr_2.status
-> Nested Loop Left Join (cost=0.00..24.35 rows=1 width=30)
Join Filter: (rsvr_2.erp_purchase_return_id = r_2.id)
Filter: ((CASE WHEN (1 = r_2.verify_type) THEN rvr_2.status ELSE CASE WHEN (r_2.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_2.status = 0) THEN NULL::integer ELSE rvr_2.status END END END = 0) OR (CASE WHEN (1 = r_2.verify_type) THEN rsvr_2.status ELSE CASE WHEN (r_2.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_2.status = 0) THEN NULL::integer ELSE rsvr_2.status END END END = 0))
-> Nested Loop Left Join (cost=0.00..2.06 rows=1 width=26)
Join Filter: (rvr_2.erp_purchase_return_id = r_2.id)
-> Seq Scan on tbl_erp_purchase_returns r_2 (cost=0.00..1.01 rows=1 width=22)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_purchase_return_verify_rels rvr_2 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1000)
-> Seq Scan on tbl_erp_purchase_return_stop_verify_rels rsvr_2 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 4" (cost=24.52..24.55 rows=1 width=20)
-> Group (cost=24.52..24.54 rows=1 width=305)
Group Key: r_3.id, rvr_3.status, rsvr_3.status
-> Sort (cost=24.52..24.52 rows=1 width=30)
Sort Key: r_3.id, rvr_3.status, rsvr_3.status
-> Nested Loop Left Join (cost=0.00..24.51 rows=1 width=30)
Join Filter: (rvr_3.erp_inventory_lost_id = r_3.id)
Filter: ((CASE WHEN (1 = r_3.verify_type) THEN rvr_3.status ELSE CASE WHEN (r_3.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_3.status = 0) THEN NULL::integer ELSE rvr_3.status END END END = 0) OR (CASE WHEN (1 = r_3.verify_type) THEN rsvr_3.status ELSE CASE WHEN (r_3.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_3.status = 0) THEN NULL::integer ELSE rsvr_3.status END END END = 0))
-> Nested Loop Left Join (cost=0.00..23.32 rows=3 width=26)
Join Filter: (rsvr_3.erp_inventory_lost_id = r_3.id)
-> Seq Scan on tbl_erp_inventory_losts r_3 (cost=0.00..1.04 rows=2 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..22.15 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_lost_stop_verify_rels rsvr_3 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Materialize (cost=0.00..1.08 rows=1 width=8)
-> Seq Scan on tbl_erp_inventory_lost_verify_rels rvr_3 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 5" (cost=45.58..45.62 rows=1 width=20)
-> Group (cost=45.58..45.61 rows=1 width=305)
Group Key: r_4.id, rvr_4.status, rsvr_4.status
-> Sort (cost=45.58..45.58 rows=1 width=30)
Sort Key: r_4.id, rvr_4.status, rsvr_4.status
-> Hash Left Join (cost=23.38..45.57 rows=1 width=30)
Hash Cond: (r_4.id = rsvr_4.erp_inventory_overflow_id)
Filter: ((CASE WHEN (1 = r_4.verify_type) THEN rvr_4.status ELSE CASE WHEN (r_4.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_4.status = 0) THEN NULL::integer ELSE rvr_4.status END END END = 0) OR (CASE WHEN (1 = r_4.verify_type) THEN rsvr_4.status ELSE CASE WHEN (r_4.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_4.status = 0) THEN NULL::integer ELSE rsvr_4.status END END END = 0))
-> Hash Right Join (cost=1.19..23.33 rows=7 width=26)
Hash Cond: (rvr_4.erp_inventory_overflow_id = r_4.id)
-> Seq Scan on tbl_erp_inventory_overflow_verify_rels rvr_4 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.10..1.10 rows=7 width=22)
-> Seq Scan on tbl_erp_inventory_overflows r_4 (cost=0.00..1.10 rows=7 width=22)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_overflow_stop_verify_rels rsvr_4 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 6" (cost=24.35..24.38 rows=1 width=20)
-> Group (cost=24.35..24.37 rows=1 width=305)
Group Key: r_5.id, rvr_5.status, rsvr_5.status
-> Sort (cost=24.35..24.35 rows=1 width=30)
Sort Key: r_5.id, rvr_5.status, rsvr_5.status
-> Nested Loop Left Join (cost=0.00..24.34 rows=1 width=30)
Join Filter: (rvr_5.erp_inventory_build_id = r_5.id)
Filter: ((CASE WHEN (1 = r_5.verify_type) THEN rvr_5.status ELSE CASE WHEN (r_5.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_5.status = 0) THEN NULL::integer ELSE rvr_5.status END END END = 0) OR (CASE WHEN (1 = r_5.verify_type) THEN rsvr_5.status ELSE CASE WHEN (r_5.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_5.status = 0) THEN NULL::integer ELSE rsvr_5.status END END END = 0))
-> Nested Loop Left Join (cost=0.00..23.21 rows=2 width=26)
Join Filter: (rsvr_5.erp_inventory_build_id = r_5.id)
-> Seq Scan on tbl_erp_inventory_builds r_5 (cost=0.00..1.02 rows=1 width=22)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_inventory_build_stop_verify_rels rsvr_5 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Materialize (cost=0.00..1.05 rows=1 width=8)
-> Seq Scan on tbl_erp_inventory_build_verify_rels rvr_5 (cost=0.00..1.05 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 7" (cost=58.14..58.21 rows=2 width=20)
-> Group (cost=58.14..58.19 rows=2 width=305)
Group Key: r_6.id, rvr_6.status, rsvr_6.status
-> Sort (cost=58.14..58.14 rows=2 width=30)
Sort Key: r_6.id, rvr_6.status, rsvr_6.status
-> Hash Left Join (cost=44.38..58.13 rows=2 width=30)
Hash Cond: (r_6.id = rsvr_6.erp_inventory_disassemble_id)
Filter: ((CASE WHEN (1 = r_6.verify_type) THEN rvr_6.status ELSE CASE WHEN (r_6.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_6.status = 0) THEN NULL::integer ELSE rvr_6.status END END END = 0) OR (CASE WHEN (1 = r_6.verify_type) THEN rsvr_6.status ELSE CASE WHEN (r_6.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_6.status = 0) THEN NULL::integer ELSE rsvr_6.status END END END = 0))
-> Hash Left Join (cost=22.19..35.15 rows=179 width=26)
Hash Cond: (r_6.id = rvr_6.erp_inventory_disassemble_id)
-> Seq Scan on tbl_erp_inventory_disassembles r_6 (cost=0.00..12.25 rows=179 width=22)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_disassemble_verify_rels rvr_6 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_disassemble_stop_verify_rels rsvr_6 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 8" (cost=115.70..116.83 rows=25 width=20)
-> Group (cost=115.70..116.58 rows=25 width=309)
Group Key: r_7.id, rvr_7.status, rsvr_7.status, rcvr_1.status
-> Sort (cost=115.70..115.76 rows=25 width=38)
Sort Key: r_7.id, rvr_7.status, rsvr_7.status, rcvr_1.status
-> Hash Left Join (cost=4.86..115.12 rows=25 width=38)
Hash Cond: (r_7.id = rcvr_1.erp_sales_order_id)
Filter: ((CASE WHEN (1 = r_7.verify_type) THEN rvr_7.status ELSE CASE WHEN (r_7.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_7.status = 0) THEN NULL::integer ELSE rvr_7.status END END END = 0) OR (CASE WHEN (1 = r_7.verify_type) THEN rsvr_7.status ELSE CASE WHEN (r_7.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_7.status = 0) THEN NULL::integer ELSE rsvr_7.status END END END = 0) OR (CASE WHEN (1 = r_7.verify_type) THEN rcvr_1.status ELSE CASE WHEN (r_7.next_cancel_verify_user = 1000) THEN 0 ELSE CASE WHEN (rcvr_1.status = 0) THEN NULL::integer ELSE rcvr_1.status END END END = 0))
-> Hash Left Join (cost=3.84..107.72 rows=1691 width=34)
Hash Cond: (r_7.id = rsvr_7.erp_sales_order_id)
-> Hash Left Join (cost=2.59..100.11 rows=1691 width=30)
Hash Cond: (r_7.id = rvr_7.erp_sales_order_id)
-> Seq Scan on tbl_erp_sales_orders r_7 (cost=0.00..91.17 rows=1691 width=26)
Filter: (status <> 0)
-> Hash (cost=2.58..2.58 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_order_verify_rels rvr_7 (cost=0.00..2.58 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.24..1.24 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_order_stop_verify_rels rsvr_7 (cost=0.00..1.24 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_order_cancel_verify_rels rcvr_1 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 9" (cost=20.51..20.58 rows=2 width=20)
-> Group (cost=20.51..20.56 rows=2 width=305)
Group Key: r_8.id, rvr_8.status, rsvr_8.status
-> Sort (cost=20.51..20.51 rows=2 width=30)
Sort Key: r_8.id, rvr_8.status, rsvr_8.status
-> Hash Left Join (cost=10.42..20.50 rows=2 width=30)
Hash Cond: (r_8.id = rsvr_8.erp_sales_outbound_id)
Filter: ((CASE WHEN (1 = r_8.verify_type) THEN rvr_8.status ELSE CASE WHEN (r_8.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_8.status = 0) THEN NULL::integer ELSE rvr_8.status END END END = 0) OR (CASE WHEN (1 = r_8.verify_type) THEN rsvr_8.status ELSE CASE WHEN (r_8.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_8.status = 0) THEN NULL::integer ELSE rsvr_8.status END END END = 0))
-> Hash Left Join (cost=9.34..18.81 rows=151 width=26)
Hash Cond: (r_8.id = rvr_8.erp_sales_outbound_id)
-> Seq Scan on tbl_erp_sales_outbounds r_8 (cost=0.00..8.90 rows=151 width=22)
Filter: (status <> 0)
-> Hash (cost=9.32..9.32 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_outbound_verify_rels rvr_8 (cost=0.00..9.32 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_outbound_stop_verify_rels rsvr_8 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 10" (cost=24.36..24.40 rows=1 width=20)
-> Group (cost=24.36..24.39 rows=1 width=305)
Group Key: r_9.id, rvr_9.status, rsvr_9.status
-> Sort (cost=24.36..24.37 rows=1 width=30)
Sort Key: r_9.id, rvr_9.status, rsvr_9.status
-> Nested Loop Left Join (cost=0.00..24.35 rows=1 width=30)
Join Filter: (rsvr_9.erp_sales_return_id = r_9.id)
Filter: ((CASE WHEN (1 = r_9.verify_type) THEN rvr_9.status ELSE CASE WHEN (r_9.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_9.status = 0) THEN NULL::integer ELSE rvr_9.status END END END = 0) OR (CASE WHEN (1 = r_9.verify_type) THEN rsvr_9.status ELSE CASE WHEN (r_9.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_9.status = 0) THEN NULL::integer ELSE rsvr_9.status END END END = 0))
-> Nested Loop Left Join (cost=0.00..2.06 rows=1 width=26)
Join Filter: (rvr_9.erp_sales_return_id = r_9.id)
-> Seq Scan on tbl_erp_sales_returns r_9 (cost=0.00..1.01 rows=1 width=22)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_sales_return_verify_rels rvr_9 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1000)
-> Seq Scan on tbl_erp_sales_return_stop_verify_rels rsvr_9 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 11" (cost=4.00..4.04 rows=1 width=20)
-> Group (cost=4.00..4.03 rows=1 width=305)
Group Key: r_10.id, rvr_10.status, rsvr_10.status
-> Sort (cost=4.00..4.00 rows=1 width=30)
Sort Key: r_10.id, rvr_10.status, rsvr_10.status
-> Hash Left Join (cost=2.55..3.99 rows=1 width=30)
Hash Cond: (r_10.id = rsvr_10.erp_purchase_gift_id)
Filter: ((CASE WHEN (1 = r_10.verify_type) THEN rvr_10.status ELSE CASE WHEN (r_10.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_10.status = 0) THEN NULL::integer ELSE rvr_10.status END END END = 0) OR (CASE WHEN (1 = r_10.verify_type) THEN rsvr_10.status ELSE CASE WHEN (r_10.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_10.status = 0) THEN NULL::integer ELSE rsvr_10.status END END END = 0))
-> Hash Left Join (cost=1.46..2.80 rows=20 width=26)
Hash Cond: (r_10.id = rvr_10.erp_purchase_gift_id)
-> Seq Scan on tbl_erp_purchase_gifts r_10 (cost=0.00..1.25 rows=20 width=22)
Filter: (status <> 0)
-> Hash (cost=1.45..1.45 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_gift_verify_rels rvr_10 (cost=0.00..1.45 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_gift_stop_verify_rels rsvr_10 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 12" (cost=17.10..17.14 rows=1 width=20)
-> Group (cost=17.10..17.13 rows=1 width=305)
Group Key: r_11.id, rvr_11.status, rsvr_11.status
-> Sort (cost=17.10..17.11 rows=1 width=30)
Sort Key: r_11.id, rvr_11.status, rsvr_11.status
-> Hash Left Join (cost=8.60..17.09 rows=1 width=30)
Hash Cond: (r_11.id = rsvr_11.erp_sales_gift_id)
Filter: ((CASE WHEN (1 = r_11.verify_type) THEN rvr_11.status ELSE CASE WHEN (r_11.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_11.status = 0) THEN NULL::integer ELSE rvr_11.status END END END = 0) OR (CASE WHEN (1 = r_11.verify_type) THEN rsvr_11.status ELSE CASE WHEN (r_11.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_11.status = 0) THEN NULL::integer ELSE rsvr_11.status END END END = 0))
-> Hash Left Join (cost=7.55..15.55 rows=122 width=26)
Hash Cond: (r_11.id = rvr_11.erp_sales_gift_id)
-> Seq Scan on tbl_erp_sales_gifts r_11 (cost=0.00..7.54 rows=122 width=22)
Filter: (status <> 0)
-> Hash (cost=7.54..7.54 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_gift_verify_rels rvr_11 (cost=0.00..7.54 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_gift_stop_verify_rels rsvr_11 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 13" (cost=117.89..118.66 rows=22 width=20)
-> Group (cost=117.89..118.44 rows=22 width=305)
Group Key: r_12.id, rvr_12.status, rsvr_12.status
-> Sort (cost=117.89..117.95 rows=22 width=30)
Sort Key: r_12.id, rvr_12.status, rsvr_12.status
-> Hash Left Join (cost=5.51..117.40 rows=22 width=30)
Hash Cond: (r_12.id = rsvr_12.erp_collect_ticket_id)
Filter: ((CASE WHEN (1 = r_12.verify_type) THEN rvr_12.status ELSE CASE WHEN (r_12.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_12.status = 0) THEN NULL::integer ELSE rvr_12.status END END END = 0) OR (CASE WHEN (1 = r_12.verify_type) THEN rsvr_12.status ELSE CASE WHEN (r_12.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_12.status = 0) THEN NULL::integer ELSE rsvr_12.status END END END = 0))
-> Hash Left Join (cost=4.42..108.07 rows=2190 width=26)
Hash Cond: (r_12.id = rvr_12.erp_collect_ticket_id)
-> Seq Scan on tbl_erp_collect_tickets r_12 (cost=0.00..95.42 rows=2190 width=22)
Filter: (status <> 0)
-> Hash (cost=4.41..4.41 rows=1 width=8)
-> Seq Scan on tbl_erp_collect_ticket_verify_rels rvr_12 (cost=0.00..4.41 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_collect_ticket_stop_verify_rels rsvr_12 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 14" (cost=127.96..128.77 rows=23 width=20)
-> Group (cost=127.96..128.54 rows=23 width=305)
Group Key: r_13.id, rvr_13.status, rsvr_13.status
-> Sort (cost=127.96..128.02 rows=23 width=30)
Sort Key: r_13.id, rvr_13.status, rsvr_13.status
-> Hash Left Join (cost=6.41..127.44 rows=23 width=30)
Hash Cond: (r_13.id = rsvr_13.erp_payment_ticket_id)
Filter: ((CASE WHEN (1 = r_13.verify_type) THEN rvr_13.status ELSE CASE WHEN (r_13.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_13.status = 0) THEN NULL::integer ELSE rvr_13.status END END END = 0) OR (CASE WHEN (1 = r_13.verify_type) THEN rsvr_13.status ELSE CASE WHEN (r_13.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_13.status = 0) THEN NULL::integer ELSE rsvr_13.status END END END = 0))
-> Hash Left Join (cost=5.29..117.49 rows=2347 width=26)
Hash Cond: (r_13.id = rvr_13.erp_payment_ticket_id)
-> Seq Scan on tbl_erp_payment_tickets r_13 (cost=0.00..103.39 rows=2347 width=22)
Filter: (status <> 0)
-> Hash (cost=5.28..5.28 rows=1 width=8)
-> Seq Scan on tbl_erp_payment_ticket_verify_rels rvr_13 (cost=0.00..5.28 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.11..1.11 rows=1 width=8)
-> Seq Scan on tbl_erp_payment_ticket_stop_verify_rels rsvr_13 (cost=0.00..1.11 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 15" (cost=7.35..7.39 rows=1 width=20)
-> Group (cost=7.35..7.38 rows=1 width=305)
Group Key: r_14.id, rvr_14.status, rsvr_14.status
-> Sort (cost=7.35..7.36 rows=1 width=30)
Sort Key: r_14.id, rvr_14.status, rsvr_14.status
-> Hash Left Join (cost=2.69..7.34 rows=1 width=30)
Hash Cond: (r_14.id = rsvr_14.erp_cost_ticket_id)
Filter: ((CASE WHEN (1 = r_14.verify_type) THEN rvr_14.status ELSE CASE WHEN (r_14.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_14.status = 0) THEN NULL::integer ELSE rvr_14.status END END END = 0) OR (CASE WHEN (1 = r_14.verify_type) THEN rsvr_14.status ELSE CASE WHEN (r_14.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_14.status = 0) THEN NULL::integer ELSE rsvr_14.status END END END = 0))
-> Hash Left Join (cost=1.66..5.99 rows=79 width=26)
Hash Cond: (r_14.id = rvr_14.erp_cost_ticket_id)
-> Seq Scan on tbl_erp_cost_tickets r_14 (cost=0.00..4.03 rows=79 width=22)
Filter: (status <> 0)
-> Hash (cost=1.65..1.65 rows=1 width=8)
-> Seq Scan on tbl_erp_cost_ticket_verify_rels rvr_14 (cost=0.00..1.65 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_cost_ticket_stop_verify_rels rsvr_14 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 16" (cost=26.51..26.54 rows=1 width=20)
-> Group (cost=26.51..26.53 rows=1 width=305)
Group Key: r_15.id, rvr_15.status, rsvr_15.status
-> Sort (cost=26.51..26.51 rows=1 width=30)
Sort Key: r_15.id, rvr_15.status, rsvr_15.status
-> Hash Left Join (cost=23.66..26.50 rows=1 width=30)
Hash Cond: (r_15.id = rsvr_15.erp_other_income_ticket_id)
Filter: ((CASE WHEN (1 = r_15.verify_type) THEN rvr_15.status ELSE CASE WHEN (r_15.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_15.status = 0) THEN NULL::integer ELSE rvr_15.status END END END = 0) OR (CASE WHEN (1 = r_15.verify_type) THEN rsvr_15.status ELSE CASE WHEN (r_15.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_15.status = 0) THEN NULL::integer ELSE rsvr_15.status END END END = 0))
-> Hash Left Join (cost=1.47..4.13 rows=39 width=26)
Hash Cond: (r_15.id = rvr_15.erp_other_income_ticket_id)
-> Seq Scan on tbl_erp_other_income_tickets r_15 (cost=0.00..2.50 rows=39 width=22)
Filter: (status <> 0)
-> Hash (cost=1.46..1.46 rows=1 width=8)
-> Seq Scan on tbl_erp_other_income_ticket_verify_rels rvr_15 (cost=0.00..1.46 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_other_income_ticket_stop_verify_rels rsvr_15 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 17" (cost=24.83..24.87 rows=1 width=20)
-> Group (cost=24.83..24.86 rows=1 width=305)
Group Key: r_16.id, rvr_16.status, rsvr_16.status
-> Sort (cost=24.83..24.83 rows=1 width=30)
Sort Key: r_16.id, rvr_16.status, rsvr_16.status
-> Nested Loop Left Join (cost=1.24..24.82 rows=1 width=30)
Join Filter: (rvr_16.erp_cost_convert_ticket_id = r_16.id)
Filter: ((CASE WHEN (1 = r_16.verify_type) THEN rvr_16.status ELSE CASE WHEN (r_16.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_16.status = 0) THEN NULL::integer ELSE rvr_16.status END END END = 0) OR (CASE WHEN (1 = r_16.verify_type) THEN rsvr_16.status ELSE CASE WHEN (r_16.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_16.status = 0) THEN NULL::integer ELSE rsvr_16.status END END END = 0))
-> Hash Right Join (cost=1.24..23.38 rows=9 width=26)
Hash Cond: (rsvr_16.erp_cost_convert_ticket_id = r_16.id)
-> Seq Scan on tbl_erp_cost_convert_ticket_stop_verify_rels rsvr_16 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.12..1.12 rows=9 width=22)
-> Seq Scan on tbl_erp_cost_convert_tickets r_16 (cost=0.00..1.12 rows=9 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.13 rows=1 width=8)
-> Seq Scan on tbl_erp_cost_convert_ticket_verify_rels rvr_16 (cost=0.00..1.12 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 18" (cost=4.08..4.12 rows=1 width=20)
-> Group (cost=4.08..4.11 rows=1 width=305)
Group Key: r_17.id, rvr_17.status, rsvr_17.status
-> Sort (cost=4.08..4.09 rows=1 width=30)
Sort Key: r_17.id, rvr_17.status, rsvr_17.status
-> Hash Left Join (cost=2.60..4.07 rows=1 width=30)
Hash Cond: (r_17.id = rsvr_17.erp_bank_transfer_ticket_id)
Filter: ((CASE WHEN (1 = r_17.verify_type) THEN rvr_17.status ELSE CASE WHEN (r_17.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_17.status = 0) THEN NULL::integer ELSE rvr_17.status END END END = 0) OR (CASE WHEN (1 = r_17.verify_type) THEN rsvr_17.status ELSE CASE WHEN (r_17.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_17.status = 0) THEN NULL::integer ELSE rsvr_17.status END END END = 0))
-> Hash Left Join (cost=1.56..2.93 rows=21 width=26)
Hash Cond: (r_17.id = rvr_17.erp_bank_transfer_ticket_id)
-> Seq Scan on tbl_erp_bank_transfer_tickets r_17 (cost=0.00..1.27 rows=21 width=22)
Filter: (status <> 0)
-> Hash (cost=1.55..1.55 rows=1 width=8)
-> Seq Scan on tbl_erp_bank_transfer_ticket_verify_rels rvr_17 (cost=0.00..1.55 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.02..1.02 rows=1 width=8)
-> Seq Scan on tbl_erp_bank_transfer_ticket_stop_verify_rels rsvr_17 (cost=0.00..1.02 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 19" (cost=929.52..932.46 rows=84 width=20)
-> Group (cost=929.52..931.62 rows=84 width=305)
Group Key: r_18.id, rvr_18.status, rsvr_18.status
-> Sort (cost=929.52..929.73 rows=84 width=30)
Sort Key: r_18.id, rvr_18.status, rsvr_18.status
-> Hash Left Join (cost=386.35..926.83 rows=84 width=30)
Hash Cond: (r_18.id = rsvr_18.erp_cash_cost_ticket_id)
Filter: ((CASE WHEN (1 = r_18.verify_type) THEN rvr_18.status ELSE CASE WHEN (r_18.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_18.status = 0) THEN NULL::integer ELSE rvr_18.status END END END = 0) OR (CASE WHEN (1 = r_18.verify_type) THEN rsvr_18.status ELSE CASE WHEN (r_18.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_18.status = 0) THEN NULL::integer ELSE rsvr_18.status END END END = 0))
-> Hash Left Join (cost=385.19..893.89 rows=8466 width=26)
Hash Cond: (r_18.id = rvr_18.erp_cash_cost_ticket_id)
-> Seq Scan on tbl_erp_cash_cost_tickets r_18 (cost=0.00..444.86 rows=8466 width=22)
Filter: (status <> 0)
-> Hash (cost=384.75..384.75 rows=35 width=8)
-> Seq Scan on tbl_erp_cash_cost_ticket_verify_rels rvr_18 (cost=0.00..384.75 rows=35 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.15..1.15 rows=1 width=8)
-> Seq Scan on tbl_erp_cash_cost_ticket_stop_verify_rels rsvr_18 (cost=0.00..1.15 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 20" (cost=57.74..57.81 rows=2 width=20)
-> Group (cost=57.74..57.79 rows=2 width=305)
Group Key: r_19.id, rvr_19.status, rsvr_19.status
-> Sort (cost=57.74..57.74 rows=2 width=30)
Sort Key: r_19.id, rvr_19.status, rsvr_19.status
-> Hash Left Join (cost=44.38..57.73 rows=2 width=30)
Hash Cond: (r_19.id = rsvr_19.erp_advance_payment_ticket_id)
Filter: ((CASE WHEN (1 = r_19.verify_type) THEN rvr_19.status ELSE CASE WHEN (r_19.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_19.status = 0) THEN NULL::integer ELSE rvr_19.status END END END = 0) OR (CASE WHEN (1 = r_19.verify_type) THEN rsvr_19.status ELSE CASE WHEN (r_19.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_19.status = 0) THEN NULL::integer ELSE rsvr_19.status END END END = 0))
-> Hash Left Join (cost=22.19..34.82 rows=159 width=26)
Hash Cond: (r_19.id = rvr_19.erp_advance_payment_ticket_id)
-> Seq Scan on tbl_erp_advance_payment_tickets r_19 (cost=0.00..12.00 rows=159 width=22)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_advance_payment_ticket_verify_rels rvr_19 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_advance_payment_ticket_stop_verify_rels rsvr_19 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 21" (cost=27.26..27.30 rows=1 width=20)
-> Group (cost=27.26..27.29 rows=1 width=305)
Group Key: r_20.id, rvr_20.status, rsvr_20.status
-> Sort (cost=27.26..27.27 rows=1 width=30)
Sort Key: r_20.id, rvr_20.status, rsvr_20.status
-> Hash Left Join (cost=23.34..27.25 rows=1 width=30)
Hash Cond: (r_20.id = rsvr_20.erp_other_payment_ticket_id)
Filter: ((CASE WHEN (1 = r_20.verify_type) THEN rvr_20.status ELSE CASE WHEN (r_20.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_20.status = 0) THEN NULL::integer ELSE rvr_20.status END END END = 0) OR (CASE WHEN (1 = r_20.verify_type) THEN rsvr_20.status ELSE CASE WHEN (r_20.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_20.status = 0) THEN NULL::integer ELSE rsvr_20.status END END END = 0))
-> Hash Left Join (cost=1.15..4.87 rows=43 width=26)
Hash Cond: (r_20.id = rvr_20.erp_other_payment_ticket_id)
-> Seq Scan on tbl_erp_other_payment_tickets r_20 (cost=0.00..3.55 rows=43 width=22)
Filter: (status <> 0)
-> Hash (cost=1.14..1.14 rows=1 width=8)
-> Seq Scan on tbl_erp_other_payment_ticket_verify_rels rvr_20 (cost=0.00..1.14 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_other_payment_ticket_stop_verify_rels rsvr_20 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 22" (cost=5.24..5.28 rows=1 width=20)
-> Group (cost=5.24..5.27 rows=1 width=305)
Group Key: r_21.id, rvr_21.status, rsvr_21.status
-> Sort (cost=5.24..5.25 rows=1 width=30)
Sort Key: r_21.id, rvr_21.status, rsvr_21.status
-> Hash Left Join (cost=2.44..5.23 rows=1 width=30)
Hash Cond: (r_21.id = rsvr_21.erp_other_collect_ticket_id)
Filter: ((CASE WHEN (1 = r_21.verify_type) THEN rvr_21.status ELSE CASE WHEN (r_21.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_21.status = 0) THEN NULL::integer ELSE rvr_21.status END END END = 0) OR (CASE WHEN (1 = r_21.verify_type) THEN rsvr_21.status ELSE CASE WHEN (r_21.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_21.status = 0) THEN NULL::integer ELSE rsvr_21.status END END END = 0))
-> Hash Left Join (cost=1.41..4.04 rows=37 width=26)
Hash Cond: (r_21.id = rvr_21.erp_other_collect_ticket_id)
-> Seq Scan on tbl_erp_other_collect_tickets r_21 (cost=0.00..2.48 rows=37 width=22)
Filter: (status <> 0)
-> Hash (cost=1.40..1.40 rows=1 width=8)
-> Seq Scan on tbl_erp_other_collect_ticket_verify_rels rvr_21 (cost=0.00..1.40 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_other_collect_ticket_stop_verify_rels rsvr_21 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 23" (cost=7.29..7.34 rows=1 width=20)
-> Group (cost=7.29..7.33 rows=1 width=309)
Group Key: r_22.id, rvr_22.status, rsvr_22.status, rcvr_2.status
-> Sort (cost=7.29..7.29 rows=1 width=38)
Sort Key: r_22.id, rvr_22.status, rsvr_22.status, rcvr_2.status
-> Hash Left Join (cost=4.14..7.28 rows=1 width=38)
Hash Cond: (r_22.id = rcvr_2.erp_purchase_cost_id)
Filter: ((CASE WHEN (1 = r_22.verify_type) THEN rvr_22.status ELSE CASE WHEN (r_22.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_22.status = 0) THEN NULL::integer ELSE rvr_22.status END END END = 0) OR (CASE WHEN (1 = r_22.verify_type) THEN rsvr_22.status ELSE CASE WHEN (r_22.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_22.status = 0) THEN NULL::integer ELSE rsvr_22.status END END END = 0) OR (CASE WHEN (1 = r_22.verify_type) THEN rcvr_2.status ELSE CASE WHEN (r_22.next_cancel_verify_user = 1000) THEN 0 ELSE CASE WHEN (rcvr_2.status = 0) THEN NULL::integer ELSE rcvr_2.status END END END = 0))
-> Hash Left Join (cost=3.10..6.03 rows=45 width=34)
Hash Cond: (r_22.id = rsvr_22.erp_purchase_cost_id)
-> Hash Left Join (cost=2.01..4.77 rows=45 width=30)
Hash Cond: (r_22.id = rvr_22.erp_purchase_cost_id)
-> Seq Scan on tbl_erp_purchase_costs r_22 (cost=0.00..2.58 rows=45 width=26)
Filter: (status <> 0)
-> Hash (cost=2.00..2.00 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_cost_verify_rels rvr_22 (cost=0.00..2.00 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_cost_stop_verify_rels rsvr_22 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.02..1.02 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_cost_cancel_verify_rels rcvr_2 (cost=0.00..1.02 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 24" (cost=24.68..24.72 rows=1 width=20)
-> Group (cost=24.68..24.71 rows=1 width=305)
Group Key: r_23.id, rvr_23.status, rsvr_23.status
-> Sort (cost=24.68..24.69 rows=1 width=30)
Sort Key: r_23.id, rvr_23.status, rsvr_23.status
-> Nested Loop Left Join (cost=1.19..24.67 rows=1 width=30)
Join Filter: (rvr_23.erp_wage_ticket_id = r_23.id)
Filter: ((CASE WHEN (1 = r_23.verify_type) THEN rvr_23.status ELSE CASE WHEN (r_23.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_23.status = 0) THEN NULL::integer ELSE rvr_23.status END END END = 0) OR (CASE WHEN (1 = r_23.verify_type) THEN rsvr_23.status ELSE CASE WHEN (r_23.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_23.status = 0) THEN NULL::integer ELSE rsvr_23.status END END END = 0))
-> Hash Right Join (cost=1.19..23.33 rows=7 width=26)
Hash Cond: (rsvr_23.erp_wage_ticket_id = r_23.id)
-> Seq Scan on tbl_erp_wage_ticket_stop_verify_rels rsvr_23 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.10..1.10 rows=7 width=22)
-> Seq Scan on tbl_erp_wage_tickets r_23 (cost=0.00..1.10 rows=7 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.10 rows=1 width=8)
-> Seq Scan on tbl_erp_wage_ticket_verify_rels rvr_23 (cost=0.00..1.10 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 25" (cost=24.95..24.99 rows=1 width=20)
-> Group (cost=24.95..24.98 rows=1 width=305)
Group Key: r_24.id, rvr_24.status, rsvr_24.status
-> Sort (cost=24.95..24.96 rows=1 width=30)
Sort Key: r_24.id, rvr_24.status, rsvr_24.status
-> Nested Loop Left Join (cost=1.24..24.94 rows=1 width=30)
Join Filter: (rvr_24.erp_social_insurance_id = r_24.id)
Filter: ((CASE WHEN (1 = r_24.verify_type) THEN rvr_24.status ELSE CASE WHEN (r_24.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_24.status = 0) THEN NULL::integer ELSE rvr_24.status END END END = 0) OR (CASE WHEN (1 = r_24.verify_type) THEN rsvr_24.status ELSE CASE WHEN (r_24.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_24.status = 0) THEN NULL::integer ELSE rsvr_24.status END END END = 0))
-> Hash Right Join (cost=1.24..23.38 rows=9 width=26)
Hash Cond: (rsvr_24.erp_social_insurance_id = r_24.id)
-> Seq Scan on tbl_erp_social_insurance_stop_verify_rels rsvr_24 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.12..1.12 rows=9 width=22)
-> Seq Scan on tbl_erp_social_insurances r_24 (cost=0.00..1.12 rows=9 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.25 rows=1 width=8)
-> Seq Scan on tbl_erp_social_insurance_verify_rels rvr_24 (cost=0.00..1.25 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 26" (cost=24.70..24.74 rows=1 width=20)
-> Group (cost=24.70..24.73 rows=1 width=305)
Group Key: r_25.id, rvr_25.status, rsvr_25.status
-> Sort (cost=24.70..24.70 rows=1 width=30)
Sort Key: r_25.id, rvr_25.status, rsvr_25.status
-> Nested Loop Left Join (cost=1.16..24.69 rows=1 width=30)
Join Filter: (rvr_25.erp_provident_fund_id = r_25.id)
Filter: ((CASE WHEN (1 = r_25.verify_type) THEN rvr_25.status ELSE CASE WHEN (r_25.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_25.status = 0) THEN NULL::integer ELSE rvr_25.status END END END = 0) OR (CASE WHEN (1 = r_25.verify_type) THEN rsvr_25.status ELSE CASE WHEN (r_25.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_25.status = 0) THEN NULL::integer ELSE rsvr_25.status END END END = 0))
-> Hash Right Join (cost=1.16..23.30 rows=6 width=26)
Hash Cond: (rsvr_25.erp_provident_fund_id = r_25.id)
-> Seq Scan on tbl_erp_provident_fund_stop_verify_rels rsvr_25 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.09..1.09 rows=6 width=22)
-> Seq Scan on tbl_erp_provident_funds r_25 (cost=0.00..1.09 rows=6 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.18 rows=1 width=8)
-> Seq Scan on tbl_erp_provident_fund_verify_rels rvr_25 (cost=0.00..1.18 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 27" (cost=24.68..24.72 rows=1 width=20)
-> Group (cost=24.68..24.71 rows=1 width=305)
Group Key: r_26.id, rvr_26.status, rsvr_26.status
-> Sort (cost=24.68..24.69 rows=1 width=30)
Sort Key: r_26.id, rvr_26.status, rsvr_26.status
-> Nested Loop Left Join (cost=1.19..24.67 rows=1 width=30)
Join Filter: (rvr_26.erp_personal_tax_id = r_26.id)
Filter: ((CASE WHEN (1 = r_26.verify_type) THEN rvr_26.status ELSE CASE WHEN (r_26.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_26.status = 0) THEN NULL::integer ELSE rvr_26.status END END END = 0) OR (CASE WHEN (1 = r_26.verify_type) THEN rsvr_26.status ELSE CASE WHEN (r_26.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_26.status = 0) THEN NULL::integer ELSE rsvr_26.status END END END = 0))
-> Hash Right Join (cost=1.19..23.33 rows=7 width=26)
Hash Cond: (rsvr_26.erp_personal_tax_id = r_26.id)
-> Seq Scan on tbl_erp_personal_tax_stop_verify_rels rsvr_26 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.10..1.10 rows=7 width=22)
-> Seq Scan on tbl_erp_personal_taxs r_26 (cost=0.00..1.10 rows=7 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.10 rows=1 width=8)
-> Seq Scan on tbl_erp_personal_tax_verify_rels rvr_26 (cost=0.00..1.10 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 28" (cost=24.53..24.57 rows=1 width=20)
-> Group (cost=24.53..24.56 rows=1 width=305)
Group Key: r_27.id, rvr_27.status, rsvr_27.status
-> Sort (cost=24.53..24.54 rows=1 width=30)
Sort Key: r_27.id, rvr_27.status, rsvr_27.status
-> Hash Left Join (cost=1.06..24.52 rows=1 width=30)
Hash Cond: (r_27.id = rvr_27.erp_wage_prize_id)
Filter: ((CASE WHEN (1 = r_27.verify_type) THEN rvr_27.status ELSE CASE WHEN (r_27.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_27.status = 0) THEN NULL::integer ELSE rvr_27.status END END END = 0) OR (CASE WHEN (1 = r_27.verify_type) THEN rsvr_27.status ELSE CASE WHEN (r_27.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_27.status = 0) THEN NULL::integer ELSE rsvr_27.status END END END = 0))
-> Nested Loop Left Join (cost=0.00..23.41 rows=4 width=26)
Join Filter: (rsvr_27.erp_wage_prize_id = r_27.id)
-> Seq Scan on tbl_erp_wage_prizes r_27 (cost=0.00..1.05 rows=3 width=22)
Filter: (status <> 0)
-> Materialize (cost=0.00..22.15 rows=5 width=8)
-> Seq Scan on tbl_erp_wage_prize_stop_verify_rels rsvr_27 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=1.05..1.05 rows=1 width=8)
-> Seq Scan on tbl_erp_wage_prize_verify_rels rvr_27 (cost=0.00..1.05 rows=1 width=8)
Filter: (user_id = 1000)
-> Subquery Scan on "*SELECT* 29" (cost=59.18..59.27 rows=2 width=20)
-> GroupAggregate (cost=59.18..59.25 rows=2 width=305)
Group Key: r_28.id, rvr_28.status, rsvr_28.status
-> Sort (cost=59.18..59.18 rows=2 width=30)
Sort Key: r_28.id, rvr_28.status, rsvr_28.status
-> Hash Left Join (cost=44.38..59.17 rows=2 width=30)
Hash Cond: (r_28.id = rsvr_28.erp_profit_distribute_id)
Filter: ((CASE WHEN (1 = r_28.verify_type) THEN rvr_28.status ELSE CASE WHEN (r_28.next_verify_user = 1000) THEN 0 ELSE CASE WHEN (rvr_28.status = 0) THEN NULL::integer ELSE rvr_28.status END END END = 0) OR (CASE WHEN (1 = r_28.verify_type) THEN rsvr_28.status ELSE CASE WHEN (r_28.next_stop_verify_user = 1000) THEN 0 ELSE CASE WHEN (rsvr_28.status = 0) THEN NULL::integer ELSE rsvr_28.status END END END = 0))
-> Hash Left Join (cost=22.19..35.97 rows=229 width=26)
Hash Cond: (r_28.id = rvr_28.erp_profit_distribute_id)
-> Seq Scan on tbl_erp_profit_distributes r_28 (cost=0.00..12.88 rows=229 width=26)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_profit_distribute_verify_rels rvr_28 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_profit_distribute_stop_verify_rels rsvr_28 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1000)