17:59:07.363 | 2.2 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "id"=5250 |
17:59:07.367 | 1.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250 |
17:59:07.372 | 1.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gifts" WHERE ("created_at" >= '2025-08-21 00:00:00') AND ("created_at" <= '2025-08-21 23:59:59') AND ("serial_no" ILIKE '%ZSD-20250821-%') AND (LENGTH(serial_no) = 18) ORDER BY "serial_no" DESC |
17:59:07.373 | 0.6 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_erp_sales_gifts" WHERE "serial_no"='ZSD-20250821-00001') |
17:59:07.374 | 0.3 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"='1001') |
17:59:07.374 | 0.5 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3351') |
17:59:07.375 | 0.4 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_erp_stores" WHERE "id"='1') |
17:59:07.375 | 0.2 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250) |
17:59:07.376 | 0.8 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_products" WHERE "id"=2068 GROUP BY "id" |
17:59:07.377 | 0.7 ms | SELECT | SELECT "product_id", sum(outbound) as outbound, sum(number) as number, sum(inventory) as inventory, avg(actual_amount) as avg_amount, avg(actual_amount * inventory) as avg_total_amount, sum(actual_amount * inventory) as amount FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "product_id"=2068 GROUP BY "product_id" |
17:59:07.378 | 7.0 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_gifts" ("erp_send_type_id", "handler", "project_id", "wrote_date", "serial_no", "abstract", "description", "erp_store_id", "erp_sales_order_id", "client_id", "supplier_id", "created_by", "created_at", "verify_type", "status", "is_resubmitted", "outbound_status") VALUES (NULL, 1001, NULL, '2025-08-21', 'ZSD-20250821-00001', '', '', 1, NULL, 3351, NULL, 5250, 'now()', 1, 1, FALSE, FALSE) RETURNING "id" |
17:59:07.386 | 4.4 ms | SELECT | SELECT
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_action_logs'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.391 | 5.9 ms | SELECT | select
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_action_logs'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.397 | 11.5 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ErpSalesGifts', 5, 'a:29:{s:2:"id";i:5;s:9:"serial_no";s:18:"ZSD-20250821-00001";s:9:"from_date";N;s:10:"wrote_date";s:10:"2025-08-21";s:7:"handler";s:4:"1001";s:18:"erp_sales_order_id";s:0:"";s:11:"supplier_id";s:0:"";s:9:"client_id";s:4:"3351";s:10:"project_id";s:0:"";s:12:"erp_store_id";s:1:"1";s:6:"status";i:1;s:16:"erp_send_type_id";s:0:"";s:8:"abstract";s:0:"";s:11:"description";s:0:"";s:11:"verify_type";s:1:"1";s:16:"next_verify_user";N;s:21:"next_stop_verify_user";N;s:9:"verify_at";N;s:7:"stop_at";N;s:18:"refuse_description";N;s:14:"is_resubmitted";b:0;s:6:"number";N;s:6:"amount";N;s:10:"created_by";i:5250;s:16:"stop_description";N;s:15:"outbound_status";b:0;s:9:"is_settle";N;s:10:"created_at";s:19:"1970-01-01 08:00:00";s:10:"updated_at";N;}', '', 5250, '221.194.148.30') |
17:59:07.408 | 2.0 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=20018) AND ("object_id"=5) |
17:59:07.411 | 0.2 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_erp_sales_gift_verify_rels" WHERE "erp_sales_gift_id"=5 |
17:59:07.411 | 2.6 ms | SELECT | SELECT
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_erp_sales_gift_verify_rels'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.414 | 5.9 ms | SELECT | select
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_erp_sales_gift_verify_rels'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.420 | 4.9 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_gift_verify_rels" ("erp_sales_gift_id", "user_id", "status") VALUES (5, 1001, 0) |
17:59:07.425 | 2.9 ms | SELECT | SELECT
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_erp_sales_gift_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.428 | 6.8 ms | SELECT | select
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_erp_sales_gift_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.435 | 1.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_gift_products" ("erp_sales_gift_id", "erp_store_id", "product_id", "number", "amount", "total_amount", "description", "hardware_from", "hardware_to", "software_from", "software_to", "maintenance_from", "maintenance_to") VALUES (5, 1, 2068, '1', '0', '0', '1', NULL, NULL, NULL, NULL, NULL, NULL) RETURNING "id" |
17:59:07.437 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ErpSalesGiftProducts', 5, 'a:15:{s:2:"id";i:5;s:17:"erp_sales_gift_id";i:5;s:12:"erp_store_id";s:1:"1";s:10:"product_id";s:4:"2068";s:11:"description";s:1:"1";s:8:"outbound";N;s:6:"number";s:1:"1";s:6:"amount";s:1:"0";s:12:"total_amount";s:1:"0";s:13:"hardware_from";s:0:"";s:13:"software_from";s:0:"";s:16:"maintenance_from";s:0:"";s:11:"hardware_to";s:0:"";s:11:"software_to";s:0:"";s:14:"maintenance_to";s:0:"";}', '', 5250, '221.194.148.30') |
17:59:07.439 | 1.6 ms | SELECT | SELECT eip.* FROM "a57be577deb434"."tbl_erp_inventory_products" "eip" LEFT JOIN "a57be577deb434"."tbl_products" "p" ON eip.product_id = p.id LEFT JOIN "a57be577deb434"."tbl_product_brands" "pb" ON p.product_brand = pb.id LEFT JOIN "a57be577deb434"."tbl_product_types" "pt" ON p.product_type = pt.id LEFT JOIN "a57be577deb434"."tbl_product_series" "ps" ON p.product_serie = ps.id LEFT JOIN "a57be577deb434"."tbl_product_components" "pc" ON p.product_component = pc.id WHERE (eip.inventory > 0) AND ("eip"."product_id"='2068') GROUP BY "eip"."id" ORDER BY eip.wrote_date ASC, eip.created_at ASC |
17:59:07.441 | 3.0 ms | SELECT | SELECT
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_erp_sales_gift_spent_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.444 | 7.7 ms | SELECT | select
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_erp_sales_gift_spent_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.452 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "inventory"='2198' WHERE "id"=2 |
17:59:07.453 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpInventoryProducts', 2, 'a:1:{s:9:"inventory";i:2198;}', '', 5250, '221.194.148.30') |
17:59:07.454 | 1.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_gift_spent_products" ("erp_sales_gift_id", "erp_sales_gift_product_id", "erp_inventory_product_id", "product_id", "number", "amount", "total_amount") VALUES (5, 5, 2, 2068, '1', '0', '0') RETURNING "id" |
17:59:07.456 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ErpSalesGiftSpentProducts', 5, 'a:12:{s:2:"id";i:5;s:17:"erp_sales_gift_id";i:5;s:25:"erp_sales_gift_product_id";i:5;s:24:"erp_inventory_product_id";i:2;s:10:"product_id";s:4:"2068";s:11:"description";N;s:6:"number";s:1:"1";s:6:"amount";s:1:"0";s:12:"total_amount";i:0;s:13:"cancel_number";N;s:13:"cancel_amount";N;s:19:"cancel_total_amount";N;}', '', 5250, '221.194.148.30') |
17:59:07.457 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gift_verify_rels" WHERE ("status"=0) AND ("erp_sales_gift_id"=5) ORDER BY "id" |
17:59:07.457 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_gifts" SET "amount"='0', "number"='1', "next_verify_user"=1001 WHERE "id"=5 |
17:59:07.458 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpSalesGifts', 5, 'a:1:{s:6:"amount";i:0;}', '', 5250, '221.194.148.30') |
17:59:07.459 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gifts" WHERE "id"=5 |
17:59:07.460 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=2 |
17:59:07.460 | 0.4 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.461 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.461 | 0.2 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.461 | 0.2 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.461 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "inventory"='2199' WHERE "id"=2 |
17:59:07.462 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpInventoryProducts', 2, 'a:1:{s:9:"inventory";i:2199;}', '', 5250, '221.194.148.30') |
17:59:07.465 | 2.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE "id"=2 |
17:59:07.467 | 3.0 ms | SELECT | SELECT
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_erp_purchase_inbound_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.470 | 8.1 ms | SELECT | select
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_erp_purchase_inbound_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.479 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbound_products" SET "inventory"='2199' WHERE "id"=2 |
17:59:07.480 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpPurchaseInboundProducts', 2, 'a:0:{}', '', 5250, '221.194.148.30') |
17:59:07.481 | 1.1 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbounds" SET "is_used"=TRUE WHERE "id"=1 |
17:59:07.483 | 1.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
17:59:07.486 | 1.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE 0=1 |
17:59:07.489 | 1.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
17:59:07.490 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gifts" WHERE "id"=5 |
17:59:07.490 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_sales_gift_id"=5 |
17:59:07.491 | 0.1 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_sales_gift_id"=5 |
17:59:07.491 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gift_spent_products" WHERE "erp_sales_gift_id"=5 |
17:59:07.491 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=2 |
17:59:07.492 | 3.1 ms | SELECT | SELECT
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_erp_inventory_product_spents'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.495 | 11.7 ms | SELECT | select
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_erp_inventory_product_spents'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.507 | 5.0 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_inventory_product_spents" ("erp_sales_gift_id", "wrote_date", "erp_sales_gift_spent_product_id", "erp_inventory_product_id", "outbound", "amount", "total_amount", "sales_outbound", "actual_amount", "actual_total_amount") VALUES (5, '2025-08-21', 5, 2, '1', '0', '0', '1', '34167.8228', '34167.8228') |
17:59:07.512 | 1.0 ms | UPDATE | UPDATE "a57be577deb434"."tbl_products" SET "updated_at"='now()' WHERE "id"=2068 |
17:59:07.513 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=2 |
17:59:07.514 | 0.2 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.514 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.514 | 0.2 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.515 | 0.2 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.515 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "outbound"='24', "inventory"='2198', "sales_outbound"='4' WHERE "id"=2 |
17:59:07.516 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpInventoryProducts', 2, 'a:3:{s:8:"outbound";s:2:"24";s:9:"inventory";i:2198;s:14:"sales_outbound";s:1:"4";}', '', 5250, '221.194.148.30') |
17:59:07.517 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE "id"=2 |
17:59:07.517 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbound_products" SET "inventory"='2198', "sales_outbound"='4' WHERE "id"=2 |
17:59:07.518 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpPurchaseInboundProducts', 2, 'a:2:{s:9:"inventory";i:2198;s:14:"sales_outbound";s:1:"3";}', '', 5250, '221.194.148.30') |
17:59:07.519 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbounds" SET "is_used"=TRUE WHERE "id"=1 |
17:59:07.519 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
17:59:07.520 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE 0=1 |
17:59:07.520 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
17:59:07.520 | 0.2 ms | SELECT | SELECT SUM(inventory) FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "product_id"=2068 |
17:59:07.521 | 0.2 ms | SELECT | SELECT SUM(inventory * amount) FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "product_id"=2068 |
17:59:07.521 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "actual_amount"='34167.744' WHERE "product_id"=2068 |
17:59:07.522 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "actual_total_amount"=actual_amount * inventory WHERE "product_id"=2068 |
17:59:07.522 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpInventoryProducts', 2, 'a:0:{}', '', 5250, '221.194.148.30') |
17:59:07.523 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=2 |
17:59:07.524 | 0.2 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.524 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.524 | 0.2 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.524 | 0.2 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=2 |
17:59:07.525 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "inventory"='2198' WHERE "id"=2 |
17:59:07.526 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpInventoryProducts', 2, 'a:0:{}', '', 5250, '221.194.148.30') |
17:59:07.526 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE "id"=2 |
17:59:07.527 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbound_products" SET "inventory"='2198' WHERE "id"=2 |
17:59:07.528 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpPurchaseInboundProducts', 2, 'a:0:{}', '', 5250, '221.194.148.30') |
17:59:07.528 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbounds" SET "is_used"=TRUE WHERE "id"=1 |
17:59:07.529 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
17:59:07.529 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE 0=1 |
17:59:07.530 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
17:59:07.530 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250 |
17:59:07.530 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gift_verify_rels" WHERE ("status"=0) AND ("erp_sales_gift_id"=5) ORDER BY "id" |
17:59:07.531 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_gifts" WHERE "id"=5 |
17:59:07.533 | 0.3 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250) |
17:59:07.533 | 4.6 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_comments" ("created_by", "object_type", "object_id", "description", "is_system", "description2") VALUES (5250, '20011', 5, '董荣 有一个赠送单需要审批', TRUE, 'ZSD-20250821-00001') RETURNING "id" |
17:59:07.538 | 0.7 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\Comments', 186634, 'a:11:{s:2:"id";i:186634;s:9:"object_id";i:5;s:11:"object_type";s:5:"20011";s:6:"parent";N;s:11:"description";s:37:"董荣 有一个赠送单需要审批";s:10:"created_by";i:5250;s:10:"created_at";N;s:8:"reply_to";N;s:9:"is_system";b:1;s:8:"for_user";N;s:12:"description2";s:18:"ZSD-20250821-00001";}', '', 5250, '221.194.148.30') |
17:59:07.539 | 2.7 ms | SELECT | SELECT
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_unread_comments'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.542 | 6.4 ms | SELECT | select
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_unread_comments'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.549 | 6.6 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_unread_comments" ("object_id", "object_type", "comment_id", "remind_user_id") VALUES (5, '20011', 186634, 1001) |
17:59:07.556 | 0.3 ms | SELECT | SELECT "channel_id" FROM "global"."tbl_logins" WHERE ("id"=1001) AND ("id" != 5250) AND (channel_id IS NOT NULL) |
17:59:07.557 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250 |
17:59:07.570 | 1.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3351 |
17:59:07.573 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=5250 |
17:59:07.573 | 4.0 ms | SELECT | SELECT
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_object_change_logs'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:59:07.577 | 5.6 ms | SELECT | select
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_object_change_logs'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:59:07.584 | 8.6 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_object_change_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "description") VALUES (1, 'create', 5, 20011, 5250, '2025-08-21 17:59:07', '{"id":5,"serial_no":"ZSD-20250821-00001","from_date":null,"wrote_date":"2025-08-21","handler":1001,"erp_sales_order_id":null,"supplier_id":null,"client_id":3351,"project_id":null,"erp_store_id":1,"status":1,"erp_send_type_id":null,"abstract":"","description":"","verify_type":1,"next_verify_user":1001,"next_stop_verify_user":null,"verify_at":null,"stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"0","created_by":5250,"stop_description":null,"outbound_status":false,"is_settle":false,"created_at":"2025-08-21 17:59:07","updated_at":"2025-08-21 17:59:07"}', '{"id":5,"serial_no":"ZSD-20250821-00001","from_date":null,"wrote_date":"2025-08-21","handler":1001,"erp_sales_order_id":null,"supplier_id":null,"client_id":3351,"project_id":null,"erp_store_id":1,"status":1,"erp_send_type_id":null,"abstract":"","description":"","verify_type":1,"next_verify_user":1001,"next_stop_verify_user":null,"verify_at":null,"stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"0","created_by":5250,"stop_description":null,"outbound_status":false,"is_settle":false,"created_at":"2025-08-21 17:59:07","updated_at":"2025-08-21 17:59:07"}', '{"d1":"\u8463\u8363","d2":"\u521b\u5efa\u4e86","d3":"\u8d60\u9001\u5355\u7533\u8bf7","d4":[]}') RETURNING "id" |
17:59:07.592 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ObjectChangeLogs', 554141, 'a:13:{s:2:"id";i:554141;s:9:"object_id";i:5;s:11:"object_type";i:20011;s:9:"target_id";N;s:18:"target_object_type";N;s:3:"act";i:1;s:9:"attribute";s:6:"create";s:9:"old_value";s:592:"{"id":5,"serial_no":"ZSD-20250821-00001","from_date":null,"wrote_date":"2025-08-21","handler":1001,"erp_sales_order_id":null,"supplier_id":null,"client_id":3351,"project_id":null,"erp_store_id":1,"status":1,"erp_send_type_id":null,"abstract":"","description":"","verify_type":1,"next_verify_user":1001,"next_stop_verify_user":null,"verify_at":null,"stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"0","created_by":5250,"stop_description":null,"outbound_status":false,"is_settle":false,"created_at":"2025-08-21 17:59:07","updated_at":"2025-08-21 17:59:07"}";s:9:"new_value";s:592:"{"id":5,"serial_no":"ZSD-20250821-00001","from_date":null,"wrote_date":"2025-08-21","handler":1001,"erp_sales_order_id":null,"supplier_id":null,"client_id":3351,"project_id":null,"erp_store_id":1,"status":1,"erp_send_type_id":null,"abstract":"","description":"","verify_type":1,"next_verify_user":1001,"next_stop_verify_user":null,"verify_at":null,"stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"0","created_by":5250,"stop_description":null,"outbound_status":false,"is_settle":false,"created_at":"2025-08-21 17:59:07","updated_at":"2025-08-21 17:59:07"}";s:11:"description";s:93:"{"d1":"\u8463\u8363","d2":"\u521b\u5efa\u4e86","d3":"\u8d60\u9001\u5355\u7533\u8bf7","d4":[]}";s:10:"created_by";i:5250;s:10:"created_at";s:19:"2025-08-21 17:59:07";s:9:"is_delete";N;}', '', 5250, '221.194.148.30') |
17:59:07.594 | 1.0 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 5250, 5, 'vue/erp-sales-gift/save-new', '{"ErpSalesGifts":{"id":"","auto_id":"3351","auto_name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8","auto_type":"client","erp_send_type_id":"","handler":"1001","project_id":"","wrote_date":"2025-08-21","serial_no":"ZSD-20250821-00001","erpSalesGiftVerifyRels":["1001"],"abstract":"","description":"","erp_store_id":"1","erp_store_name":"\u62d3\u5b9e\u4ed3\u5e93","erp_sales_order_id":"","client_id":"3351","client_name":"\u4e2d\u56fd\u8239\u8236\u96c6\u56e2\u98ce\u7535\u53d1\u5c55\u6709\u9650\u516c\u53f8","supplier_id":"","supplier_name":"","erpSalesGiftProducts":{"new":[{"product_id":"2068","number":"1","amount":"0","total_amount":"0","description":"1","hardware_from":"","software_from":"","maintenance_from":"","hardware_to":"","software_to":"","maintenance_to":"","erp_store_id":"1","is_check":"0","erpSalesGiftSpentProducts":""}]},"files":""},"web_access_token":"Hlx8YTe3FkcNxEqlCJZ_DGFFJXaYQnju"}', '{"code":2000,"result":{"id":5},"status":1,"msg":[{"name":"success","success":"\u65b0\u8d60\u9001\u5355\u5df2\u521b\u5efa\u6210\u529f","error":""}],"mod":0}', FALSE, '2025-08-21 17:59:07') RETURNING "id" |