<?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="io.renren.modules.app.dao.LiZhxxDao">
    <select id="zhxxSelect" resultType="io.renren.modules.app.entity.LiZhxxEntity" >
        SELECT
            a.dhbm,
            a.dhmc,
            b.gwhmc as gwhbm,
            c.zdmc as hwjg,
            a.lcs,
            a.drs,
            a.jsbz,
            d.gzdmc as gzdbm,
            a.xmbm,
            a.wygsbm,
            a.hwlx,
            a.zh,
            a.zmj,
            a.zje,
            a.rfmj,
            a.sfrf,
            a.zgrq,
            a.yzkm,
            a.jkmj,
            a.sfjk,
            a.nx,
            e.dwmc as dwbm
        FROM
            zhxx a,
            gwhxx b,
            zdxx c,
            gzdxx d,
            sfdw e
        WHERE
            a.dhbm = #{dhbm}
        AND a.gwhbm = b.gwhbm
        AND a.hwjg = c.zdbm
        AND d.gzdbm = a.gzdbm
        AND e.dwbm = a.dwbm
    </select>
</mapper>