select temp.* from
                   (
SELECT '网关设备'              as gatewayDevice,
       wws.code            as areaCode,
       wes.code            as deviceCode,
       we.name             as deviceType,
       wes.name            as deviceName,
       wed.standard        as specs,
       DATE_FORMAT(wed.production_date, '%Y-%m-%d') as productionDate,
       DATE_FORMAT(wed.delivery_date, '%Y-%m-%d') as useDate
FROM `wl_equipment_specific` wes
         INNER JOIN wl_equipment we ON wes.equipment_code = we.code
         LEFT JOIN wl_equipment_detail wed ON wes.equipment_detail_id = wed.id
         LEFT JOIN wl_warehouse_structure wws ON wes.warehouse_structure_id = wws.id
WHERE we.CODE LIKE '3%')temp