14:53:29.307 | 2.3 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "id"=1001 |
14:53:29.310 | 1.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
14:53:29.315 | 5.9 ms | SELECT | SELECT 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, 1))) 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"."status" IN (2, 5, 1)) ) 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"."status" IN (2, 5, 1)) )) "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, 5412, 5409, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='3296') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc) "c" |
14:53:29.322 | 3.3 ms | SELECT | SELECT 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, 1))) 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"."status" IN (2, 5, 1)) ) 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"."status" IN (2, 5, 1)) )) "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, 5412, 5409, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='3296') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc) "c" |
14:53:29.325 | 3.1 ms | SELECT | 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, 1))) 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"."status" IN (2, 5, 1)) ) 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"."status" IN (2, 5, 1)) )) "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, 5412, 5409, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) AND ("p"."client_id"='3296') ORDER BY scp.created_at DESC NULLS LAST, scp.id desc LIMIT 20 |
14:53:29.329 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id"=3493 |
14:53:29.330 | 0.3 ms | SELECT | SELECT "id", "id" AS "key", "project_title" AS "name", "budget", "bargain_date", "created_by", "client_id" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3633 |
14:53:29.330 | 0.2 ms | SELECT | SELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
14:53:29.330 | 0.4 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=3296 |
14:53:29.331 | 3.8 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_visit_module_histories" WHERE ("user_id"=1001) AND ("object_type"=23) AND ("visit_date"='2025-08-21') |
14:53:29.335 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_visit_module_histories" SET "num"=16, "last_visit_at"='now()' WHERE "id"=55357 |
14:53:29.336 | 1.1 ms | INSERT | INSERT 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":"3296","page":"1","status":"collected","web_access_token":"239qcuu_ToIhJtTt60gp-9_fllLTtTgq"}', '{"code":2000,"result":{"list":[{"id":"1124","ticket_type":1,"contract_id":3493,"amount":"5494736.8","collected_date":"2024-10-30 11:07:44","created_at":"2024-10-30 11:07:44","created_by":1013,"description":null,"project":{"id":3633,"key":3633,"name":"\u8bed\u97f3\u5408\u6210\u7cfb\u7edf\u8f6f\u4ef6\u9879\u76ee\uff08\u8fc7\u5355\uff09","budget":"5494736.8","bargain_date":"2024-08-19","created_by":1001,"client_id":3296,"createdBy":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","department_id":4},"client":{"id":3296,"key":3296,"name":"\u62d3\u5c14\u601d\u4fe1\u606f\u6280\u672f\u80a1\u4efd\u6709\u9650\u516c\u53f8\uff08\u8fc7\u5355\uff09"}},"created_at_display":"2024-10-30"}],"sumAmount":"5494736.8","pagenation":{"totalcount":1,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0}', FALSE, '2025-08-21 14:53:29') RETURNING "id" |