<?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.ruoyi.report.mapper.RzlInventStatisticsInfoMapper">


 <select id="listByReport" resultType="map">
 select  modify_city_code,year_batch,month_batch,count(*) total_cnt 
 from d_patent_effective_info  where 1=1 and patent_type='发明'
 <if test="year != null  and year != ''">and `year_batch`=#{year} </if> <if test="month != null  and month != ''">and `month_batch`=#{month} </if>
group by  modify_city_code,year_batch,month_batch 
 </select>

</mapper>