Database Queries

总计35条数据
TimeDurationTypeQuery
  
10:26:05.3022.7 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='LaARkbjpq8ODkVzzYWTT4va5Qt3CsuSp'

10:26:05.3051.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1017

10:26:05.3071.0 msSELECTSELECT p.*, p.end_at - p.start_at AS hours_spent FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_clients" "c" ON p.client_id = c.id WHERE "p"."id"='1837'

10:26:05.3090.3 msSELECTSELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=2815

10:26:05.3090.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=1004

10:26:05.3100.3 msSELECTSELECT "id", "case_status", "client_id", "project_id" FROM "a57be577deb434"."tbl_cases" WHERE "id"=8279

10:26:05.3100.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=2815

10:26:05.3100.4 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3811

10:26:05.3110.6 msSELECTSELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=2815

10:26:05.3120.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=1004

10:26:05.3120.2 msSELECTSELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id"=1017

10:26:05.3120.3 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1017)

10:26:05.3130.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1017

10:26:05.3130.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1017)

10:26:05.3140.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=2

10:26:05.3140.4 msSELECTSELECT id, id as key, geolocation[0] AS lng, geolocation[1] AS lat, address, updated_at as time FROM "a57be577deb434"."tbl_location" WHERE "id"=19232

10:26:05.3150.2 msSELECTSELECT id, id as key, geolocation[0] AS lng, geolocation[1] AS lat, address, updated_at as time FROM "a57be577deb434"."tbl_location" WHERE "id"=19233

10:26:05.3150.4 msSELECTSELECT *, "product_type_id" AS "key", "description" AS "value" FROM "a57be577deb434"."tbl_pre_sales_product_types" WHERE "pre_sales_id"=1837

10:26:05.3150.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_contact_attend_pre_sales" WHERE "pre_sales_id"=1837

10:26:05.3160.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=5245

10:26:05.3161.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=4) AND ("object_id"=1837)

10:26:05.3180.4 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24867

10:26:05.3181.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=23) AND ("object_id"=1837)

10:26:05.3190.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=273

10:26:05.3200.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=33

10:26:05.3200.2 msSELECTSELECT "id", "id" AS "key", "title" AS "name" FROM "a57be577deb434"."tbl_service_type" WHERE "id"=9

10:26:05.32119.0 msSELECTSELECT "object_id", count(*) as comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=4) AND ("object_id"=1837) GROUP BY "object_id"

10:26:05.34016.1 msSELECTSELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=4) AND (remind_user_id = 1017 AND is_read = false) AND ("object_id"=1837) GROUP BY "object_id"

10:26:05.3561.4 msSELECTSELECT "pre_sales_id", sum(amount) as count FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" != 4) AND ("status" != 0) AND ("pre_sales_id"=1837) GROUP BY "pre_sales_id"

10:26:05.3581.0 msSELECTSELECT * FROM "a57be577deb434"."tbl_reimbursements" WHERE "pre_sales_id"=1837

10:26:05.3590.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_cases" WHERE "id"=8279

10:26:05.3600.6 msSELECTSELECT * FROM "a57be577deb434"."tbl_case_services" WHERE "case_id"=8279

10:26:05.3600.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=273

10:26:05.3610.6 msSELECTSELECT "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_types" WHERE "is_delete"=FALSE ORDER BY "order", "id"

10:26:05.3651.5 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1017, 2, 1141, 'v2/pre-sales/get-edit', '{"access_token":"LaARkbjpq8ODkVzzYWTT4va5Qt3CsuSp","device_type":"2","id":"1837","posttime":"1752200704","token":"ddcfa5f1f2e672b6cbbc0b6bf834cec0","version_code":"1141"}', '{"code":200,"data":{"model":{"id":1837,"client_id":2815,"start_at":"2025-07-11 10:23:00","description":"","client_concerns":"","pre_sales_assessment":"","engineer_id":1017,"created_by":1017,"created_at":"2025-07-11 10:26:00","updated_at":"2025-07-11 10:26:00","following_work_content":null,"project_status":null,"end_at":"2025-07-11 10:25:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":8279,"service_id":273,"location_in_id":19232,"location_out_id":19233,"ticket_no":"PS250711001001","client_document_id":null,"client_document_file":null,"indistance":"975.76563863347","outdistance":"943.13490148381","hours_spent":"00:02:00","client":{"id":2815,"key":2815,"name":"\u4e2d\u56fd\u9ec4\u91d1","logo":null,"sales_rep":1004,"salesRep":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0"}},"case":{"id":8279,"case_status":3,"client_id":2815,"project_id":3811,"client":{"id":2815,"key":2815,"name":"\u4e2d\u56fd\u9ec4\u91d1"},"project":{"id":3811,"key":3811,"name":"\u6ef4\u6ef4\u6253\u8f66"}},"salesRep":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0"},"engineer":{"id":1017,"key":1017,"name":"\u8f66\u660e\u98de","sex":"M","avatar":{"id":8,"user_id":1017,"name":"\/files\/cdn\/a57be577deb434\/avatar\/e538f0fe-48a7-33da-a512-b252266c9e91.jpg"}},"createdBy":{"id":1017,"key":1017,"name":"\u8f66\u660e\u98de","sex":"M","department_id":2,"avatar":{"id":8,"user_id":1017,"name":"\/files\/cdn\/a57be577deb434\/avatar\/e538f0fe-48a7-33da-a512-b252266c9e91.jpg"},"department":{"id":2,"key":2,"name":"\u6280\u672f\u90e8"}},"location":null,"locationIn":{"id":19232,"key":19232,"lng":"116.289408365885","lat":"39.9606486002604","address":"\u5317\u4eac\u5e02\u6d77\u6dc0\u533a\u84dd\u975b\u5382\u4e1c\u8def\u9760\u8fd1\u91d1\u6e90\u65f6\u4ee3\u5546\u52a1\u4e2d\u5fc3","time":"2025-07-11 10:23:00"},"locationOut":{"id":19233,"key":19233,"lng":"116.288998209635","lat":"39.9607340494792","address":"\u5317\u4eac\u5e02\u6d77\u6dc0\u533a\u84dd\u975b\u5382\u4e1c\u8def\u9760\u8fd1\u5317\u4eac\u4e16\u7eaa\u661f\u8c6a\u9152\u5e97","time":"2025-07-11 10:25:00"},"preSalesProductTypes":[],"attendedContacts":[{"id":5245,"key":5245,"name":"\u674e\u4fca"}],"attachmentRelationships":[{"id":33276,"object_type":4,"object_id":1837,"attachment_id":24867,"attachment":{"id":24867,"key":24867,"name":"125d1d0d-8e70-370e-8a62-9af7a1d54431","extension":"png","path":"\/v2\/attachment\/view\/LaARkbjpq8ODkVzzYWTT4va5Qt3CsuSp\/125d1d0d-8e70-370e-8a62-9af7a1d54431\/20250711102556.png","orig_name":"20250711102556.png"}}],"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":"2023-07-10 15:15:27","is_delete":false,"sort":3,"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":"0.03\u5c0f\u65f6","can_update":true,"can_delete":false,"can_complete":false,"can_create_reimbursement":true,"unread":0,"bgcolor":"#89c541","can_location_in":true,"can_location_out":true,"fileRelationships":[]},"options":[{"key":"PreSales[service_id]","name":"\u670d\u52a1\u76ee\u5f55","value":[{"key":273,"name":"\u6280\u672f\u65b9\u6848-\u4e00\u7ea7\u6587\u6863"}]},{"key":"PreSales[preSalesProductTypes]","name":"\u5546\u673a\u7c7b\u578b","value":[{"key":2,"name":"\u670d\u52a1\u5668"},{"key":3,"name":"\u5b58\u50a8\u8bbe\u5907"},{"key":4,"name":"\u7f51\u7edc\u8bbe\u5907 "},{"key":5,"name":"\u5b89\u5168\u8bbe\u5907"},{"key":88,"name":"\u79c1\u6709\u4e91"},{"key":8,"name":"\u4e91\u684c\u9762"},{"key":7,"name":"\u8f6f\u4ef6"},{"key":10,"name":"\u56fe\u5f62\u5de5\u4f5c\u7ad9"},{"key":69,"name":"\u5907\u4efd"},{"key":11,"name":"\u4e2a\u4eba\u8ba1\u7b97\u673a"},{"key":12,"name":"\u7b14\u8bb0\u672c"},{"key":13,"name":"\u6253\u5370\u673a"},{"key":14,"name":"UPS"},{"key":16,"name":"\u8fd0\u7ef4\u670d\u52a1"},{"key":17,"name":"\u5de5\u63a7\u673a"},{"key":18,"name":"\u673a\u623f\u8bbe\u5907"},{"key":19,"name":"\u6280\u672f\u670d\u52a1"},{"key":20,"name":"\u529e\u516c\u8bbe\u5907"},{"key":21,"name":"\u6570\u7801\u8bbe\u5907"},{"key":22,"name":"\u670d\u52a1"},{"key":23,"name":"\u793c\u54c1"},{"key":75,"name":"\u8f6f\u4ef6\u5f00\u53d1"}]},{"key":"PreSales[has_following_work]","name":"\u540e\u7eed\u5de5\u4f5c","value":[{"key":0,"name":"\u5426"},{"key":1,"name":"\u662f"}]}]},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-07-11 10:26:05') RETURNING "id"