<?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.zjrs.zwnw.portal.entity.VDwgrYjfkMapper">

    <select id="getYjfkList" parameterType="com.zjrs.zwnw.portal.dto.GetYjfkListDTO" resultType="HashMap">
        select v.rs_wb_yjfk_lsh as "rswbyjfklsh",
        v.fksj as "fksj",
        v.sjly as "sjly",
        v.sfyhf as "sfyhf",
        v.hfsj as "hfsj",
        v.mc as "mc",
        v.sjhm as "sjhm" from v_dwgr_yjfk v
        where 1=1
        <if test="dto.sfyhf != null and dto.sfyhf != ''">
            and v.sfyhf = #{dto.sfyhf}
        </if>
        order by v.fksj DESC
    </select>

    <select id="getYjfk" parameterType="String" resultType="HashMap">
        select v.rs_wb_yjfk_lsh as "rswbyjfklsh",
        v.fksj as "fksj",
        v.sjly as "sjly",
        v.sfyhf as "sfyhf",
        v.hfsj as "hfsj",
        v.mc as "mc",
        v.sjhm as "sjhm",
        v.fknr as "fknr",
        v.clyj as "clyj",
        v.tyccid as "tyccid"
        from v_dwgr_yjfk v
        where rs_wb_yjfk_lsh = #{lsh}
    </select>

</mapper>
