Database Queries

总计48条数据
TimeDurationTypeQuery
  
20:58:25.7692.8 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH'

20:58:25.7721.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

20:58:25.7740.6 msSELECTSELECT "c".* FROM "a57be577deb434"."tbl_sales_contracts" "c" WHERE "c"."id"='3816'

20:58:25.7750.5 msSELECTSELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=12

20:58:25.7760.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_users" WHERE "id"=5300

20:58:25.7760.3 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5300)

20:58:25.7770.4 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=3794

20:58:25.7770.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"=3794

20:58:25.7780.5 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"=3794

20:58:25.7790.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=3794

20:58:25.7790.5 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id"=608

20:58:25.7800.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_products" WHERE "id"=1770

20:58:25.7810.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_types" WHERE "id"=11

20:58:25.7810.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_components" WHERE "id"=179

20:58:25.7810.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=43

20:58:25.7820.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_series" WHERE "id"=1495

20:58:25.7820.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_units" WHERE "id"=3

20:58:25.7830.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_project_contact_points" WHERE "project_id"=3794

20:58:25.7831.7 msSELECTSELECT "id", "project_id" FROM "a57be577deb434"."tbl_sales_order_items" WHERE ("is_system"=TRUE) AND ("project_id"=3794)

20:58:25.7851.5 msSELECTSELECT "project_id", sum(amount) AS sum FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (3, 2)) AND ("project_id"=3794) GROUP BY "project_id"

20:58:25.7861.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_sales_supplier_rels" WHERE "contract_id"=3816

20:58:25.7880.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id"=608

20:58:25.7880.3 msSELECTSELECT "id", "id" AS "key", "serial_no" FROM "a57be577deb434"."tbl_purchase_contracts" WHERE "id"=3819

20:58:25.7880.3 msSELECTSELECT "id", "id" AS "key", "type" AS "name" FROM "a57be577deb434"."tbl_contract_types" WHERE "id"=1

20:58:25.7890.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5300

20:58:25.7890.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5300)

20:58:25.7890.2 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=1

20:58:25.7900.2 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5300

20:58:25.7900.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5300)

20:58:25.7900.4 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE ("reminded"=FALSE) AND ("contract_id"=3816) ORDER BY "remind_date"

20:58:25.7910.2 msSELECTSELECT "id", "id" AS "key", "contract_id", "remind_date" AS "name" FROM "a57be577deb434"."tbl_service_contract_remind_dates" WHERE "contract_id"=3816

20:58:25.7910.3 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_remind_receivers" WHERE "contract_id"=3816

20:58:25.7920.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_service_contract_remind_receivers" WHERE "contract_id"=3816

20:58:25.7920.3 msSELECTSELECT "id", "user_id", "user_id" AS "key", "contract_id" FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" WHERE "contract_id"=3816

20:58:25.7920.2 msSELECTSELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id" IN (5300, 5388, 1001)

20:58:25.7930.2 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id" IN (1001, 5388, 5300))

20:58:25.7930.4 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"=3816 ORDER BY "remind_date"

20:58:25.7940.4 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"=3816 ORDER BY "id"

20:58:25.7940.5 msSELECTSELECT "id", "id" AS "key", "contract_id", "amount" AS "value", "attachment_id", "from_date" FROM "a57be577deb434"."tbl_sales_contract_invoices" WHERE "contract_id"=3816 ORDER BY "id"

20:58:25.7951.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=105) AND ("object_id"=3816)

20:58:25.7960.4 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24526

20:58:25.7971.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=106) AND ("object_id"=3816)

20:58:25.7980.2 msSELECTSELECT "id", "id" AS "key", "name", "extension", "path", "orig_name" FROM "a57be577deb434"."tbl_attachments" WHERE "id"=24560

20:58:25.7981.1 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=107) AND ("object_id"=3816)

20:58:25.80018.1 msSELECTSELECT "object_id", count(*) AS comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=7) AND ("object_id"=3816) GROUP BY "object_id"

20:58:25.81816.7 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"=3816) GROUP BY "object_id"

20:58:25.8380.9 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

20:58:25.8401.9 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 2, 1141, 'v2/sales-contract/get-edit', '{"access_token":"oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH","device_type":"2","id":"3816","posttime":"1752670720","token":"eda5081663017c7a1fb38602f6e37dfc","version_code":"1141"}', '{"code":200,"data":{"model":{"id":3816,"client_id":12,"signed_at":"2025-03-06","amount":"511","handler":5300,"description":"","created_by":5300,"created_at":"2025-03-06 19:44:56","updated_at":"2025-03-14 17:29:50","contract_scan":null,"receipt_scan":null,"contract_type":1,"project_id":3794,"valid_date":null,"expire_date":"2026-03-05","sla":"","remind_ahead":"","expire_remind_ahead":"","expire_reminded":false,"serial_no":"SMC\u5317\u4eac\u8ba2\u5355POBJ25031110","payment_collection_remind_ahead":"1 day","from_project":3794,"receipt_date":null,"verify_date":null,"including_tax":true,"build_by_project":true,"need_analysis":true,"is_settle":true,"is_deliver":true,"is_outbound":true,"is_save_collection":true,"save_collection_at":"2025-03-06 19:45:22.44096+08","client":{"id":12,"key":12,"name":"smc(\u4e2d\u56fd)\u6709\u9650\u516c\u53f8\/SMC(\u5317\u4eac)\u5236\u9020\u6709\u9650\u516c\u53f8","logo":null,"sales_rep":5300,"salesRep":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"}}},"project":{"id":3794,"key":3794,"name":"POBJ25031110-\u56fa\u6001\u786c\u76d8-G-2025"},"fromProject":{"id":3794,"key":3794,"name":"POBJ25031110-\u56fa\u6001\u786c\u76d8-G-2025","description":"","total_contact_point":null,"paid_contact_point":null,"is_sales_order_ready":true,"project_product_version_id":800,"bargain_date":"2025-03-06","collected":"0","profit_pct":"41.41","budget":"511","projectProductTypes":[{"id":6105,"product_type_id":2,"key":2,"name":"\u670d\u52a1\u5668","budget":"511.00","pct":"41.41","project_id":3794,"profit":"211.6051"}],"projectProductRels":[{"id":8996,"project_id":3794,"product_id":1770,"amount":"511.00","number":1,"cost":"256.00","description":"","supplier_id":608,"hardware_from":null,"software_from":null,"maintenance_from":null,"hardware_to":null,"software_to":null,"maintenance_to":null,"total_amount":"511","total_cost":"256","supplier":{"id":608,"key":608,"name":"\u6dd8\u5b9d\u7f51"},"product":{"id":1770,"name":"BG5 512G 2230 PCIE4.0NVME\u56fa\u6001\u786c\u76d8","product_type":11,"product_component":179,"product_brand":43,"product_serie":1495,"product_misc":null,"product_qa":null,"pn":"","description":"","created_by":1013,"created_at":"2024-08-29 14:10:56","updated_at":"2024-08-29 14:10:56","pinyin_shortcut":"BG5512G2230PCIE40NVMEgtyp","product_unit":3,"is_renew":false,"productType":{"id":11,"key":11,"name":"\u4e2a\u4eba\u8ba1\u7b97\u673a"},"productComponent":{"id":179,"key":179,"name":"\u914d\u4ef6"},"productBrand":{"id":43,"key":43,"name":"\u4e1c\u829d"},"productSerie":{"id":1495,"key":1495,"name":"\u4e1c\u829d BG5 512G 2230 PCIE4.0NVME\u56fa\u6001\u786c\u76d8"},"productUnit":{"id":3,"key":3,"name":"\u4e2a"}}}],"projectContactPoints":[],"buildSalesOrderItems":[{"id":12709,"project_id":3794}],"reimbursementAmountSum":null,"profit":211.6051,"contact_points_status_display":"\u672a\u8bbe\u7f6e"},"salesSupplierRels":[{"id":2505,"contract_id":3816,"supplier_id":608,"purchase_id":3819,"supplier":{"id":608,"key":608,"name":"\u6dd8\u5b9d\u7f51"},"purchase":{"id":3819,"key":3819,"serial_no":"\u8ba2\u5355\u53f7: 4256424362229592710"}}],"contractScan":null,"receiptScan":null,"contractType":{"id":1,"key":1,"name":"\u4ea7\u54c1\u9500\u552e"},"createdBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1,"avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"},"department":{"id":1,"key":1,"name":"\u9500\u552e\u90e8"}},"handleBy":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","department_id":1,"avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"}},"remindDate":null,"serviceContractRemindDates":[],"salesContractRemindReceivers":[],"serviceContractRemindReceivers":[],"salesContractPaymentCollectionRemindReceivers":[{"id":8047,"user_id":5300,"key":5300,"contract_id":3816,"user":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","sex":"F","avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.png"}}},{"id":8048,"user_id":5388,"key":5388,"contract_id":3816,"user":{"id":5388,"key":5388,"name":"\u6768\u71d5\u971e","sex":"F","avatar":{"id":156,"user_id":5388,"name":"\/files\/cdn\/a57be577deb434\/avatar\/b8d4f68f-e736-3c38-9e2f-1ab47885b3d8.png"}}},{"id":8049,"user_id":1001,"key":1001,"contract_id":3816,"user":{"id":1001,"key":1001,"name":"\u5218\u4eba\u8bda","sex":"M","avatar":{"id":2,"user_id":1001,"name":"\/files\/cdn\/a57be577deb434\/avatar\/9f73cfbd-bae6-3b50-b7ac-61b936c40727.png"}}}],"salesContractPaymentCollectionRemindDates":[{"id":2356,"key":2356,"contract_id":3816,"name":"2025-04-18","value":"511","overdue_days":null,"pct":100,"collect_status":"\u903e\u671f89\u5929"}],"salesContractPayments":[],"salesContractInvoices":[],"contractScans":[{"id":32908,"object_type":105,"object_id":3816,"attachment_id":24526,"attachment":{"id":24526,"key":24526,"name":"9748514a-8585-353f-bfcf-d5f7c3e95cdf","extension":"pdf","path":"\/v2\/attachment\/preview\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/9748514a-8585-353f-bfcf-d5f7c3e95cdf\/POBJ25031110.pdf","orig_name":"POBJ25031110.pdf"}}],"receiptScans":[{"id":32906,"object_type":106,"object_id":3816,"attachment_id":24560,"attachment":{"id":24560,"key":24560,"name":"58432bf9-3e54-36b5-8fe6-fdec985e30f6","extension":"pdf","path":"\/v2\/attachment\/preview\/oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH\/58432bf9-3e54-36b5-8fe6-fdec985e30f6\/2025_03_14_15_33_53.pdf","orig_name":"2025_03_14_15_33_53.pdf"}}],"verifyScans":[],"commentCount":{"object_id":3816,"comment":6},"unreadComments":null,"collected_plan":511,"projectProductTotalAmount":511,"projectProductAllAmount":true,"projectProductTotalCost":256,"projectProductAllCost":true,"projectProductTotalCount":1,"invoiced":0,"un_invoiced":511,"collected":0,"un_collected":511,"is_collected":false,"handlerPerson":{"id":5300,"key":5300,"name":"\u82cf\u6e05\u4e91","avatar":{"id":141,"user_id":5300,"name":"\/files\/cdn\/a57be577deb434\/avatar\/14dfd1a0-6df5-354a-8afd-f0a76fa8e852.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-16 20:58:25') RETURNING "id"