新疆aed迁移

This commit is contained in:
wanghao
2025-11-27 13:29:08 +08:00
parent d7d69755a7
commit ee7ff671b5
3 changed files with 50 additions and 0 deletions
@@ -0,0 +1,50 @@
INSERT INTO aed_equipment_manger (
id,
name,
longitude,
latitude,
depart_code,
del_flag,
create_by,
create_time,
update_by,
update_time,
charge_first,
charge_first_mobile,
manage_depart_code,
manage_user_name,
manage_user_mobile,
publish_flag
)
SELECT
id,
name,
CAST(longitude AS DECIMAL(10,6)),
CAST(latitude AS DECIMAL(10,6)),
org_code,
del_flag,
create_by,
create_time,
update_by,
update_time,
manage_name,
manage_phone,
org_code,
manage_name,
manage_phone,
1
FROM xj_aed
WHERE del_flag = 0;
INSERT INTO aed_location_equipment (id, equipment_id, address, longitude, latitude)
SELECT
UUID_SHORT(),
aem.id,
xa.address,
CAST(xa.longitude AS DECIMAL(10,6)),
CAST(xa.latitude AS DECIMAL(10,6))
FROM xj_aed xa
JOIN aed_equipment_manger aem
ON xa.id = aem.id
WHERE xa.address IS NOT NULL AND xa.address <> '';