|
@@ -198,6 +198,9 @@
|
|
|
<if test="type != null and type != ''">
|
|
|
and a.type = #{type}
|
|
|
</if>
|
|
|
+ <if test="year != null">
|
|
|
+ and DATE_FORMAT(a.appear_time,'%Y') = #{year}
|
|
|
+ </if>
|
|
|
${params.dataScope}
|
|
|
order by a.appear_time desc, a.create_time desc
|
|
|
</select>
|
|
@@ -290,7 +293,11 @@
|
|
|
FROM
|
|
|
centerdata_t_forest_animal a
|
|
|
LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
|
|
|
- where 1=1 ${params.dataScope}
|
|
|
+ where 1=1
|
|
|
+ <if test="year != null">
|
|
|
+ and DATE_FORMAT(a.appear_time,'%Y') = #{year}
|
|
|
+ </if>
|
|
|
+ ${params.dataScope}
|
|
|
GROUP BY
|
|
|
type
|
|
|
) b ON a.dict_value = b.type
|