<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.unis.basic.info.modular.aisleInfo.mapper.AisleInfoMapper">

    <select id="findPage" resultType="java.util.Map">
        SELECT
        a.id,
        a.ajcd,
        a.ajsjcr,
        a.ajdh,
        a.ajgd,
        a.ajkd,
        a.ajmc,
        a.ajqyrq,
        case a.ajzt when '1' then '完好' when '2' then '需小修' when '2' then '需小修' when '3' then '需大修' when '4' then '待报废' when '5' then '待拆除' when '6' then '死角仓' else '其他' end ajzt,
        a.cfbh,
        a.tyajbm,
        b.storehouse_name storehouse_name,
        c.org_name org_name
        FROM
        depot_qh.basic_unit_aisle a
        LEFT JOIN depot_qh.basic_storehouse b on a.basic_storehouse_id = b.storehouse_id
        left join depot_qh.org_info c on c.org_id = a.org_id
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
        order  by a.id desc
    </select>
</mapper>