Total processing time: 193 ms; Peak memory: 5.636 MB. Show Profiling Timeline
| Time | Duration | Category | Info |
|---|---|---|---|
| 14:24:06.131 | 22.8 ms | yii\db\Command::query | SELECT "object_id", count(*) as comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=4) AND ("object_id"=1940) GROUP BY "object_id" |
| 14:24:06.154 | 17.3 ms | yii\db\Command::query | SELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=4) AND (remind_user_id = 1015 AND is_read = false) AND ("object_id"=1940) GROUP BY "object_id" |
| 14:24:06.090 | 17.2 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 |
| 14:24:06.083 | 6.1 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; |
| 14:24:06.122 | 3.3 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=4) AND ("object_id"=1940) |
| 14:24:06.126 | 3.1 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=23) AND ("object_id"=1940) |
| 14:24:06.171 | 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"=1940) GROUP BY "pre_sales_id" |
| 14:24:06.174 | 1.8 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_reimbursements" WHERE "pre_sales_id"=1940 |
| 14:24:06.180 | 1.7 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', 1015, 2, 1161, 'v2/pre-sales/list', '{"access_token":"Q_7DD5LA0njCol9o5skCibRkap3ZqeYZ","device_type":"2","id":"9245","posttime":"1784183040","token":"058a99a865483d66d43b544c112b7b50","version_code":"1161"}', '{"code":200,"data":{"list":[{"id":1940,"client_id":2128,"start_at":"2026-04-07 13:00:00","description":"","client_concerns":"","pre_sales_assessment":"","engineer_id":1015,"created_by":1015,"created_at":"2026-04-07 16:13:53","updated_at":"2026-04-07 16:13:53","following_work_content":null,"project_status":null,"end_at":"2026-04-07 15:00:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":9245,"service_id":230,"location_in_id":null,"location_out_id":null,"ticket_no":"PS260325003001","client_document_id":null,"client_document_file":null,"indistance":999999999,"outdistance":999999999,"hours_spent":"02:00:00","client":{"id":2128,"key":2128,"name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8","logo":null,"sales_rep":5087,"salesRep":{"id":5087,"key":5087,"name":"\u5218\u5fae"}},"case":{"id":9245,"case_status":3,"client_id":2128,"project_id":4132,"client":{"id":2128,"key":2128,"name":"\u5317\u4eac\u79d1\u6280\u6709\u9650\u516c\u53f8"},"project":{"id":4132,"key":4132,"name":"AI\u670d\u52a1\u5668\u91c7\u8d2d"}},"salesRep":{"id":5087,"key":5087,"name":"\u5218\u5fae"},"engineer":{"id":1015,"key":1015,"name":"\u5434\u660a","sex":"M","avatar":{"id":12,"user_id":1015,"name":"\/files\/cdn\/a57be577deb434\/avatar\/d69b398a-5951-36e9-a92e-992fe938db26.jpg"}},"createdBy":{"id":1015,"key":1015,"name":"\u5434\u660a","sex":"M","department_id":2,"avatar":{"id":12,"user_id":1015,"name":"\/files\/cdn\/a57be577deb434\/avatar\/d69b398a-5951-36e9-a92e-992fe938db26.jpg"},"department":{"id":2,"key":2,"name":"\u6280\u672f\u90e8"}},"location":null,"locationIn":null,"locationOut":null,"preSalesProductTypes":[],"attendedContacts":[{"id":5835,"key":5835,"name":"\u674e\u5965"}],"attachmentRelationships":[],"files":[],"service":{"id":230,"serial_no":"TOAST01","title":"\u54a8\u8be2\u670d\u52a1","brand_id":33,"type_id":2,"points":50,"points_off_time":50,"points_holiday":100,"description":"\u54a8\u8be2\u670d\u52a1","created_by":1001,"created_at":"2018-09-07 20:03:43","updated_at":"2022-01-04 14:34:32","is_delete":false,"sort":14,"is_stop":false,"brand":{"id":33,"key":33,"name":"Toast"},"type":{"id":2,"key":2,"name":"\u54a8\u8be2\u670d\u52a1"}},"clientDocument":null,"commentCount":{"object_id":1940,"comment":3},"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"2\u5c0f\u65f6","can_update":true,"can_delete":false,"can_complete":false,"can_create_reimbursement":true,"unread":0,"bgcolor":"#89c541","can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":1,"thispage":1,"pagesize":10},"can_create":true},"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-16 14:24:06', 186578944) RETURNING "id" |
| 14:24:06.108 | 1.4 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"=9245 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC) "c" |
| 14:24:06.110 | 1.2 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"=9245 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC LIMIT 10 |
| 14:24:06.075 | 0.8 ms | yii\db\Command::query | SELECT * FROM "global"."vw_user_login" WHERE "access_token"='Q_7DD5LA0njCol9o5skCibRkap3ZqeYZ' |
| 14:24:06.120 | 0.7 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"=1940 |
| 14:24:06.078 | 0.6 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1015 |
| 14:24:06.081 | 0.5 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_cases" WHERE "id"='9245' |
| 14:24:06.121 | 0.5 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_contact_attend_pre_sales" WHERE "pre_sales_id"=1940 |
| 14:24:06.114 | 0.4 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=2128 |
| 14:24:06.117 | 0.4 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=2128 |
| 14:24:06.130 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=33 |
| 14:24:06.129 | 0.3 ms | yii\db\Command::query | SELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=230 |
| 14:24:06.118 | 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"=1015) |
| 14:24:06.115 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=5087 |
| 14:24:06.119 | 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"=1015) |
| 14:24:06.116 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=2128 |
| 14:24:06.117 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=5087 |
| 14:24:06.122 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=5835 |
| 14:24:06.119 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1015 |
| 14:24:06.116 | 0.3 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=4132 |
| 14:24:06.118 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id"=1015 |
| 14:24:06.115 | 0.2 ms | yii\db\Command::query | SELECT "id", "case_status", "client_id", "project_id" FROM "a57be577deb434"."tbl_cases" WHERE "id"=9245 |
| 14:24:06.130 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "title" AS "name" FROM "a57be577deb434"."tbl_service_type" WHERE "id"=2 |
| 14:24:06.075 | 0.2 ms | yii\db\Connection::open | Opening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta |
| 14:24:06.120 | 0.2 ms | yii\db\Command::query | SELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=2 |