Database Queries

总计22条数据
TimeDurationTypeQuery
  
18:00:24.7280.9 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "id"=1001

18:00:24.7300.7 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001

18:00:24.7310.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_ledgers" WHERE "is_stop"=FALSE ORDER BY "id"

18:00:24.7398.4 msSELECTSELECT "t"."id" AS "object_id", "e"."id" AS "event_id", "t"."serial_no" AS "serial_no", "t"."verify_at" AS "verify_at", "e"."settle_at" AS "settle_at", "t"."created_at" AS "created_at", "e"."amount" AS "amount", "t"."client_id" AS "client_id", "t"."supplier_id" AS "supplier_id", "t"."contact_id" AS "contact_id", CASE WHEN COUNT(DISTINCT u.department_id) = 1 THEN MIN(u.department_id) ELSE NULL END AS "department_id", CASE WHEN COUNT(DISTINCT h.user_id) = 1 THEN MIN(h.user_id) ELSE NULL END AS "handler_id", "t"."created_by" AS "created_by", "e"."erp_bank_id" AS "erp_bank_id", "b"."serial_no" AS "bank_serial_no" FROM "a57be577deb434"."tbl_erp_other_income_ticket_bank_ins" "e" INNER JOIN "a57be577deb434"."tbl_erp_other_income_tickets" "t" ON e.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_erp_banks" "b" ON b.id = e.erp_bank_id LEFT JOIN "a57be577deb434"."tbl_erp_other_income_ticket_handlers" "h" ON h.erp_other_income_ticket_id = t.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON u.id = h.user_id WHERE (("t"."id"=37) AND ("e"."id"=42)) AND ("t"."status"=2) AND (NOT ("t"."verify_at" IS NULL)) AND (NOT ("e"."settle_at" IS NULL)) AND ("e"."amount" > 0) GROUP BY "t"."id", "t"."serial_no", "t"."verify_at", "t"."created_at", "t"."client_id", "t"."supplier_id", "t"."contact_id", "t"."created_by", "e"."id", "e"."settle_at", "e"."amount", "e"."erp_bank_id", "b"."serial_no"

18:00:24.75116.6 msSELECTSELECT "r"."taxonomy_id" AS "taxonomy_id", "tt"."name" AS "income_name", "tt"."serial_no" AS "income_serial_no", COALESCE(r.in_amount, 0) AS "amount" FROM "a57be577deb434"."tbl_term_taxonomy_relationships" "r" LEFT JOIN "a57be577deb434"."tbl_term_taxonomies" "tt" ON tt.id = r.taxonomy_id WHERE ("r"."term_id"=20) AND ("r"."object_type"=14) AND ("r"."object_id"=37) ORDER BY "r"."id"

18:00:24.7726.3 msSELECTSELECT "id", "name" FROM "a57be577deb434"."tbl_suppliers" WHERE "id"=100

18:00:24.7837.8 msSELECTSELECT "id", "name", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5252

18:00:24.7948.5 msSELECTSELECT "id", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=6

18:00:24.8065.7 msSELECTSELECT "id", "serial_no", "title", "parent_id", "is_auxiliary_customer", "is_auxiliary_supplier" FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("ledger_id"=1) AND ("is_delete"=FALSE) ORDER BY "serial_no", "id"

18:00:24.8155.7 msSELECTSELECT "erp_bank_id", "ledger_account_caption_id" FROM "a57be577deb434"."tbl_ledger_banks" WHERE (("ledger_id"=1) AND ("is_delete"=FALSE)) AND (NOT ("erp_bank_id" IS NULL)) AND (NOT ("ledger_account_caption_id" IS NULL))

18:00:24.8253.0 msSELECTSELECT "id", "type", "serial_no", "title" FROM "a57be577deb434"."tbl_ledger_auxiliary_items" WHERE ("ledger_id"=1) AND ("is_delete"=FALSE)

18:00:24.82911.6 msSELECTSELECT "attachment_id" FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_id"=37) AND ("object_type" IN (20052, 20027)) ORDER BY "id"

18:00:24.84610.4 msSELECTSELECT d.nspname AS table_schema, c.relname AS table_name, a.attname AS column_name, t.typname AS data_type, a.attlen AS character_maximum_length, pg_catalog.col_description(c.oid, a.attnum) AS column_comment, a.atttypmod AS modifier, a.attnotnull = false AS is_nullable, CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default, coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc, array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values, CASE atttypid WHEN 21 /*int2*/ THEN 16 WHEN 23 /*int4*/ THEN 32 WHEN 20 /*int8*/ THEN 64 WHEN 1700 /*numeric*/ THEN CASE WHEN atttypmod = -1 THEN null ELSE ((atttypmod - 4) >> 16) & 65535 END WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/ WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/ ELSE null END AS numeric_precision, CASE WHEN atttypid IN (21, 23, 20) THEN 0 WHEN atttypid IN (1700) THEN CASE WHEN atttypmod = -1 THEN null ELSE (atttypmod - 4) & 65535 END ELSE null END AS numeric_scale, CAST( information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t)) AS numeric ) AS size, a.attnum = any (ct.conkey) as is_pkey FROM pg_class c LEFT JOIN pg_attribute a ON a.attrelid = c.oid LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_namespace d ON d.oid = c.relnamespace LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p' WHERE a.attnum > 0 and t.typname != '' and c.relname = 'tbl_ledger_ticket_items' and d.nspname = 'a57be577deb434' ORDER BY a.attnum;

18:00:24.85715.5 msSELECTselect ct.conname as constraint_name, a.attname as column_name, fc.relname as foreign_table_name, fns.nspname as foreign_table_schema, fa.attname as foreign_column_name from (SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s FROM pg_constraint ct ) AS ct inner join pg_class c on c.oid=ct.conrelid inner join pg_namespace ns on c.relnamespace=ns.oid inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s] left join pg_class fc on fc.oid=ct.confrelid left join pg_namespace fns on fc.relnamespace=fns.oid left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s] where ct.contype='f' and c.relname='tbl_ledger_ticket_items' and ns.nspname='a57be577deb434' order by fns.nspname, fc.relname, a.attnum

18:00:24.8771.3 msSELECTSELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE "id"=4)

18:00:24.8790.4 msSELECTSELECT "id" FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("id"=4) AND ("ledger_id"=1) AND ("is_delete"=FALSE)

18:00:24.8790.4 msSELECTSELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("ledger_id"=1) AND ("parent_id"=4) AND ("is_delete"=FALSE))

18:00:24.8800.3 msSELECTSELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE "id"=118)

18:00:24.8810.3 msSELECTSELECT "id" FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("id"=118) AND ("ledger_id"=1) AND ("is_delete"=FALSE)

18:00:24.8810.3 msSELECTSELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_ledger_account_captions" WHERE ("ledger_id"=1) AND ("parent_id"=118) AND ("is_delete"=FALSE))

18:00:24.8826.1 msSELECTSELECT COALESCE(max("serial_no"), 0) + 1 FROM "a57be577deb434"."tbl_ledger_tickets" WHERE ("ledger_id"=1) AND ("ticket_date"='2026-07-31') AND ("ticket_word"=1)

18:00:24.8901.8 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/voucher-center/get-generate', '{"voucher_date_type":"5","type":"1","entry_type":"1","date_to":"2026-07-31","bills":[{"object_type":"20015","object_id":"37","event_type":"2","event_id":"42"}]}', '{"code":2000,"result":{"summary":{"source_count":1,"ticket_count":1,"balanced_count":1,"error_count":0,"unbalanced_count":0,"total_amount":703.6},"list":[{"ticket_key":"tmp_1","original_index":1,"ledger_id":1,"ticket_date":"2026-07-31","period":"202607","ticket_word":1,"ticket_word_display":"\u6536","serial_no":1,"serial_no_display":"001","ticket_no_display":"\u6536-202607-001","is_estimated_serial_no":true,"ticket_count":1,"source_count":1,"type":1,"ledger_status":1,"source_line_display":"\u5176\u4ed6\u6536\u5165\u5355 \u00b7 QTSRD-20260320-00001","source_sub_line_display":"\u6d3e\u62d3\u7f51\u7edc(\u4e0a\u6d77)\u6709\u9650\u8d23\u4efb\u516c\u53f8\u5317\u4eac\u5206\u516c\u53f8 \u00b7 \u8d22\u52a1\u90e8","source_amount_display":703.6,"source_bills":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42,"object_type_name":"\u5176\u4ed6\u6536\u5165\u5355","bill_no":"QTSRD-20260320-00001","bill_date":"2026-03-20","amount":703.6,"partner_name":"\u6d3e\u62d3\u7f51\u7edc(\u4e0a\u6d77)\u6709\u9650\u8d23\u4efb\u516c\u53f8\u5317\u4eac\u5206\u516c\u53f8","department":"\u8d22\u52a1\u90e8"}],"can_generate_serial_no":true,"items":[{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":4,"account_caption_display":"100202 \u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","auxiliary_item_id":null,"accountCaption":{"key":4,"name":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","serial_no":"100202","title":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"703.60","credit_amount":"0.00","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]},{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-\u8fd4\u70b9\u83b7\u5229\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":118,"account_caption_display":"5051 \u5176\u4ed6\u4e1a\u52a1\u6536\u5165","auxiliary_item_id":null,"accountCaption":{"key":118,"name":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","serial_no":"5051","title":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"0.00","credit_amount":"703.60","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]}],"files":[32445],"debit_total":703.6,"credit_total":703.6,"diff_amount":0,"diff_abs_amount":0,"status":"balanced","status_display":"\u501f\u8d37\u5e73\u8861","errors":[],"LedgerTickets":{"ledger_id":1,"ticket_date":"2026-07-31","ticket_word":1,"serial_no":1,"ticket_count":1,"type":1,"status":1,"items":[{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":4,"account_caption_display":"100202 \u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","auxiliary_item_id":null,"accountCaption":{"key":4,"name":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","serial_no":"100202","title":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"703.60","credit_amount":"0.00","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]},{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-\u8fd4\u70b9\u83b7\u5229\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":118,"account_caption_display":"5051 \u5176\u4ed6\u4e1a\u52a1\u6536\u5165","auxiliary_item_id":null,"accountCaption":{"key":118,"name":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","serial_no":"5051","title":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"0.00","credit_amount":"703.60","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]}],"files":[32445]},"model":{"ledger_id":1,"ticket_date":"2026-07-31","period":"202607","ticket_word":1,"ticket_word_display":"\u6536","serial_no":1,"serial_no_display":"001","ticket_no_display":"\u6536-202607-001","ticket_count":1,"type":1,"status":1,"items":[{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":4,"account_caption_display":"100202 \u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","auxiliary_item_id":null,"accountCaption":{"key":4,"name":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","serial_no":"100202","title":"\u4e2d\u56fd\u5efa\u8bbe\u94f6\u884c\u5317\u4eac\u91d1\u6e90\u652f\u884c11050161620000001495","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"703.60","credit_amount":"0.00","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]},{"summary":"\u6536\u5230\u5176\u4ed6\u6536\u5165-\u8fd4\u70b9\u83b7\u5229\u6536\u5165-QTSRD-20260320-00001","ledger_account_caption_id":118,"account_caption_display":"5051 \u5176\u4ed6\u4e1a\u52a1\u6536\u5165","auxiliary_item_id":null,"accountCaption":{"key":118,"name":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","serial_no":"5051","title":"\u5176\u4ed6\u4e1a\u52a1\u6536\u5165","balance":"0","auxiliary_types":[],"auxiliary_type_display":"","can_auxiliary":false,"is_cash_equivalent":false},"auxiliaryItem":null,"auxiliary_item_display":"","cashItem":null,"debit_amount":"0.00","credit_amount":"703.60","source_refs":[{"object_type":20015,"object_id":37,"event_type":2,"event_id":42}],"errors":[]}],"files":[32445],"attachment_count":1,"debit_total":703.6,"credit_total":703.6}}]},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"39.156.194.178","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko\/20100101 Firefox\/152.0"}', FALSE, '2026-07-07 18:00:24', 165796864) RETURNING "id"