<?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.ggfw.rlzysc.entity.YgbaygTempMapper">

    <select id="importHzList"  resultType="com.zjrs.ggfw.rlzysc.dto.YgbargtempTjListDTO">
        select drph,
            COUNT(1) drzs,
            COUNT(CASE WHEN drjg = '1' THEN 1 ELSE null END) drcgs,
            COUNT(CASE WHEN drjg = '0' THEN 1  ELSE null END) drsbs
        from v_rs_rlzy_ygbayg_temp where drph = #{ drph }
        group by drph
    </select>

</mapper>
