Database Queries

总计13条数据
TimeDurationTypeQuery
  
10:08:44.7012.3 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "id"=1001

10:08:44.7040.5 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "id"=1001

10:08:44.7051.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

10:08:44.7106.0 msSELECTSELECT SUM(amount) FROM (SELECT "scp".* FROM (SELECT * FROM ((SELECT '1' || r.id::varchar as id, 1 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5))) UNION ALL ( SELECT '2' || r.id::varchar as id, 2 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) ) UNION ALL ( SELECT '3' || r.id::varchar as id, 3 as ticket_type, r.sales_contract_id as contract_id, 0 - r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) )) "sub") "scp" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = scp.contract_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON c.from_project = p.id WHERE (p.id is not null) AND ("p"."created_by" IN (1001, 5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 5037, 5087, 1008, 5048, 5043, 5045, 5230, 5031, 5088, 5208, 1003, 5294, 5357, 5044, 1030, 5076, 5300, 5027, 5089, 5311, 5066, 5069, 5364, 1009, 5295, 1013, 5128, 5203, 1025, 5032, 5075, 1004, 5072, 5033, 5359, 5409, 5412, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='5') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc) "c"

10:08:44.7163.6 msSELECTSELECT COUNT(*) FROM (SELECT "scp".* FROM (SELECT * FROM ((SELECT '1' || r.id::varchar as id, 1 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5))) UNION ALL ( SELECT '2' || r.id::varchar as id, 2 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) ) UNION ALL ( SELECT '3' || r.id::varchar as id, 3 as ticket_type, r.sales_contract_id as contract_id, 0 - r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) )) "sub") "scp" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = scp.contract_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON c.from_project = p.id WHERE (p.id is not null) AND ("p"."created_by" IN (1001, 5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 5037, 5087, 1008, 5048, 5043, 5045, 5230, 5031, 5088, 5208, 1003, 5294, 5357, 5044, 1030, 5076, 5300, 5027, 5089, 5311, 5066, 5069, 5364, 1009, 5295, 1013, 5128, 5203, 1025, 5032, 5075, 1004, 5072, 5033, 5359, 5409, 5412, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='5') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc) "c"

10:08:44.7203.4 msSELECTSELECT "scp".* FROM (SELECT * FROM ((SELECT '1' || r.id::varchar as id, 1 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."status" IN (2, 5))) UNION ALL ( SELECT '2' || r.id::varchar as id, 2 as ticket_type, r.sales_contract_id as contract_id, r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) ) UNION ALL ( SELECT '3' || r.id::varchar as id, 3 as ticket_type, r.sales_contract_id as contract_id, 0 - r.amount as amount, t.created_at as collected_date, t.created_at, t.created_by, t.abstract as description FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE (r.sales_contract_id is not null) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) )) "sub") "scp" LEFT JOIN "a57be577deb434"."tbl_sales_contracts" "c" ON c.id = scp.contract_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON c.from_project = p.id WHERE (p.id is not null) AND ("p"."created_by" IN (1001, 5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 5037, 5087, 1008, 5048, 5043, 5045, 5230, 5031, 5088, 5208, 1003, 5294, 5357, 5044, 1030, 5076, 5300, 5027, 5089, 5311, 5066, 5069, 5364, 1009, 5295, 1013, 5128, 5203, 1025, 5032, 5075, 1004, 5072, 5033, 5359, 5409, 5412, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='5') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc LIMIT 20 OFFSET 60

10:08:44.7240.7 msSELECTSELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id" IN (228, 223, 53)

10:08:44.7250.3 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name", "budget", "bargain_date", "created_by", "client_id" FROM "a57be577deb434"."tbl_projects" WHERE "id" IN (137, 307, 308)

10:08:44.7260.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1004

10:08:44.7260.4 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=5

10:08:44.7273.9 msSELECTSELECT * FROM "a57be577deb434"."tbl_visit_module_histories" WHERE ("user_id"=1001) AND ("object_type"=23) AND ("visit_date"='2025-12-23')

10:08:44.7310.9 msUPDATEUPDATE "a57be577deb434"."tbl_visit_module_histories" SET "num"=23, "last_visit_at"='now()' WHERE "id"=59629

10:08:44.7321.2 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/analysis/sales-collect-list', '{"client_id":"5","page":"4","status":"collected","web_access_token":"yb8YvQDqCxvGUQWSJnYL2S9XtkD7pVRr"}', '{"code":2000,"result":{"list":[{"id":"1602","ticket_type":1,"contract_id":228,"amount":"744588.00","collected_date":"2017-08-31 14:18:41","created_at":"2017-08-31 14:18:41","created_by":null,"description":null,"project":{"id":308,"key":308,"name":"\u865a\u62df\u5316\u670d\u52a1\u5668\u6269\u5bb9","budget":"744588","bargain_date":"2017-08-25","created_by":1004,"client_id":5,"createdBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1},"client":{"id":5,"key":5,"name":"\u4e2d\u7535\u79d1\u592a\u529b\u901a\u4fe1\u79d1\u6280\u6709\u9650\u516c\u53f8"}},"created_at_display":"2017-08-31"},{"id":"11921","ticket_type":1,"contract_id":223,"amount":"36740.00","collected_date":"2017-08-29 13:10:27","created_at":"2017-08-29 13:10:27","created_by":null,"description":null,"project":{"id":307,"key":307,"name":"VEEAM\u7eed\u4fdd","budget":"36740","bargain_date":"2017-07-31","created_by":1004,"client_id":5,"createdBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1},"client":{"id":5,"key":5,"name":"\u4e2d\u7535\u79d1\u592a\u529b\u901a\u4fe1\u79d1\u6280\u6709\u9650\u516c\u53f8"}},"created_at_display":"2017-08-29"},{"id":"11547","ticket_type":1,"contract_id":53,"amount":"1148800.00","collected_date":"2017-03-25 12:36:45","created_at":"2017-03-25 12:36:45","created_by":null,"description":null,"project":{"id":137,"key":137,"name":"netapp 8200","budget":"1148800","bargain_date":"2017-03-25","created_by":1004,"client_id":5,"createdBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1},"client":{"id":5,"key":5,"name":"\u4e2d\u7535\u79d1\u592a\u529b\u901a\u4fe1\u79d1\u6280\u6709\u9650\u516c\u53f8"}},"created_at_display":"2017-03-25"}],"sumAmount":"59561038.00","pagenation":{"totalcount":63,"thispage":4,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"223.72.15.12","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko\/20100101 Firefox\/146.0"}', FALSE, '2025-12-23 10:08:44') RETURNING "id"