select temp.* from (
SELECT
       fe.code                            as deviceCode,
       fe.name                            as deviceName,
       (SELECT wws.code
        from wl_warehouse_structure wws
        where wws.id = fe.risk_source_id) as areaCode,
       '换流变'                              as deviceType
FROM `f_equipment` fe

              )temp