Database Queries

总计42条数据
TimeDurationTypeQuery
  
14:05:59.1582.6 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH'

14:05:59.1611.0 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

14:05:59.1630.5 msSELECTSELECT "c".* FROM "a57be577deb434"."tbl_sales_contracts" "c" WHERE "c"."id"='3854'

14:05:59.1640.5 msSELECTSELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=2815

14:05:59.1650.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=1004

14:05:59.1650.3 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1004)

14:05:59.1650.4 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3816

14:05:59.1660.3 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name", "description", "total_contact_point", "paid_contact_point", "is_sales_order_ready", "project_product_version_id", "bargain_date", "collected", "profit_pct", "budget" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3816

14:05:59.1670.6 msSELECTSELECT "id", "product_type_id", "product_type_id" AS "key", "name", "budget", "pct", "project_id", "profit" FROM "a57be577deb434"."tbl_project_product_types" WHERE "project_id"=3816

14:05:59.1670.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=3816

14:05:59.1680.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_contact_points" WHERE "project_id"=3816

14:05:59.1681.8 msSELECTSELECT "id", "project_id" FROM "a57be577deb434"."tbl_sales_order_items" WHERE ("is_system"=TRUE) AND ("project_id"=3816)

14:05:59.1701.6 msSELECTSELECT "project_id", sum(amount) AS sum FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (3, 2)) AND ("project_id"=3816) GROUP BY "project_id"

14:05:59.1720.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_sales_supplier_rels" WHERE "contract_id"=3854

14:05:59.1720.3 msSELECTSELECT "id", "id" AS "key", "type" AS "name" FROM "a57be577deb434"."tbl_contract_types" WHERE "id"=1

14:05:59.1730.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

14:05:59.1730.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1000)

14:05:59.1740.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=10

14:05:59.1740.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=1004

14:05:59.1740.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1004)

14:05:59.1750.5 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE ("reminded"=FALSE) AND ("contract_id"=3854) ORDER BY "remind_date"

14:05:59.1750.2 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" AS "name" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE "contract_id"=3854

14:05:59.1750.4 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_remind_receivers" WHERE "contract_id"=3854

14:05:59.1760.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_service_contract_remind_receivers" WHERE "contract_id"=3854

14:05:59.1760.4 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" WHERE "contract_id"=3854

14:05:59.1770.5 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" AS "name", "amount" AS "value", "overdue_days" FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id"=3854 ORDER BY "remind_date"

14:05:59.1770.6 msSELECTSELECT "id", "id" AS "key", "contract_id", "amount" AS "value", "created_by", "created_at", "description", "collected_date", "amount" FROM "a57be577deb434"."tbl_sales_contract_payments" WHERE "contract_id"=3854 ORDER BY "id"

14:05:59.1780.5 msSELECTSELECT "id", "id" AS "key", "contract_id", "amount" AS "value", "attachment_id", "from_date" FROM "a57be577deb434"."tbl_sales_contract_invoices" WHERE "contract_id"=3854 ORDER BY "id"

14:05:59.1791.7 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=20) AND ("object_id" IN (1988, 1989))

14:05:59.1810.4 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id" IN (24895, 24902, 24903)

14:05:59.1811.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=102) AND ("object_id" IN (1988, 1989))

14:05:59.1830.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id" IN (24896, 24904)

14:05:59.1831.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=105) AND ("object_id"=3854)

14:05:59.1840.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24894

14:05:59.1841.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=106) AND ("object_id"=3854)

14:05:59.1860.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24905

14:05:59.1861.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=107) AND ("object_id"=3854)

14:05:59.1870.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24906

14:05:59.18717.2 msSELECTSELECT "object_id", count(*) AS comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=7) AND ("object_id"=3854) GROUP BY "object_id"

14:05:59.20516.2 msSELECTSELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=7) AND (remind_user_id = 1000 AND is_read = false) AND ("object_id"=3854) GROUP BY "object_id"

14:05:59.2281.0 msSELECTSELECT "id" FROM "a57be577deb434"."tbl_users" WHERE ("id" IN (5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 1001, 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 ("user_status"='1') ORDER BY pinyin1 nulls first, namecut1 nulls first, pinyin2 nulls first, namecut2 nulls first, pinyin3 nulls first, namecut3 nulls first, pinyin4 nulls first, namecut4 nulls first

14:05:59.2301.8 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 6, 166, 'v2/sales-contract/get-edit', '{"id":"3854","posttime":"1752732359","access_token":"oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH","device_type":"6","version_code":"166","token":"6a838ef6b426f2fa4229c8d1c8412ea2"}', '{"code":200,"data":{"model":{"id":3854,"client_id":2815,"signed_at":"2025-07-10","amount":"54230","handler":1004,"description":"","created_by":1000,"created_at":"2025-07-10 14:19:31","updated_at":"2025-07-17 14:05:33","contract_scan":null,"receipt_scan":null,"contract_type":1,"project_id":3816,"valid_date":null,"expire_date":null,"sla":"","remind_ahead":"","expire_remind_ahead":"","expire_reminded":false,"serial_no":"ZGHJ-250710001","payment_collection_remind_ahead":"1 day","from_project":3816,"receipt_date":null,"verify_date":null,"including_tax":true,"build_by_project":true,"need_analysis":true,"is_settle":false,"is_deliver":false,"is_outbound":false,"is_save_collection":true,"save_collection_at":"2025-07-10 14:19:31.051712+08","client":{"id":2815,"key":2815,"name":"\u4e2d\u56fd\u9ec4\u91d1","logo":null,"sales_rep":1004,"salesRep":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","avatar":{"id":10,"user_id":1004,"name":"\/files\/cdn\/a57be577deb434\/avatar\/fc8d836d-8085-35fc-8a48-54a276f664a6.png"}}},"project":{"id":3816,"key":3816,"name":"999"},"fromProject":{"id":3816,"key":3816,"name":"999","description":"","total_contact_point":null,"paid_contact_point":null,"is_sales_order_ready":false,"project_product_version_id":null,"bargain_date":"2025-07-10","collected":"0","profit_pct":"5","budget":"54230","projectProductTypes":[{"id":6308,"product_type_id":2,"key":2,"name":"\u670d\u52a1\u5668","budget":"54230","pct":"5","project_id":3816,"profit":"2711.5"}],"projectProductRels":[],"projectContactPoints":[],"buildSalesOrderItems":[],"reimbursementAmountSum":null,"profit":2711.5,"contact_points_status_display":"\u672a\u8bbe\u7f6e"},"salesSupplierRels":[],"contractScan":null,"receiptScan":null,"contractType":{"id":1,"key":1,"name":"\u4ea7\u54c1\u9500\u552e"},"createdBy":{"id":1000,"key":1000,"name":"\u66f9\u6c38\u751f","sex":"M","department_id":10,"avatar":{"id":1,"user_id":1000,"name":"\/files\/cdn\/a57be577deb434\/avatar\/aebf8dd5-5fe2-3ead-a020-c095fe4101e4.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"handleBy":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","sex":"M","department_id":1,"avatar":{"id":10,"user_id":1004,"name":"\/files\/cdn\/a57be577deb434\/avatar\/fc8d836d-8085-35fc-8a48-54a276f664a6.png"}},"remindDate":null,"serviceContractRemindDates":[],"salesContractRemindReceivers":[],"serviceContractRemindReceivers":[],"salesContractPaymentCollectionRemindReceivers":[],"salesContractPaymentCollectionRemindDates":[{"id":2429,"key":2429,"contract_id":3854,"name":"2025-07-13","value":"54230","overdue_days":null,"pct":100,"collect_status":"\u903e\u671f4\u5929"}],"salesContractPayments":[],"salesContractInvoices":[{"id":1988,"key":1988,"contract_id":3854,"value":"1000.00","attachment_id":null,"from_date":"2025-07-13","attachment":null,"attachmentRelationships":[{"id":33305,"object_type":20,"object_id":1988,"attachment_id":24895,"attachment":{"id":24895,"key":24895,"name":"651ab3fc-9c2e-314f-ae8d-37510d1abd09","extension":"png","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/651ab3fc-9c2e-314f-ae8d-37510d1abd09\/Screen Shot 2025-07-14 at 10.36.38.png","orig_name":"Screen Shot 2025-07-14 at 10.36.38.png"}}],"files":[{"id":33306,"object_type":102,"object_id":1988,"attachment_id":24896,"attachment":{"id":24896,"key":24896,"name":"73f3a814-2d10-3b4a-beb9-66e0744df638","extension":"pdf","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/73f3a814-2d10-3b4a-beb9-66e0744df638\/Auto Sync Local Changes to Remote Using rsync.pdf","orig_name":"Auto Sync Local Changes to Remote Using rsync.pdf"}}]},{"id":1989,"key":1989,"contract_id":3854,"value":"20000.00","attachment_id":null,"from_date":"2025-07-17","attachment":null,"attachmentRelationships":[{"id":33313,"object_type":20,"object_id":1989,"attachment_id":24902,"attachment":{"id":24902,"key":24902,"name":"2522b7be-6a84-342a-ab0d-80bdc6dafaf5","extension":"jpg","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/2522b7be-6a84-342a-ab0d-80bdc6dafaf5\/WechatIMG54800.jpg","orig_name":"WechatIMG54800.jpg"}},{"id":33314,"object_type":20,"object_id":1989,"attachment_id":24903,"attachment":{"id":24903,"key":24903,"name":"9d9a1ca8-0f9c-38cc-98f9-1035f1edd28f","extension":"png","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/9d9a1ca8-0f9c-38cc-98f9-1035f1edd28f\/Screen Shot 2024-11-13 at 10.50.08.png","orig_name":"Screen Shot 2024-11-13 at 10.50.08.png"}}],"files":[{"id":33315,"object_type":102,"object_id":1989,"attachment_id":24904,"attachment":{"id":24904,"key":24904,"name":"7d4083b7-f3c5-3aa9-b166-9ff28a7c846b","extension":"pdf","path":"\/v2\/attachment\/view\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/7d4083b7-f3c5-3aa9-b166-9ff28a7c846b\/\u5982\u4f55\u753b\u597d\u4e00\u5f20\u67b6\u6784\u56fe_\u4e1a\u52a1\u56fe_\u6d41\u7a0b\u56fe\uff0c\u638c\u63e1\u8fd94\u4e2a\u5173\u952e\u70b9.pdf","orig_name":"\u5982\u4f55\u753b\u597d\u4e00\u5f20\u67b6\u6784\u56fe_\u4e1a\u52a1\u56fe_\u6d41\u7a0b\u56fe\uff0c\u638c\u63e1\u8fd94\u4e2a\u5173\u952e\u70b9.pdf"}}]}],"contractScans":[{"id":33316,"object_type":105,"object_id":3854,"attachment_id":24894,"attachment":{"id":24894,"key":24894,"name":"8a9f0b7c-f1ce-384e-92e3-bf5ab6ecdb00","extension":"pdf","path":"\/v2\/attachment\/preview\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/8a9f0b7c-f1ce-384e-92e3-bf5ab6ecdb00\/InvSqrt.pdf","orig_name":"InvSqrt.pdf"}}],"receiptScans":[{"id":33317,"object_type":106,"object_id":3854,"attachment_id":24905,"attachment":{"id":24905,"key":24905,"name":"42824d71-6174-34a8-a0f2-040d0add1866","extension":"pdf","path":"\/v2\/attachment\/preview\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/42824d71-6174-34a8-a0f2-040d0add1866\/First design notes of Golang.pdf","orig_name":"First design notes of Golang.pdf"}}],"verifyScans":[{"id":33318,"object_type":107,"object_id":3854,"attachment_id":24906,"attachment":{"id":24906,"key":24906,"name":"11946ff7-7cc9-3f48-8a2f-08956eb68a2a","extension":"pdf","path":"\/v2\/attachment\/preview\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/11946ff7-7cc9-3f48-8a2f-08956eb68a2a\/Ali \u4ef7\u683c\u8ba1\u7b97\u5668.pdf","orig_name":"Ali \u4ef7\u683c\u8ba1\u7b97\u5668.pdf"}}],"commentCount":{"object_id":3854,"comment":5},"unreadComments":null,"collected_plan":54230,"projectProductTotalAmount":0,"projectProductAllAmount":true,"projectProductTotalCost":0,"projectProductAllCost":true,"projectProductTotalCount":0,"invoiced":21000,"un_invoiced":33230,"collected":0,"un_collected":54230,"is_collected":false,"handlerPerson":{"id":1004,"key":1004,"name":"\u4f0a\u5cfb\u8fb0","avatar":{"id":10,"user_id":1004,"name":"\/files\/cdn\/a57be577deb434\/avatar\/fc8d836d-8085-35fc-8a48-54a276f664a6.png"}},"remind_date":"","remind_ahead_display":"\u65e0","expire_remind_ahead_display":"\u65e0","payment_collection_remind_ahead_display":"\u63d0\u524d1\u5929","can_update":true,"can_delete":false,"unread":0,"bgcolor":"#89c541","can_view_product":true,"can_progress":true},"options":[{"key":"SalesContracts[contract_type]","name":"\u5408\u540c\u7c7b\u578b","value":[{"key":"1","name":"\u4ea7\u54c1\u9500\u552e"},{"key":"2","name":"\u8fd0\u7ef4\u670d\u52a1"}]},{"key":"SalesContracts[handler]","name":"\u5ba2\u6237\u7ecf\u7406","value":[{"key":5329,"name":"\u9ad8\u5ce5"},{"key":5332,"name":"\u970d\u536b\u8d85"},{"key":5420,"name":"\u674e\u6ea6"},{"key":1001,"name":"\u5218\u4eba\u8bda"},{"key":5087,"name":"\u5218\u5fae"},{"key":5300,"name":"\u82cf\u6e05\u4e91"},{"key":5311,"name":"\u62d3\u5c0f\u6587"},{"key":5295,"name":"\u9b4f\u6cfd\u6587"},{"key":1013,"name":"\u7fc1\u5bb6\u6210"},{"key":1004,"name":"\u4f0a\u5cfb\u8fb0"},{"key":1005,"name":"\u8d75\u6657\u7131"},{"key":0,"name":"\u516c\u6d77\u5ba2\u6237"}]}]},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-07-17 14:05:59') RETURNING "id"