Performance Profiling

Total processing time: 400 ms; Peak memory: 7.780 MB. Show Profiling Timeline

总计15条数据
TimeDurationCategoryInfo
  
14:00:17.01870.3 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT * FROM ((SELECT * FROM (SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20002 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status") "sub") UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20001 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_verify_rels" "rvr" ON rvr.erp_purchase_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20003 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_verify_rels" "rvr" ON rvr.erp_purchase_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20004 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_lost_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20005 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_builds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_verify_rels" "rvr" ON rvr.erp_inventory_build_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_build_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20007 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_sales_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_verify_rels" "rvr" ON rvr.erp_sales_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" "rsvr" ON rsvr.erp_sales_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_cancel_verify_rels" "rcvr" ON rcvr.erp_sales_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20008 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_outbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" "rvr" ON rvr.erp_sales_outbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_stop_verify_rels" "rsvr" ON rsvr.erp_sales_outbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20009 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_verify_rels" "rvr" ON rvr.erp_sales_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_stop_verify_rels" "rsvr" ON rsvr.erp_sales_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20010 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_verify_rels" "rvr" ON rvr.erp_purchase_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20011 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_verify_rels" "rvr" ON rvr.erp_sales_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_stop_verify_rels" "rsvr" ON rsvr.erp_sales_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20013 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_verify_rels" "rvr" ON rvr.erp_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20012 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_verify_rels" "rvr" ON rvr.erp_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20014 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_verify_rels" "rvr" ON rvr.erp_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20015 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_income_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_verify_rels" "rvr" ON rvr.erp_other_income_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_income_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20016 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_convert_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_verify_rels" "rvr" ON rvr.erp_cost_convert_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_convert_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20017 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_bank_transfer_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_verify_rels" "rvr" ON rvr.erp_bank_transfer_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_bank_transfer_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20018 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_verify_rels" "rvr" ON rvr.erp_cash_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cash_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20019 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_verify_rels" "rvr" ON rvr.erp_advance_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_advance_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20020 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_verify_rels" "rvr" ON rvr.erp_other_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20021 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_verify_rels" "rvr" ON rvr.erp_other_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20022 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_costs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_verify_rels" "rvr" ON rvr.erp_purchase_cost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_cost_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_cost_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20023 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_verify_rels" "rvr" ON rvr.erp_wage_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_wage_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20024 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_social_insurances" "r" LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_verify_rels" "rvr" ON rvr.erp_social_insurance_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_stop_verify_rels" "rsvr" ON rsvr.erp_social_insurance_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20025 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_provident_funds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_verify_rels" "rvr" ON rvr.erp_provident_fund_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_stop_verify_rels" "rsvr" ON rsvr.erp_provident_fund_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20026 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_personal_taxs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_verify_rels" "rvr" ON rvr.erp_personal_tax_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_stop_verify_rels" "rsvr" ON rsvr.erp_personal_tax_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20027 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_prizes" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_verify_rels" "rvr" ON rvr.erp_wage_prize_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_stop_verify_rels" "rsvr" ON rsvr.erp_wage_prize_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" )) "sub" WHERE ("verify_status"=0) OR ("stop_verify_status"=0) OR ("cancel_verify_status"=0) ORDER BY case when verify_status = 0 or stop_verify_status = 0 or cancel_verify_status = 0 THEN 1 else 2 end asc, created_at DESC) "c"
14:00:17.18927.3 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT * FROM ((SELECT * FROM (SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20002 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status") "sub") UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20001 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_verify_rels" "rvr" ON rvr.erp_purchase_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20003 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_verify_rels" "rvr" ON rvr.erp_purchase_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20004 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_lost_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20005 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_builds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_verify_rels" "rvr" ON rvr.erp_inventory_build_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_build_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20007 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_sales_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_verify_rels" "rvr" ON rvr.erp_sales_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" "rsvr" ON rsvr.erp_sales_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_cancel_verify_rels" "rcvr" ON rcvr.erp_sales_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20008 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_outbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" "rvr" ON rvr.erp_sales_outbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_stop_verify_rels" "rsvr" ON rsvr.erp_sales_outbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20009 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_verify_rels" "rvr" ON rvr.erp_sales_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_stop_verify_rels" "rsvr" ON rsvr.erp_sales_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20010 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_verify_rels" "rvr" ON rvr.erp_purchase_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20011 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_verify_rels" "rvr" ON rvr.erp_sales_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_stop_verify_rels" "rsvr" ON rsvr.erp_sales_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20013 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_verify_rels" "rvr" ON rvr.erp_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20012 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_verify_rels" "rvr" ON rvr.erp_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20014 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_verify_rels" "rvr" ON rvr.erp_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20015 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_income_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_verify_rels" "rvr" ON rvr.erp_other_income_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_income_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20016 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_convert_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_verify_rels" "rvr" ON rvr.erp_cost_convert_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_convert_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20017 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_bank_transfer_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_verify_rels" "rvr" ON rvr.erp_bank_transfer_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_bank_transfer_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20018 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_verify_rels" "rvr" ON rvr.erp_cash_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cash_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20019 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_verify_rels" "rvr" ON rvr.erp_advance_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_advance_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20020 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_verify_rels" "rvr" ON rvr.erp_other_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20021 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_verify_rels" "rvr" ON rvr.erp_other_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20022 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_costs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_verify_rels" "rvr" ON rvr.erp_purchase_cost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_cost_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_cost_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20023 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_verify_rels" "rvr" ON rvr.erp_wage_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_wage_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20024 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_social_insurances" "r" LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_verify_rels" "rvr" ON rvr.erp_social_insurance_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_stop_verify_rels" "rsvr" ON rsvr.erp_social_insurance_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20025 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_provident_funds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_verify_rels" "rvr" ON rvr.erp_provident_fund_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_stop_verify_rels" "rsvr" ON rsvr.erp_provident_fund_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20026 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_personal_taxs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_verify_rels" "rvr" ON rvr.erp_personal_tax_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_stop_verify_rels" "rsvr" ON rsvr.erp_personal_tax_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20027 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_prizes" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_verify_rels" "rvr" ON rvr.erp_wage_prize_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_stop_verify_rels" "rsvr" ON rsvr.erp_wage_prize_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" )) "sub") "sub" WHERE (("verify_status" != 0) OR (verify_status is null)) AND (("stop_verify_status" != 0) OR (stop_verify_status is null)) AND (("cancel_verify_status" != 0) OR (cancel_verify_status is null))
14:00:17.08926.0 msyii\db\Command::querySELECT * FROM ((SELECT * FROM (SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20002 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status") "sub") UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20001 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_verify_rels" "rvr" ON rvr.erp_purchase_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20003 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_verify_rels" "rvr" ON rvr.erp_purchase_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20004 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_lost_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20005 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_builds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_verify_rels" "rvr" ON rvr.erp_inventory_build_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_build_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20007 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_sales_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_verify_rels" "rvr" ON rvr.erp_sales_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" "rsvr" ON rsvr.erp_sales_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_cancel_verify_rels" "rcvr" ON rcvr.erp_sales_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20008 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_outbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" "rvr" ON rvr.erp_sales_outbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_stop_verify_rels" "rsvr" ON rsvr.erp_sales_outbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20009 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_verify_rels" "rvr" ON rvr.erp_sales_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_stop_verify_rels" "rsvr" ON rsvr.erp_sales_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20010 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_verify_rels" "rvr" ON rvr.erp_purchase_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20011 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_verify_rels" "rvr" ON rvr.erp_sales_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_stop_verify_rels" "rsvr" ON rsvr.erp_sales_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20013 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_verify_rels" "rvr" ON rvr.erp_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20012 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_verify_rels" "rvr" ON rvr.erp_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20014 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_verify_rels" "rvr" ON rvr.erp_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20015 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_income_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_verify_rels" "rvr" ON rvr.erp_other_income_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_income_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20016 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_convert_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_verify_rels" "rvr" ON rvr.erp_cost_convert_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_convert_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20017 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_bank_transfer_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_verify_rels" "rvr" ON rvr.erp_bank_transfer_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_bank_transfer_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20018 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_verify_rels" "rvr" ON rvr.erp_cash_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cash_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20019 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_verify_rels" "rvr" ON rvr.erp_advance_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_advance_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20020 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_verify_rels" "rvr" ON rvr.erp_other_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20021 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_verify_rels" "rvr" ON rvr.erp_other_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20022 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_costs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_verify_rels" "rvr" ON rvr.erp_purchase_cost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_cost_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_cost_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20023 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_verify_rels" "rvr" ON rvr.erp_wage_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_wage_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20024 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_social_insurances" "r" LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_verify_rels" "rvr" ON rvr.erp_social_insurance_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_stop_verify_rels" "rsvr" ON rsvr.erp_social_insurance_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20025 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_provident_funds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_verify_rels" "rvr" ON rvr.erp_provident_fund_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_stop_verify_rels" "rsvr" ON rsvr.erp_provident_fund_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20026 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_personal_taxs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_verify_rels" "rvr" ON rvr.erp_personal_tax_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_stop_verify_rels" "rsvr" ON rsvr.erp_personal_tax_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20027 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_prizes" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_verify_rels" "rvr" ON rvr.erp_wage_prize_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_stop_verify_rels" "rsvr" ON rsvr.erp_wage_prize_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" )) "sub" WHERE ("verify_status"=0) OR ("stop_verify_status"=0) OR ("cancel_verify_status"=0) ORDER BY case when verify_status = 0 or stop_verify_status = 0 or cancel_verify_status = 0 THEN 1 else 2 end asc, created_at DESC LIMIT 40
14:00:17.14023.5 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT * FROM ((SELECT * FROM (SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20002 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status") "sub") UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20001 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_verify_rels" "rvr" ON rvr.erp_purchase_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20003 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_verify_rels" "rvr" ON rvr.erp_purchase_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20004 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_lost_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20005 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_builds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_verify_rels" "rvr" ON rvr.erp_inventory_build_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_build_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20007 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_sales_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_verify_rels" "rvr" ON rvr.erp_sales_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" "rsvr" ON rsvr.erp_sales_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_cancel_verify_rels" "rcvr" ON rcvr.erp_sales_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20008 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_outbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" "rvr" ON rvr.erp_sales_outbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_stop_verify_rels" "rsvr" ON rsvr.erp_sales_outbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20009 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_verify_rels" "rvr" ON rvr.erp_sales_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_stop_verify_rels" "rsvr" ON rsvr.erp_sales_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20010 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_verify_rels" "rvr" ON rvr.erp_purchase_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20011 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_verify_rels" "rvr" ON rvr.erp_sales_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_stop_verify_rels" "rsvr" ON rsvr.erp_sales_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20013 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_verify_rels" "rvr" ON rvr.erp_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20012 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_verify_rels" "rvr" ON rvr.erp_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20014 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_verify_rels" "rvr" ON rvr.erp_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20015 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_income_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_verify_rels" "rvr" ON rvr.erp_other_income_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_income_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20016 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_convert_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_verify_rels" "rvr" ON rvr.erp_cost_convert_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_convert_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20017 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_bank_transfer_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_verify_rels" "rvr" ON rvr.erp_bank_transfer_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_bank_transfer_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20018 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_verify_rels" "rvr" ON rvr.erp_cash_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cash_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20019 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_verify_rels" "rvr" ON rvr.erp_advance_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_advance_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20020 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_verify_rels" "rvr" ON rvr.erp_other_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20021 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_verify_rels" "rvr" ON rvr.erp_other_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20022 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_costs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_verify_rels" "rvr" ON rvr.erp_purchase_cost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_cost_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_cost_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20023 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_verify_rels" "rvr" ON rvr.erp_wage_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_wage_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20024 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_social_insurances" "r" LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_verify_rels" "rvr" ON rvr.erp_social_insurance_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_stop_verify_rels" "rsvr" ON rsvr.erp_social_insurance_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20025 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_provident_funds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_verify_rels" "rvr" ON rvr.erp_provident_fund_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_stop_verify_rels" "rsvr" ON rsvr.erp_provident_fund_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20026 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_personal_taxs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_verify_rels" "rvr" ON rvr.erp_personal_tax_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_stop_verify_rels" "rsvr" ON rsvr.erp_personal_tax_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20027 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_prizes" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_verify_rels" "rvr" ON rvr.erp_wage_prize_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_stop_verify_rels" "rsvr" ON rsvr.erp_wage_prize_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" )) "sub") "sub"
14:00:17.16522.9 msyii\db\Command::querySELECT COUNT(*) FROM (SELECT * FROM ((SELECT * FROM (SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20002 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_inbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_verify_rels" "rvr" ON rvr.erp_purchase_inbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_inbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status") "sub") UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20001 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_verify_rels" "rvr" ON rvr.erp_purchase_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_order_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20003 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_verify_rels" "rvr" ON rvr.erp_purchase_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_return_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20004 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_losts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_verify_rels" "rvr" ON rvr.erp_inventory_lost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_lost_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_lost_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20005 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_inventory_builds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_verify_rels" "rvr" ON rvr.erp_inventory_build_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_inventory_build_stop_verify_rels" "rsvr" ON rsvr.erp_inventory_build_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20007 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_sales_orders" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_verify_rels" "rvr" ON rvr.erp_sales_order_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_stop_verify_rels" "rsvr" ON rsvr.erp_sales_order_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_order_cancel_verify_rels" "rcvr" ON rcvr.erp_sales_order_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20008 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_outbounds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" "rvr" ON rvr.erp_sales_outbound_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_outbound_stop_verify_rels" "rsvr" ON rsvr.erp_sales_outbound_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20009 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_returns" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_verify_rels" "rvr" ON rvr.erp_sales_return_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_return_stop_verify_rels" "rsvr" ON rsvr.erp_sales_return_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20010 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_purchase_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_verify_rels" "rvr" ON rvr.erp_purchase_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gift_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20011 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_sales_gifts" "r" LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_verify_rels" "rvr" ON rvr.erp_sales_gift_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_sales_gift_stop_verify_rels" "rsvr" ON rsvr.erp_sales_gift_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20013 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_verify_rels" "rvr" ON rvr.erp_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20012 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_verify_rels" "rvr" ON rvr.erp_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20014 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_verify_rels" "rvr" ON rvr.erp_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20015 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_income_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_verify_rels" "rvr" ON rvr.erp_other_income_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_income_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20016 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cost_convert_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_verify_rels" "rvr" ON rvr.erp_cost_convert_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cost_convert_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cost_convert_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20017 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_bank_transfer_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_verify_rels" "rvr" ON rvr.erp_bank_transfer_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_bank_transfer_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_bank_transfer_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20018 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_cash_cost_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_verify_rels" "rvr" ON rvr.erp_cash_cost_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_cash_cost_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20019 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_advance_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_verify_rels" "rvr" ON rvr.erp_advance_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_advance_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_advance_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, null::integer as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20020 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_payment_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_verify_rels" "rvr" ON rvr.erp_other_payment_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_payment_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_payment_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id as supplier_id, r.client_id as client_id, r.user_id as user_id, r.contact_id as contact_id, r.wrote_date, r.serial_no, 20021 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_other_collect_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_verify_rels" "rvr" ON rvr.erp_other_collect_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_other_collect_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_other_collect_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, r.supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20022 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, null::numeric as settle_amount, false as is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, CASE WHEN 1 = r.verify_type THEN rcvr.status ELSE ( CASE WHEN r.next_cancel_verify_user = 1001 THEN 0 ELSE (CASE WHEN rcvr.status = 0 THEN NULL ELSE rcvr.status END) END) END as stop_verify_status FROM "a57be577deb434"."tbl_erp_purchase_costs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_verify_rels" "rvr" ON rvr.erp_purchase_cost_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_stop_verify_rels" "rsvr" ON rsvr.erp_purchase_cost_id = r.id AND rsvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_cost_cancel_verify_rels" "rcvr" ON rcvr.erp_purchase_cost_id = r.id AND rcvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001) OR ("rcvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status", "rcvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20023 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_tickets" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_verify_rels" "rvr" ON rvr.erp_wage_ticket_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_ticket_stop_verify_rels" "rsvr" ON rsvr.erp_wage_ticket_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20024 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_social_insurances" "r" LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_verify_rels" "rvr" ON rvr.erp_social_insurance_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_social_insurance_stop_verify_rels" "rsvr" ON rsvr.erp_social_insurance_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20025 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_provident_funds" "r" LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_verify_rels" "rvr" ON rvr.erp_provident_fund_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_provident_fund_stop_verify_rels" "rsvr" ON rsvr.erp_provident_fund_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20026 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_personal_taxs" "r" LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_verify_rels" "rvr" ON rvr.erp_personal_tax_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_personal_tax_stop_verify_rels" "rsvr" ON rsvr.erp_personal_tax_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" ) UNION ALL ( SELECT r.id, null::integer as supplier_id, null::integer as client_id, null::integer as user_id, null::integer as contact_id, r.wrote_date, r.serial_no, 20027 as ticket_type, r.abstract, r.description, r.created_by, r.amount, r.status, r.settle_amount, r.is_payment_settle, r.created_at, CASE WHEN 1 = r.verify_type THEN rvr.status ELSE ( CASE WHEN r.next_verify_user = 1001 THEN 0 ELSE (CASE WHEN rvr.status = 0 THEN NULL ELSE rvr.status END) END) END as verify_status, CASE WHEN 1 = r.verify_type THEN rsvr.status ELSE ( CASE WHEN r.next_stop_verify_user = 1001 THEN 0 ELSE (CASE WHEN rsvr.status = 0 THEN NULL ELSE rsvr.status END) END) END as stop_verify_status, null::integer as cancel_verify_status FROM "a57be577deb434"."tbl_erp_wage_prizes" "r" LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_verify_rels" "rvr" ON rvr.erp_wage_prize_id = r.id AND rvr.user_id = 1001 LEFT JOIN "a57be577deb434"."tbl_erp_wage_prize_stop_verify_rels" "rsvr" ON rsvr.erp_wage_prize_id = r.id AND rsvr.user_id = 1001 WHERE (("rvr"."user_id"=1001) OR ("rsvr"."user_id"=1001)) AND ("r"."status" != 0) GROUP BY "r"."id", "rvr"."status", "rsvr"."status" )) "sub") "sub" WHERE ("verify_status"=0) OR ("stop_verify_status"=0) OR ("cancel_verify_status"=0)
14:00:17.1269.0 msyii\db\Command::querySELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id" IN (431, 438, 90, 704, 95)
14:00:16.8435.7 msyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001
14:00:16.8324.6 msyii\db\Connection::openOpening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta
14:00:16.8373.0 msyii\db\Command::querySELECT * FROM "global"."vw_user_login" WHERE "id"=1001
14:00:17.1372.6 msyii\db\Command::querySELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=3649
14:00:17.2182.0 msyii\db\Command::queryINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/erp-dashboard/list-verify', '{"status":"0","page":"1","pageSize":"40","web_access_token":"0jSj1j1zfu5hwB0xpQULAh1cJmt2onlX"}', '{"code":2000,"result":{"list":[{"id":7373,"supplier_id":"","client_id":982,"user_id":"","contact_id":"","wrote_date":"","serial_no":"XJFYD-20250829-00001","ticket_type":20018,"abstract":"","description":"","created_by":1000,"amount":"123","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-29 10:48:40","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1000,"key":1000,"name":"\u66f9\u6c38\u751f","sex":"M","department_id":10,"avatar":{"id":1,"user_id":1000,"name":"\/files\/cdn\/a57be577deb434\/avatar\/80759bee-0611-3ad4-bb4a-30d802dd0032.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"supplier":{},"client":{"id":982,"key":982,"name":"\u4e2d\u56fd\u4fe1\u606f\u5b89\u5168\u7814\u7a76\u6240"},"user":{},"contact":{},"ticket_type_display":"\u73b0\u91d1\u8d39\u7528\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":982,"key":982,"name":"\u4e2d\u56fd\u4fe1\u606f\u5b89\u5168\u7814\u7a76\u6240"}},{"id":1576,"supplier_id":"","client_id":3382,"user_id":"","contact_id":"","wrote_date":"2025-08-29","serial_no":"XSDD-20250829-00001","ticket_type":20007,"abstract":"","description":"","created_by":5300,"amount":"1000","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-29 10:42:33","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1,"avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"},"department":{"id":1,"key":1,"name":"\u9500\u552e\u90e8"}},"supplier":{},"client":{"id":3382,"key":3382,"name":"\u5927\u5510\u8f6f\u4ef6\u6280\u672f\u80a1\u4efd\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u8ba2\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3382,"key":3382,"name":"\u5927\u5510\u8f6f\u4ef6\u6280\u672f\u80a1\u4efd\u6709\u9650\u516c\u53f8"}},{"id":14,"supplier_id":"","client_id":3349,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00009","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 17:20:48","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3349,"key":3349,"name":"\u4e2d\u822a\u56fd\u9645\u91d1\u7f51\uff08\u5317\u4eac\uff09\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3349,"key":3349,"name":"\u4e2d\u822a\u56fd\u9645\u91d1\u7f51\uff08\u5317\u4eac\uff09\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":7372,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"","serial_no":"XJFYD-20250828-00009","ticket_type":20018,"abstract":"\u521b\u5efa\u4e00\u6761\u663e\u793a2\u6761","description":"","created_by":1001,"amount":"333","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-28 16:33:15","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u73b0\u91d1\u8d39\u7528\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{}},{"id":7371,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"","serial_no":"XJFYD-20250828-00008","ticket_type":20018,"abstract":"","description":"","created_by":1001,"amount":"111","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-28 16:31:46","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u73b0\u91d1\u8d39\u7528\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{}},{"id":7333,"supplier_id":431,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-11","serial_no":"XJFYD-20250811-00001","ticket_type":20018,"abstract":"\u65b9\u5f0f\u5730\u65b9","description":"","created_by":1001,"amount":"111","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-28 16:28:12","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u73b0\u91d1\u8d39\u7528\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"}},{"id":13,"supplier_id":"","client_id":3195,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00008","ticket_type":20011,"abstract":"\u6d4b\u8bd5","description":"\u6d4b\u8bd5","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 14:08:24","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3195,"key":3195,"name":"BeijingUniversityofAeronauticsandAstronautics"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3195,"key":3195,"name":"BeijingUniversityofAeronauticsandAstronautics"}},{"id":12,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00007","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 11:41:44","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":11,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00006","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 11:06:38","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":10,"supplier_id":"","client_id":1188,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00005","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 11:04:13","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":1188,"key":1188,"name":"\u4e2d\u56fd\u7164\u70ad\u5730\u8d28\u603b\u5c40"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":1188,"key":1188,"name":"\u4e2d\u56fd\u7164\u70ad\u5730\u8d28\u603b\u5c40"}},{"id":8,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00003","ticket_type":20011,"abstract":"\u6d4b\u8bd5\u6210\u672c\u51fa\u5e93\u95ee\u9898","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 10:46:43","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":7,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00002","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 09:29:10","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":6,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-28","serial_no":"ZSD-20250828-00001","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-28 09:18:05","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":3,"supplier_id":"","client_id":15,"user_id":"","contact_id":"","wrote_date":"2025-08-27","serial_no":"XSCKD-20250827-00001","ticket_type":20009,"abstract":"","description":"\u4e09\u53f0\u8054\u60f3SR650\u670d\u52a1\u5668+\u4e00\u5957FAS2750\u5b58\u50a8\uff0c\u505a\u6210\u865a\u62df\u5316\u73af\u5883\uff0c\u505a\u6d4b\u8bd5\u4f7f\u7528\u3002","created_by":1001,"amount":"801474","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-27 17:53:57","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":15,"key":15,"name":"\u4e2d\u51b6\u4eac\u8bda\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8(\u5317\u4eac\u4eac\u8bda\u745e\u8fbe\u7535\u6c14\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8)(\u5317\u4eac\u4eac\u8bda\u8d5b\u745e\u56fe\u6587\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8)"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u9000\u8d27\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":15,"key":15,"name":"\u4e2d\u51b6\u4eac\u8bda\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8(\u5317\u4eac\u4eac\u8bda\u745e\u8fbe\u7535\u6c14\u5de5\u7a0b\u6280\u672f\u6709\u9650\u516c\u53f8)(\u5317\u4eac\u4eac\u8bda\u8d5b\u745e\u56fe\u6587\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8)"}},{"id":12,"supplier_id":431,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-27","serial_no":"CGRK-20250827-00006","ticket_type":20002,"abstract":"","description":"","created_by":1001,"amount":"10378320","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-27 16:01:10","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u91c7\u8d2d\u5165\u5e93\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"}},{"id":8,"supplier_id":438,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-27","serial_no":"CGRK-20250827-00002","ticket_type":20002,"abstract":"","description":"","created_by":1001,"amount":"362","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-27 15:46:23","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":438,"key":438,"name":"\u9752\u5c9b\u946b\u96f7\u97f3\u7535\u5b50\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u91c7\u8d2d\u5165\u5e93\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":438,"key":438,"name":"\u9752\u5c9b\u946b\u96f7\u97f3\u7535\u5b50\u6709\u9650\u516c\u53f8"}},{"id":2078,"supplier_id":"","client_id":982,"user_id":"","contact_id":"","wrote_date":"2025-08-25","serial_no":"FKD-20250825-00001","ticket_type":20012,"abstract":"","description":"","created_by":1001,"amount":"1","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-25 11:07:33","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":982,"key":982,"name":"\u4e2d\u56fd\u4fe1\u606f\u5b89\u5168\u7814\u7a76\u6240"},"user":{},"contact":{},"ticket_type_display":"\u4ed8\u6b3e\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":982,"key":982,"name":"\u4e2d\u56fd\u4fe1\u606f\u5b89\u5168\u7814\u7a76\u6240"}},{"id":6,"supplier_id":"","client_id":3278,"user_id":"","contact_id":"","wrote_date":"2025-08-25","serial_no":"XSCKD-20250825-00001","ticket_type":20008,"abstract":"","description":"","created_by":1001,"amount":"423423","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-25 10:07:24","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3278,"key":3278,"name":"\u5317\u4eac\u521b\u5b89\u5149\u901a\u79d1\u6280\u53d1\u5c55\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u51fa\u5e93\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3278,"key":3278,"name":"\u5317\u4eac\u521b\u5b89\u5149\u901a\u79d1\u6280\u53d1\u5c55\u6709\u9650\u516c\u53f8"}},{"id":3,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-25","serial_no":"BSD-20250825-00001","ticket_type":20004,"abstract":"32424","description":"","created_by":1001,"amount":"0","status":6,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-25 09:16:58","verify_status":3,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u62a5\u635f\u5355","bgcolor":"#D900AA","status_display":"\u7ea2\u5b57\u53cd\u51b2","unit":{}},{"id":8,"supplier_id":"","client_id":"","user_id":"","contact_id":3649,"wrote_date":"2025-08-25","serial_no":"QTYFD-20250825-00001","ticket_type":20020,"abstract":"","description":"","created_by":1001,"amount":"1","status":5,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-25 08:53:28","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{"id":3649,"key":3649,"name":"\u59da\u96ea\u7eaf"},"ticket_type_display":"\u5176\u4ed6\u5e94\u4ed8\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{"id":3649,"key":3649,"name":"\u59da\u96ea\u7eaf"}},{"id":9,"supplier_id":"","client_id":3306,"user_id":"","contact_id":"","wrote_date":"2025-08-22","serial_no":"FY-20250822-00002","ticket_type":20014,"abstract":"","description":"","created_by":1001,"amount":"1","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-22 17:03:27","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d39\u7528\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3306,"key":3306,"name":"\u5317\u4eac\u534e\u6052\u4fe1\u5b89\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":5,"supplier_id":"","client_id":3351,"user_id":"","contact_id":"","wrote_date":"2025-08-21","serial_no":"ZSD-20250821-00001","ticket_type":20011,"abstract":"","description":"","created_by":5250,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-21 17:59:07","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":5250,"key":5250,"name":"\u8463\u8363","sex":"M","department_id":10,"avatar":{"id":157,"user_id":5250,"name":"\/files\/cdn\/a57be577deb434\/avatar\/10f9a0d9-7ea7-3910-9465-6ece76a0dae4.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"supplier":{},"client":{"id":3351,"key":3351,"name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3351,"key":3351,"name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8"}},{"id":1575,"supplier_id":"","client_id":3278,"user_id":"","contact_id":"","wrote_date":"2025-08-21","serial_no":"XSDD-20250821-00004","ticket_type":20007,"abstract":"","description":"","created_by":1001,"amount":"4712198","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-21 15:42:15","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3278,"key":3278,"name":"\u5317\u4eac\u521b\u5b89\u5149\u901a\u79d1\u6280\u53d1\u5c55\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u8ba2\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3278,"key":3278,"name":"\u5317\u4eac\u521b\u5b89\u5149\u901a\u79d1\u6280\u53d1\u5c55\u6709\u9650\u516c\u53f8"}},{"id":1573,"supplier_id":"","client_id":2699,"user_id":"","contact_id":"","wrote_date":"2025-07-18","serial_no":"XSDD-20250821-00002","ticket_type":20007,"abstract":"","description":"","created_by":1001,"amount":"434230","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-21 15:36:05","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":2699,"key":2699,"name":"\u5317\u4eac\u5609\u8fd0\u8fbe\u79d1\u6280\u5f00\u53d1\u80a1\u4efd\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u8ba2\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":2699,"key":2699,"name":"\u5317\u4eac\u5609\u8fd0\u8fbe\u79d1\u6280\u5f00\u53d1\u80a1\u4efd\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09"}},{"id":2077,"supplier_id":90,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-20","serial_no":"FKD-20250820-00001","ticket_type":20012,"abstract":"","description":"","created_by":1001,"amount":"1","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-20 17:23:31","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":90,"key":90,"name":"\u7d2b\u5149\u6653\u901a\u79d1\u6280\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u4ed8\u6b3e\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":90,"key":90,"name":"\u7d2b\u5149\u6653\u901a\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":4,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-19","serial_no":"FYZSRD-20250819-00002","ticket_type":20016,"abstract":"\u6d4b\u8bd5","description":"\u6d4b\u8bd5","created_by":1001,"amount":"5","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-19 10:43:25","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u8d39\u7528\u8f6c\u5176\u4ed6\u6536\u5165\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{}},{"id":2074,"supplier_id":704,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-18","serial_no":"FKD-20250818-00001","ticket_type":20012,"abstract":"","description":"","created_by":1001,"amount":"860","status":1,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-18 09:47:02","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":704,"key":704,"name":"\u97e9\u5609\u658c"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u4ed8\u6b3e\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":704,"key":704,"name":"\u97e9\u5609\u658c"}},{"id":4,"supplier_id":95,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-17","serial_no":"FY-20250817-00001","ticket_type":20014,"abstract":"","description":"\u6d4b\u8bd5","created_by":1001,"amount":"11","status":6,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-17 21:27:36","verify_status":3,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{"id":95,"key":95,"name":"\u5317\u4eac\u5de8\u548c\u62d3\u65b0\u79d1\u6280\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u8d39\u7528\u5355","bgcolor":"#D900AA","status_display":"\u7ea2\u5b57\u53cd\u51b2","unit":{"id":95,"key":95,"name":"\u5317\u4eac\u5de8\u548c\u62d3\u65b0\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":2,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"JJD-20250814-00001","ticket_type":20027,"abstract":"22","description":"","created_by":1001,"amount":"14","status":5,"settle_amount":"14","is_payment_settle":true,"created_at":"2025-08-14 11:36:40","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u5956\u91d1\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{}},{"id":4,"supplier_id":"","client_id":3303,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"XSCKD-20250814-00002","ticket_type":20008,"abstract":"","description":"","created_by":1001,"amount":"243243","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 11:14:10","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3303,"key":3303,"name":"\u5317\u4eac\u795e\u5dde\u90a6\u90a6\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u51fa\u5e93\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3303,"key":3303,"name":"\u5317\u4eac\u795e\u5dde\u90a6\u90a6\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09"}},{"id":3,"supplier_id":"","client_id":3286,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"XSCKD-20250814-00001","ticket_type":20008,"abstract":"","description":"","created_by":1001,"amount":"333","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 11:13:55","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":3286,"key":3286,"name":"\u826f\u56fe\u79d1\u6280\uff08\u4e0a\u6d77\uff09\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u9500\u552e\u51fa\u5e93\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":3286,"key":3286,"name":"\u826f\u56fe\u79d1\u6280\uff08\u4e0a\u6d77\uff09\u6709\u9650\u516c\u53f8"}},{"id":3,"supplier_id":"","client_id":2133,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"ZSD-20250814-00002","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 10:40:45","verify_status":1,"stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":2,"supplier_id":"","client_id":2133,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"ZSD-20250814-00001","ticket_type":20011,"abstract":"","description":"","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 10:40:15","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u8d60\u9001\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":3,"supplier_id":"","client_id":2133,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"HZD-20250814-00002","ticket_type":20010,"abstract":"","description":"\u65b9\u5f0f\u5730\u65b9","created_by":1001,"amount":"0","status":1,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 10:38:40","verify_status":0,"stop_verify_status":"","cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u83b7\u8d60\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":2,"supplier_id":"","client_id":2133,"user_id":"","contact_id":"","wrote_date":"2025-08-14","serial_no":"HZD-20250814-00001","ticket_type":20010,"abstract":"","description":"","created_by":1001,"amount":"0","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-14 10:38:15","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"},"user":{},"contact":{},"ticket_type_display":"\u83b7\u8d60\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{"id":2133,"key":2133,"name":"\u5317\u4eac\u5e02\u4e2d\u4fdd\u7f51\u76fe\u79d1\u6280\u6709\u9650\u516c\u53f8"}},{"id":1,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-12","serial_no":"GSD-20250812-00001","ticket_type":20026,"abstract":"111","description":"","created_by":1001,"amount":"1","status":5,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-12 17:40:53","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u4e2a\u7a0e\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{}},{"id":1,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-12","serial_no":"GJJD-20250812-00001","ticket_type":20025,"abstract":"111","description":"","created_by":1001,"amount":"2","status":5,"settle_amount":"0","is_payment_settle":false,"created_at":"2025-08-12 17:40:44","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u516c\u79ef\u91d1\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{}},{"id":1,"supplier_id":"","client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-12","serial_no":"ZKD-20250812-00001","ticket_type":20017,"abstract":"","description":"","created_by":1001,"amount":"1","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-12 17:35:04","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4,"avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"},"department":{"id":4,"key":4,"name":"\u603b\u7ecf\u7406"}},"supplier":{},"client":{},"user":{},"contact":{},"ticket_type_display":"\u8f6c\u6b3e\u5355","bgcolor":"#EA8917","status_display":"\u7ea2\u5b57\u53cd\u51b2\u5ba1\u6279\u4e2d","unit":{}},{"id":6,"supplier_id":431,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-08-12","serial_no":"FYDD-20250812-00001","ticket_type":20022,"abstract":"","description":"","created_by":5388,"amount":"59332843","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-12 14:26:54","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":5388,"key":5388,"name":"\u6768\u71d5\u971e","sex":"F","department_id":6,"avatar":{"id":156,"user_id":5388,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b8d4f68f-e736-3c38-9e2f-1ab47885b3d8.png"},"department":{"id":6,"key":6,"name":"\u8d22\u52a1\u90e8"}},"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u8d39\u7528\u8ba2\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"}},{"id":2008,"supplier_id":431,"client_id":"","user_id":"","contact_id":"","wrote_date":"2025-06-23","serial_no":"CGDD-20250804-00001","ticket_type":20001,"abstract":"","description":"","created_by":1011,"amount":"257633191","status":5,"settle_amount":"","is_payment_settle":false,"created_at":"2025-08-04 11:44:23","verify_status":"","stop_verify_status":0,"cancel_verify_status":"","createdBy":{"id":1011,"key":1011,"name":"\u97e9\u96c5\u82b3","sex":"F","department_id":3,"avatar":{"id":17,"user_id":1011,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b54747f4-248d-380e-93bc-0f62f769e70d.png"},"department":{"id":3,"key":3,"name":"\u5546\u52a1\u90e8"}},"supplier":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"},"client":{},"user":{},"contact":{},"ticket_type_display":"\u91c7\u8d2d\u8ba2\u5355","bgcolor":"#EA8917","status_display":"\u5ba1\u6279\u4e2d","unit":{"id":431,"key":431,"name":"\u5317\u4eac\u60e0\u8054\u8baf\u901a\u4fe1\u606f\u6280\u672f\u670d\u52a1\u6709\u9650\u516c\u53f8"}}],"pagenation":{"totalcount":44,"thispage":1,"pagesize":40},"statusCount":[{"count":44,"key":1,"name":"\u6211\u7684\u5f85\u5ba1\u6838","status":0,"color":"#FEF7EC","border":"#FF9200"},{"count":7400,"key":2,"name":"\u6211\u7684\u5df2\u5ba1\u6838","status":1,"color":"#E7F3D5","border":"#70B603"},{"count":7444,"key":4,"name":"\u5168\u90e8","status":"","color":"#F9D4D9","border":"#D9001B"}]},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0}', FALSE, '2025-08-29 14:00:17') RETURNING "id"
14:00:17.1250.8 msyii\db\Command::querySELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (1011, 1000, 5250, 5300, 5388, 1001))
14:00:17.1360.6 msyii\db\Command::querySELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id" IN (982, 3382, 3349, 3195, 3306, 1188, 15, 3278, 3351, 2699, 3303, 3286, 2133)
14:00:17.1240.5 msyii\db\Command::querySELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (1000, 5300, 1001, 5250, 5388, 1011)
14:00:17.1260.4 msyii\db\Command::querySELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id" IN (3, 10, 1, 6, 4)