Total processing time: 167 ms; Peak memory: 5.595 MB. Show Profiling Timeline
| Time | Duration | Category | Info |
|---|---|---|---|
| 16:01:10.601 | 25.3 ms | yii\db\Command::query | SELECT "object_id", count(*) as comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=4) AND ("object_id"=1946) GROUP BY "object_id" |
| 16:01:10.561 | 17.9 ms | yii\db\Command::query | SELECT *, "product_type_id" AS "key", "description" AS "value" FROM "a57be577deb434"."tbl_pre_sales_product_types" WHERE "pre_sales_id"=1946 |
| 16:01:10.521 | 17.1 ms | yii\db\Command::query | select ct.conname as constraint_name, a.attname as column_name, fc.relname as foreign_table_name, fns.nspname as foreign_table_schema, fa.attname as foreign_column_name from (SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s FROM pg_constraint ct ) AS ct inner join pg_class c on c.oid=ct.conrelid inner join pg_namespace ns on c.relnamespace=ns.oid inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s] left join pg_class fc on fc.oid=ct.confrelid left join pg_namespace fns on fc.relnamespace=fns.oid left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s] where ct.contype='f' and c.relname='tbl_pre_sales' and ns.nspname='a57be577deb434' order by fns.nspname, fc.relname, a.attnum |
| 16:01:10.627 | 16.0 ms | yii\db\Command::query | SELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=4) AND (remind_user_id = 1000 AND is_read = false) AND ("object_id"=1946) GROUP BY "object_id" |
| 16:01:10.579 | 13.0 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_contact_attend_pre_sales" WHERE "pre_sales_id"=1946 |
| 16:01:10.541 | 5.5 ms | yii\db\Command::query | SELECT p.*, p.end_at - p.start_at AS hours_spent FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=9262 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC LIMIT 10 |
| 16:01:10.516 | 5.4 ms | yii\db\Command::query | SELECT d.nspname AS table_schema, c.relname AS table_name, a.attname AS column_name, t.typname AS data_type, a.attlen AS character_maximum_length, pg_catalog.col_description(c.oid, a.attnum) AS column_comment, a.atttypmod AS modifier, a.attnotnull = false AS is_nullable, CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default, coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc, array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values, CASE atttypid WHEN 21 /*int2*/ THEN 16 WHEN 23 /*int4*/ THEN 32 WHEN 20 /*int8*/ THEN 64 WHEN 1700 /*numeric*/ THEN CASE WHEN atttypmod = -1 THEN null ELSE ((atttypmod - 4) >> 16) & 65535 END WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/ WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/ ELSE null END AS numeric_precision, CASE WHEN atttypid IN (21, 23, 20) THEN 0 WHEN atttypid IN (1700) THEN CASE WHEN atttypmod = -1 THEN null ELSE (atttypmod - 4) & 65535 END ELSE null END AS numeric_scale, CAST( information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t)) AS numeric ) AS size, a.attnum = any (ct.conkey) as is_pkey FROM pg_class c LEFT JOIN pg_attribute a ON a.attrelid = c.oid LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_namespace d ON d.oid = c.relnamespace LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p' WHERE a.attnum > 0 and t.typname != '' and c.relname = 'tbl_pre_sales' and d.nspname = 'a57be577deb434' ORDER BY a.attnum; |
| 16:01:10.593 | 3.0 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=4) AND ("object_id"=1946) |
| 16:01:10.596 | 3.0 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=23) AND ("object_id"=1946) |
| 16:01:10.643 | 2.0 ms | yii\db\Command::query | SELECT "pre_sales_id", sum(amount) as count FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (1, 2, 3)) AND ("pre_sales_id"=1946) GROUP BY "pre_sales_id" |
| 16:01:10.652 | 1.9 ms | yii\db\Command::query | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1000, 2, 1161, 'v2/pre-sales/list', '{"access_token":"wXfR6UQn7fW_MTEa9o-7H8Ixg0fJU0Zm","device_type":"2","id":"9262","posttime":"1784102528","token":"324df8cdd424ce2c8a72350623bd9020","version_code":"1161"}', '{"code":200,"data":{"list":[{"id":1946,"client_id":3464,"start_at":"2026-06-02 00:00:00","description":"","client_concerns":"","pre_sales_assessment":"","engineer_id":5064,"created_by":5064,"created_at":"2026-06-02 18:10:00","updated_at":"2026-06-02 18:10:00","following_work_content":"","project_status":null,"end_at":"2026-06-02 02:00:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":9262,"service_id":273,"location_in_id":null,"location_out_id":null,"ticket_no":"PS260602001001","client_document_id":null,"client_document_file":null,"indistance":999999999,"outdistance":999999999,"hours_spent":"02:00:00","client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42","logo":null,"sales_rep":null,"salesRep":null},"case":{"id":9262,"case_status":3,"client_id":3464,"project_id":4176,"client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42"},"project":{"id":4176,"key":4176,"name":"\u9500\u552e\u7ebf\u7d22\u751f\u621020260602003"}},"salesRep":null,"engineer":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"}},"createdBy":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","department_id":10,"avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"location":null,"locationIn":null,"locationOut":null,"preSalesProductTypes":[],"attendedContacts":[{"id":6258,"key":6258,"name":"12"}],"attachmentRelationships":[],"files":[],"service":{"id":273,"serial_no":"FA01","title":"\u6280\u672f\u65b9\u6848-\u4e00\u7ea7\u6587\u6863","brand_id":33,"type_id":9,"points":150,"points_off_time":150,"points_holiday":150,"description":"\u6280\u672f\u65b9\u6848-\u6587\u6863","created_by":1013,"created_at":"2021-05-31 07:39:33","updated_at":"2026-04-23 16:32:29","is_delete":false,"sort":3,"is_stop":false,"brand":{"id":33,"key":33,"name":"Toast"},"type":{"id":9,"key":9,"name":"\u6280\u672f\u57f9\u8bad"}},"clientDocument":null,"commentCount":null,"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"2\u5c0f\u65f6","can_update":true,"can_delete":true,"can_complete":false,"can_create_reimbursement":false,"unread":0,"bgcolor":"#89c541","can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":1,"thispage":1,"pagesize":10},"can_create":false},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"ip":"223.104.40.7","ua":"jinchangxiao\/2.3.158 (iPhone 12; iOS 26.5.2; Scale\/3.00)"}', FALSE, '2026-07-15 16:01:10', 160765952) RETURNING "id" |
| 16:01:10.646 | 1.8 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_reimbursements" WHERE "pre_sales_id"=1946 |
| 16:01:10.539 | 1.3 ms | yii\db\Command::query | SELECT COUNT(*) FROM (SELECT p.*, p.end_at - p.start_at AS hours_spent FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=9262 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC) "c" |
| 16:01:10.504 | 0.7 ms | yii\db\Command::query | SELECT * FROM "global"."vw_user_login" WHERE "access_token"='wXfR6UQn7fW_MTEa9o-7H8Ixg0fJU0Zm' |
| 16:01:10.506 | 0.5 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000 |
| 16:01:10.556 | 0.4 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464 |
| 16:01:10.510 | 0.4 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_cases" WHERE "id"='9262' |
| 16:01:10.558 | 0.4 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464 |
| 16:01:10.593 | 0.4 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=6258 |
| 16:01:10.600 | 0.3 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=273 |
| 16:01:10.559 | 0.3 ms | yii\db\Command::query | SELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5064) |
| 16:01:10.600 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=33 |
| 16:01:10.560 | 0.3 ms | yii\db\Command::query | SELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5064) |
| 16:01:10.557 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464 |
| 16:01:10.559 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id"=5064 |
| 16:01:10.557 | 0.3 ms | yii\db\Command::query | SELECT "id", "case_status", "client_id", "project_id" FROM "a57be577deb434"."tbl_cases" WHERE "id"=9262 |
| 16:01:10.601 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "title" AS "name" FROM "a57be577deb434"."tbl_service_type" WHERE "id"=9 |
| 16:01:10.560 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5064 |
| 16:01:10.504 | 0.2 ms | yii\db\Connection::open | Opening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta |
| 16:01:10.558 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=4176 |
| 16:01:10.561 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=10 |