21:10:31.779 | 11.6 ms | SELECT | SELECT COUNT(*) FROM (SELECT s.*,
s.end_at - s.start_at AS hours_spent FROM "a57be577deb434"."tbl_work_logs" "s" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = s.client_id AND client.deleted = FALSE LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON "p"."id" = "s"."project_id" LEFT JOIN "a57be577deb434"."tbl_users" "u" ON "u"."id" = "s"."created_by" LEFT JOIN "a57be577deb434"."tbl_work_log_verify_rels" "rvr" ON rvr.work_log_id = s.id LEFT JOIN "a57be577deb434"."tbl_work_log_carbon_copy_rels" "ccr" ON ccr.work_log_id = s.id WHERE (("s"."created_by" IN (1000, 1001, 1004, 1005, 1011, 1013, 1015, 1017, 1022, 1023, 5016, 5064, 5085, 5087, 5248, 5250, 5252, 5295, 5296, 5300, 5311, 5329, 5332, 5360, 5388, 5404, 5420, 5440, 5445, 5446)) OR ("ccr"."user_id"=1000)) AND ("s"."created_by"='5250') AND ("u"."department_id"='10') GROUP BY "s"."id" ORDER BY "is_draft" DESC, "s"."end_at" DESC, "s"."updated_at" DESC) "c" |
21:10:31.793 | 5.5 ms | SELECT | SELECT s.*,
s.end_at - s.start_at AS hours_spent FROM "a57be577deb434"."tbl_work_logs" "s" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = s.client_id AND client.deleted = FALSE LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON "p"."id" = "s"."project_id" LEFT JOIN "a57be577deb434"."tbl_users" "u" ON "u"."id" = "s"."created_by" LEFT JOIN "a57be577deb434"."tbl_work_log_verify_rels" "rvr" ON rvr.work_log_id = s.id LEFT JOIN "a57be577deb434"."tbl_work_log_carbon_copy_rels" "ccr" ON ccr.work_log_id = s.id WHERE (("s"."created_by" IN (1000, 1001, 1004, 1005, 1011, 1013, 1015, 1017, 1022, 1023, 5016, 5064, 5085, 5087, 5248, 5250, 5252, 5295, 5296, 5300, 5311, 5329, 5332, 5360, 5388, 5404, 5420, 5440, 5445, 5446)) OR ("ccr"."user_id"=1000)) AND ("s"."created_by"='5250') AND ("u"."department_id"='10') GROUP BY "s"."id" ORDER BY "is_draft" DESC, "s"."end_at" DESC, "s"."updated_at" DESC LIMIT 10 |
21:10:31.892 | 5.4 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 2, 1142, 'v2/work-log/list', '{"WorkLogSearch":{"filterDepartment":"10","filterUser":"5250","scenario_id":"","scenario_option_id":"","status":""},"access_token":"oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH","device_type":"2","posttime":"1752671488","token":"4616876827e31a1635505f58fc2d7c57","version_code":"1142"}', '{"code":200,"data":{"list":[{"id":15578,"client_id":null,"scenario_id":1,"scenario_option_id":73,"end_at":"2025-05-28 09:00:00","created_by":5250,"created_at":"2021-06-01 11:05:00","updated_at":"2025-05-28 10:51:05","start_at":"2025-05-28 09:00:00","description":"","escort":"","is_draft":0,"location_id":null,"project_id":null,"location_in_id":null,"location_out_id":null,"status":0,"indistance":999999999,"outdistance":999999999,"hours_spent":"00:00:00","createdBy":{"id":5250,"key":5250,"name":"\u8463\u8363","sex":"M","department_id":10,"avatar":{"id":157,"user_id":5250,"name":"\/files\/cdn\/a57be577deb434\/avatar\/10f9a0d9-7ea7-3910-9465-6ece76a0dae4.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"location":null,"scenarioOption":{"id":73,"key":73,"name":"\u552e\u540e\u670d\u52a1"},"scenarios":{"id":1,"key":1,"name":"\u9500\u552e\u65e5\u5fd7"},"client":null,"project":null,"workLogContacts":[],"commentCount":{"object_id":15578,"comment":3},"attachmentRelationships":[{"id":33110,"object_type":18,"object_id":15578,"attachment_id":24738,"attachment":{"id":24738,"key":24738,"name":"312602ad-d9bc-3226-984c-549d37b2dd8a","extension":"png","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/312602ad-d9bc-3226-984c-549d37b2dd8a\/20250528105048.png","orig_name":"20250528105048.png"}}],"locationIn":null,"locationOut":null,"files":[],"workLogCarbonCopyRels":[],"workLogVerifyRels":[],"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"0\u5206\u949f","read":0,"total":0,"can_update":true,"can_delete":true,"can_create_reimbursement":false,"can_create_project":true,"can_location_in":false,"can_location_out":false},{"id":18743,"client_id":null,"scenario_id":1,"scenario_option_id":7,"end_at":"2022-05-12 08:00:00","created_by":5250,"created_at":"2022-05-12 09:53:10","updated_at":"2022-05-12 09:53:10","start_at":"2022-05-12 08:00:00","description":"\u6d4b\u8bd5","escort":"","is_draft":0,"location_id":null,"project_id":null,"location_in_id":null,"location_out_id":null,"status":0,"indistance":999999999,"outdistance":999999999,"hours_spent":"00:00:00","createdBy":{"id":5250,"key":5250,"name":"\u8463\u8363","sex":"M","department_id":10,"avatar":{"id":157,"user_id":5250,"name":"\/files\/cdn\/a57be577deb434\/avatar\/10f9a0d9-7ea7-3910-9465-6ece76a0dae4.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"location":null,"scenarioOption":{"id":7,"key":7,"name":"\u62dc\u8bbf\u5382\u5546"},"scenarios":{"id":1,"key":1,"name":"\u9500\u552e\u65e5\u5fd7"},"client":null,"project":null,"workLogContacts":[],"commentCount":{"object_id":18743,"comment":4},"attachmentRelationships":[],"locationIn":null,"locationOut":null,"files":[],"workLogCarbonCopyRels":[],"workLogVerifyRels":[],"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"0\u5206\u949f","read":0,"total":0,"can_update":true,"can_delete":true,"can_create_reimbursement":false,"can_create_project":true,"can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":2,"thispage":1,"pagesize":10},"can_create":true},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-07-16 21:10:31') RETURNING "id" |