09:39:19.447 | 2.3 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "id"=1001 |
09:39:19.450 | 1.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
09:39:19.453 | 5.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_sales_outbounds'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.459 | 4.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_outbounds'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.465 | 0.7 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE ("created_at" >= '2025-09-12 00:00:00') AND ("created_at" <= '2025-09-12 23:59:59') AND ("serial_no" ILIKE '%XSCKD-20250912-%') AND (LENGTH(serial_no) = 20) ORDER BY "serial_no" DESC |
09:39:19.466 | 0.3 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "serial_no"='XSCKD-20250912-00001') |
09:39:19.467 | 0.2 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"='1001') |
09:39:19.467 | 0.5 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='1661') |
09:39:19.467 | 0.4 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"='3959') |
09:39:19.468 | 0.2 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_erp_stores" WHERE "id"='1') |
09:39:19.468 | 0.2 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001) |
09:39:19.469 | 0.3 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_erp_sales_orders" WHERE "id"='1586') |
09:39:19.469 | 2.8 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_order_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.472 | 4.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_sales_order_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.477 | 1.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_order_products" WHERE "id"=1878 |
09:39:19.478 | 0.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_products" WHERE "id"=1040 GROUP BY "id" |
09:39:19.479 | 0.5 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"=1040 GROUP BY "product_id" |
09:39:19.480 | 4.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_outbounds" ("client_id", "erp_send_type_id", "handler", "project_id", "wrote_date", "serial_no", "abstract", "description", "erp_store_id", "erp_sales_order_id", "created_by", "created_at", "verify_type", "status", "is_resubmitted", "outbound_status") VALUES (1661, NULL, 1001, 3959, '2025-09-12', 'XSCKD-20250912-00001', '', '', 1, 1586, 1001, 'now()', 2, 1, FALSE, FALSE) RETURNING "id" |
09:39:19.485 | 2.3 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\ErpSalesOutbounds', 22, 'a:29:{s:2:"id";i:22;s:9:"serial_no";s:20:"XSCKD-20250912-00001";s:9:"from_date";N;s:10:"wrote_date";s:10:"2025-09-12";s:7:"handler";s:4:"1001";s:18:"erp_sales_order_id";s:4:"1586";s:9:"client_id";s:4:"1661";s:10:"project_id";s:4:"3959";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:"2";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:1001;s:16:"stop_description";N;s:15:"outbound_status";b:0;s:9:"is_settle";N;s:7:"is_used";N;s:10:"created_at";s:19:"1970-01-01 08:00:00";s:10:"updated_at";N;}', '', 1001, '114.246.237.213') |
09:39:19.487 | 1.9 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=20012) AND ("object_id"=22) |
09:39:19.490 | 3.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_outbound_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.494 | 3.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_outbound_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.498 | 3.6 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_outbound_products" ("erp_sales_outbound_id", "erp_sales_order_id", "erp_sales_order_product_id", "erp_store_id", "product_id", "number", "amount", "total_amount", "description", "hardware_from", "hardware_to", "software_from", "software_to", "maintenance_from", "maintenance_to") VALUES (22, 1586, 1878, 1, 1040, '1', '788888.00', '788888.00', '', NULL, NULL, NULL, NULL, NULL, NULL) RETURNING "id" |
09:39:19.502 | 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\ErpSalesOutboundProducts', 58, 'a:17:{s:2:"id";i:58;s:21:"erp_sales_outbound_id";i:22;s:18:"erp_sales_order_id";s:4:"1586";s:26:"erp_sales_order_product_id";s:4:"1878";s:12:"erp_store_id";s:1:"1";s:10:"product_id";s:4:"1040";s:11:"description";s:0:"";s:8:"outbound";N;s:6:"number";s:1:"1";s:6:"amount";s:9:"788888.00";s:12:"total_amount";s:9:"788888.00";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:"";}', '', 1001, '114.246.237.213') |
09:39:19.504 | 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_inventory_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.507 | 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_erp_inventory_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.517 | 7.4 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 LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbounds" "epis" ON epis.id = eip.erp_purchase_inbound_id LEFT JOIN "a57be577deb434"."tbl_erp_purchase_inbound_projects" "epips" ON epis.id = epips.erp_purchase_inbound_id LEFT JOIN "a57be577deb434"."tbl_erp_inventory_starts" "eiss" ON eiss.id = eip.erp_inventory_start_id LEFT JOIN "a57be577deb434"."tbl_erp_inventory_builds" "eibs" ON eibs.id = eip.erp_inventory_build_id LEFT JOIN "a57be577deb434"."tbl_erp_purchase_gifts" "epgs" ON epgs.id = eip.erp_purchase_gift_id WHERE (eip.inventory > 0) AND ("eip"."product_id"='1040') GROUP BY "eip"."id" ORDER BY eip.wrote_date DESC, eip.created_at DESC |
09:39:19.525 | 2.5 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_outbound_spent_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.528 | 3.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_outbound_spent_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.532 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "inventory"='5' WHERE "id"=107 |
09:39:19.533 | 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', 107, 'a:1:{s:9:"inventory";i:5;}', '', 1001, '114.246.237.213') |
09:39:19.534 | 2.9 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_sales_outbound_spent_products" ("erp_sales_outbound_id", "erp_sales_outbound_product_id", "erp_inventory_product_id", "product_id", "number", "amount", "total_amount") VALUES (22, 58, 107, 1040, '1', '788888.00', '788888') RETURNING "id" |
09:39:19.537 | 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\ErpSalesOutboundSpentProducts', 63, 'a:12:{s:2:"id";i:63;s:21:"erp_sales_outbound_id";i:22;s:29:"erp_sales_outbound_product_id";i:58;s:24:"erp_inventory_product_id";i:107;s:10:"product_id";s:4:"1040";s:11:"description";N;s:6:"number";s:1:"1";s:6:"amount";s:9:"788888.00";s:12:"total_amount";d:788888;s:13:"cancel_number";N;s:13:"cancel_amount";N;s:19:"cancel_total_amount";N;}', '', 1001, '114.246.237.213') |
09:39:19.538 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" WHERE ("status"=0) AND ("erp_sales_outbound_id"=22) ORDER BY "id" |
09:39:19.539 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_outbounds" SET "amount"='788888', "number"='1', "next_verify_user"=NULL WHERE "id"=22 |
09:39:19.540 | 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\ErpSalesOutbounds', 22, 'a:1:{s:6:"amount";d:788888;}', '', 1001, '114.246.237.213') |
09:39:19.540 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "id"=22 |
09:39:19.541 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=107 |
09:39:19.542 | 0.9 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.543 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.543 | 0.2 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.544 | 0.2 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.544 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "outbound"='0', "inventory"='6' WHERE "id"=107 |
09:39:19.545 | 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', 107, 'a:1:{s:9:"inventory";s:1:"5";}', '', 1001, '114.246.237.213') |
09:39:19.546 | 0.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE 0=1 |
09:39:19.548 | 1.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
09:39:19.551 | 2.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE "id"=2 |
09:39:19.553 | 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_erp_inventory_build_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.556 | 3.5 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_build_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.560 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_build_products" SET "inventory"='6' WHERE "id"=2 |
09:39:19.561 | 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\ErpInventoryBuildProducts', 2, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.562 | 1.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
09:39:19.564 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "id"=22 |
09:39:19.564 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_sales_outbound_id"=22 |
09:39:19.565 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbound_spent_products" WHERE "erp_sales_outbound_id"=22 |
09:39:19.565 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_sales_outbound_spent_product_id"=63 |
09:39:19.565 | 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_inventory_product_spents'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.568 | 6.0 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 |
09:39:19.575 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=107 |
09:39:19.575 | 3.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_inventory_product_spents" ("erp_sales_outbound_id", "wrote_date", "erp_sales_outbound_spent_product_id", "erp_inventory_product_id", "actual_amount", "amount", "outbound", "total_amount", "sales_outbound", "actual_total_amount") VALUES (22, '2025-09-12', 63, 107, '18', '788888.00', '1', '788888', '1', '18') RETURNING "id" |
09:39:19.579 | 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\ErpInventoryProductSpents', 91, 'a:25:{s:2:"id";i:91;s:21:"erp_purchase_order_id";N;s:23:"erp_purchase_inbound_id";N;s:24:"erp_inventory_product_id";i:107;s:10:"wrote_date";s:10:"2025-09-12";s:13:"actual_amount";s:2:"18";s:19:"actual_total_amount";i:18;s:8:"outbound";i:1;s:6:"amount";s:9:"788888.00";s:12:"total_amount";d:788888;s:13:"lost_outbound";N;s:29:"erp_inventory_lost_product_id";N;s:21:"erp_inventory_lost_id";N;s:22:"erp_inventory_start_id";N;s:22:"erp_inventory_build_id";N;s:20:"build_spent_outbound";N;s:36:"erp_inventory_build_spent_product_id";N;s:28:"erp_inventory_build_spent_id";N;s:14:"sales_outbound";i:1;s:35:"erp_sales_outbound_spent_product_id";i:63;s:21:"erp_sales_outbound_id";i:22;s:20:"erp_purchase_gift_id";N;s:19:"sales_gift_outbound";N;s:31:"erp_sales_gift_spent_product_id";N;s:17:"erp_sales_gift_id";N;}', '', 1001, '114.246.237.213') |
09:39:19.580 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_outbounds" SET "is_used"=FALSE WHERE "id"=22 |
09:39:19.581 | 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\ErpSalesOutbounds', 22, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.582 | 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_products'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.585 | 4.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_products'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.590 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_products" SET "updated_at"='now()' WHERE "id"=1040 |
09:39:19.591 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=107 |
09:39:19.591 | 0.2 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.591 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.592 | 0.2 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.592 | 0.2 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.592 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "outbound"='1', "inventory"='5', "sales_outbound"='1' WHERE "id"=107 |
09:39:19.593 | 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', 107, 'a:2:{s:8:"outbound";s:1:"0";s:9:"inventory";i:5;}', '', 1001, '114.246.237.213') |
09:39:19.594 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE 0=1 |
09:39:19.594 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
09:39:19.594 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE "id"=2 |
09:39:19.595 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_build_products" SET "inventory"='5', "sales_outbound"='1' WHERE "id"=2 |
09:39:19.595 | 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\ErpInventoryBuildProducts', 2, 'a:1:{s:9:"inventory";i:5;}', '', 1001, '114.246.237.213') |
09:39:19.596 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbounds" SET "is_used"=TRUE WHERE "id"=2 |
09:39:19.597 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
09:39:19.598 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_settings" WHERE "setting_key"='erp_cost_type' |
09:39:19.598 | 2.5 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_settings'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
09:39:19.601 | 3.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_settings'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
09:39:19.605 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_settings" WHERE "setting_key"='erp_decimal_point' |
09:39:19.605 | 0.2 ms | SELECT | SELECT SUM(inventory) FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "product_id"=1040 |
09:39:19.605 | 0.2 ms | SELECT | SELECT SUM(inventory * amount) FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "product_id"=1040 |
09:39:19.606 | 1.3 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "actual_amount"='18' WHERE "product_id"=1040 |
09:39:19.607 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "actual_total_amount"=actual_amount * inventory WHERE "product_id"=1040 |
09:39:19.608 | 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', 107, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.609 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_orders" WHERE "id"='1586' |
09:39:19.610 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_order_products" WHERE "erp_sales_order_id"=1586 |
09:39:19.610 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbound_products" WHERE "erp_sales_order_product_id"=1878 |
09:39:19.611 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "id"=22 |
09:39:19.611 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbound_spent_products" WHERE "erp_sales_outbound_product_id"=58 |
09:39:19.611 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_order_products" SET "outbound"='1' WHERE "id"=1878 |
09:39:19.612 | 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\ErpSalesOrderProducts', 1878, 'a:1:{s:8:"outbound";s:1:"0";}', '', 1001, '114.246.237.213') |
09:39:19.613 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_orders" SET "outbound_status"=TRUE, "is_used"=TRUE WHERE "id"=1586 |
09:39:19.614 | 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\ErpSalesOrders', 1586, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.615 | 1.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id"=4140 |
09:39:19.616 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contracts" SET "is_outbound"=TRUE WHERE "id"=4140 |
09:39:19.617 | 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\SalesContracts', 4140, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.618 | 1.8 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=1661 |
09:39:19.620 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=3959 |
09:39:19.621 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_products" WHERE "id"=107 |
09:39:19.622 | 0.2 ms | SELECT | SELECT SUM(outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.622 | 0.2 ms | SELECT | SELECT SUM(lost_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.622 | 0.1 ms | SELECT | SELECT SUM(build_spent_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.622 | 0.1 ms | SELECT | SELECT SUM(sales_outbound) FROM "a57be577deb434"."tbl_erp_inventory_product_spents" WHERE "erp_inventory_product_id"=107 |
09:39:19.623 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_products" SET "inventory"='5' WHERE "id"=107 |
09:39:19.623 | 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', 107, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.624 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_inbound_products" WHERE 0=1 |
09:39:19.624 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_start_products" WHERE 0=1 |
09:39:19.625 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_inventory_build_products" WHERE "id"=2 |
09:39:19.625 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_inventory_build_products" SET "inventory"='5' WHERE "id"=2 |
09:39:19.626 | 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\ErpInventoryBuildProducts', 2, 'a:0:{}', '', 1001, '114.246.237.213') |
09:39:19.627 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_purchase_inbounds" SET "is_used"=TRUE WHERE "id"=2 |
09:39:19.627 | 0.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_purchase_gift_products" WHERE 0=1 |
09:39:19.628 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
09:39:19.628 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbound_verify_rels" WHERE ("status"=0) AND ("erp_sales_outbound_id"=22) ORDER BY "id" |
09:39:19.628 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_erp_sales_outbounds" SET "status"=2, "verify_at"='now()', "updated_at"='now()' WHERE "id"=22 |
09:39:19.629 | 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\ErpSalesOutbounds', 22, 'a:1:{s:9:"verify_at";s:5:"now()";}', '', 1001, '114.246.237.213') |
09:39:19.630 | 0.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_outbounds" WHERE "id"=22 |
09:39:19.631 | 2.0 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_ticket_change_logs" ("status", "ticket_type", "serial_no", "wrote_date", "description", "abstract", "amount", "client_id", "supplier_id", "contact_id", "user_id", "created_by", "created_at", "updated_at", "object_id", "verify_at") VALUES (2, 20008, 'XSCKD-20250912-00001', '2025-09-12', '', '', '788888', 1661, NULL, NULL, NULL, 1001, '2025-09-12 09:39:19', '2025-09-12 09:39:19', 22, '2025-09-12 09:39:19.628972+08') RETURNING "id" |
09:39:19.633 | 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\ErpTicketChangeLogs', 485, 'a:17:{s:2:"id";i:485;s:9:"serial_no";s:20:"XSCKD-20250912-00001";s:11:"ticket_type";i:20008;s:10:"wrote_date";s:10:"2025-09-12";s:6:"status";i:2;s:11:"supplier_id";N;s:9:"client_id";i:1661;s:8:"abstract";s:0:"";s:11:"description";s:0:"";s:9:"verify_at";s:29:"2025-09-12 09:39:19.628972+08";s:10:"created_by";i:1001;s:10:"created_at";s:19:"2025-09-12 09:39:19";s:10:"updated_at";s:19:"2025-09-12 09:39:19";s:10:"contact_id";N;s:7:"user_id";N;s:6:"amount";s:6:"788888";s:9:"object_id";i:22;}', '', 1001, '114.246.237.213') |
09:39:19.634 | 1.6 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_erp_ticket_change_log_handlers" ("erp_ticket_change_log_id", "user_id") VALUES (485, 1001) |
09:39:19.636 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
09:39:19.636 | 1.0 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', 22, 20008, 1001, '2025-09-12 09:39:19', '{"id":22,"serial_no":"XSCKD-20250912-00001","from_date":null,"wrote_date":"2025-09-12","handler":1001,"erp_sales_order_id":1586,"client_id":1661,"project_id":3959,"erp_store_id":1,"status":2,"erp_send_type_id":null,"abstract":"","description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"verify_at":"now()","stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"788888","created_by":1001,"stop_description":null,"outbound_status":false,"is_settle":false,"is_used":false,"created_at":"2025-09-12 09:39:19","updated_at":"1970-01-01 08:00:00"}', '{"id":22,"serial_no":"XSCKD-20250912-00001","from_date":null,"wrote_date":"2025-09-12","handler":1001,"erp_sales_order_id":1586,"client_id":1661,"project_id":3959,"erp_store_id":1,"status":2,"erp_send_type_id":null,"abstract":"","description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"verify_at":"now()","stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"788888","created_by":1001,"stop_description":null,"outbound_status":false,"is_settle":false,"is_used":false,"created_at":"2025-09-12 09:39:19","updated_at":"1970-01-01 08:00:00"}', '{"d1":"\u5218\u4eba\u8bda","d2":"\u521b\u5efa\u4e86","d3":"\u9500\u552e\u51fa\u5e93\u5355\u7533\u8bf7","d4":[]}') RETURNING "id" |
09:39:19.638 | 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\ObjectChangeLogs', 565167, 'a:13:{s:2:"id";i:565167;s:9:"object_id";i:22;s:11:"object_type";i:20008;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:600:"{"id":22,"serial_no":"XSCKD-20250912-00001","from_date":null,"wrote_date":"2025-09-12","handler":1001,"erp_sales_order_id":1586,"client_id":1661,"project_id":3959,"erp_store_id":1,"status":2,"erp_send_type_id":null,"abstract":"","description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"verify_at":"now()","stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"788888","created_by":1001,"stop_description":null,"outbound_status":false,"is_settle":false,"is_used":false,"created_at":"2025-09-12 09:39:19","updated_at":"1970-01-01 08:00:00"}";s:9:"new_value";s:600:"{"id":22,"serial_no":"XSCKD-20250912-00001","from_date":null,"wrote_date":"2025-09-12","handler":1001,"erp_sales_order_id":1586,"client_id":1661,"project_id":3959,"erp_store_id":1,"status":2,"erp_send_type_id":null,"abstract":"","description":"","verify_type":2,"next_verify_user":null,"next_stop_verify_user":null,"verify_at":"now()","stop_at":null,"refuse_description":null,"is_resubmitted":false,"number":"1","amount":"788888","created_by":1001,"stop_description":null,"outbound_status":false,"is_settle":false,"is_used":false,"created_at":"2025-09-12 09:39:19","updated_at":"1970-01-01 08:00:00"}";s:11:"description";s:111:"{"d1":"\u5218\u4eba\u8bda","d2":"\u521b\u5efa\u4e86","d3":"\u9500\u552e\u51fa\u5e93\u5355\u7533\u8bf7","d4":[]}";s:10:"created_by";i:1001;s:10:"created_at";s:19:"2025-09-12 09:39:19";s:9:"is_delete";N;}', '', 1001, '114.246.237.213') |
09:39:19.639 | 3.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_visit_module_histories" WHERE ("user_id"=1001) AND ("object_type"=20000) AND ("visit_date"='2025-09-12') |
09:39:19.642 | 0.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_visit_module_histories" SET "num"=100, "last_visit_at"='now()' WHERE "id"=56537 |
09:39:19.643 | 0.9 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/erp-sales-outbound/save-new', '{"ErpSalesOutbounds":{"id":"","client_id":"1661","client_name":"\u5317\u4eac\u7f51\u4fe1\u5143\u79d1\u6280\u6709\u9650\u516c\u53f8","erp_send_type_id":"","handler":"1001","project_id":"3959","wrote_date":"2025-09-12","serial_no":"XSCKD-20250912-00001","erpSalesOutboundVerifyRels":"","abstract":"","description":"","erp_store_id":"1","erp_store_name":"\u62d3\u5b9e\u4ed3\u5e93","erp_sales_order_id":"1586","erpSalesOutboundProducts":{"new":[{"product_id":"1040","number":"1","amount":"788888.00","total_amount":"788888.00","description":"","hardware_from":"","software_from":"","maintenance_from":"","hardware_to":"","software_to":"","maintenance_to":"","erp_sales_order_product_id":"1878","erp_store_id":"1","is_check":"0","erpSalesOutboundSpentProducts":""}]},"files":""},"web_access_token":"2BZqbE639wqIoHhgH0VfUgn-meZYtkbz"}', '{"code":2000,"result":{"id":22},"status":1,"msg":[{"name":"success","success":"\u65b0\u9500\u552e\u51fa\u5e93\u5355\u5df2\u521b\u5efa\u6210\u529f","error":""}],"mod":0}', FALSE, '2025-09-12 09:39:19') RETURNING "id" |