Database Queries

总计40条数据
TimeDurationTypeQuery
  
11:05:07.7662.6 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH'

11:05:07.7701.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

11:05:07.7710.6 msSELECTSELECT "c".* FROM "a57be577deb434"."tbl_sales_contracts" "c" WHERE "c"."id"='3854'

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

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

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

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

11:05:07.7750.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

11:05:07.7750.7 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

11:05:07.7760.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=3816

11:05:07.7770.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_contact_points" WHERE "project_id"=3816

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

11:05:07.7791.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"

11:05:07.7810.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_sales_supplier_rels" WHERE "contract_id"=3854

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

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

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

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

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

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

11:05:07.7830.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"

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

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

11:05:07.7850.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_service_contract_remind_receivers" WHERE "contract_id"=3854

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

11:05:07.7850.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"

11:05:07.7860.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"

11:05:07.7870.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"

11:05:07.7871.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=20) AND ("object_id"=1988)

11:05:07.7890.4 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24895

11:05:07.7891.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=102) AND ("object_id"=1988)

11:05:07.7910.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24896

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

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

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

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

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

11:05:07.81315.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"

11:05:07.8310.8 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, 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, 5409, 5412, 5229, 1005, 5304, 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

11:05:07.8321.5 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 0, 263, 'v2/sales-contract/get-edit', '{"access_token":"oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH","device_type":"0","version_code":"263","id":"3854","posttime":"1752548707","token":"0a7f2ac558fcffb91eb820b133a3aea4"}', '{"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-15 11:04:56","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":6307,"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\u671f2\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"}}]}],"contractScans":[{"id":33307,"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":[],"verifyScans":[],"commentCount":{"object_id":3854,"comment":2},"unreadComments":null,"collected_plan":54230,"projectProductTotalAmount":0,"projectProductAllAmount":true,"projectProductTotalCost":0,"projectProductAllCost":true,"projectProductTotalCount":0,"invoiced":1000,"un_invoiced":53230,"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-15 11:05:07') RETURNING "id"