|
|
@ -199,18 +199,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
ON ps.facility_code = dgsd.gantry_code |
|
|
|
AND |
|
|
|
<if test="periodType == 1"> |
|
|
|
YEAR(dgsd.statistical_date) = #{startDate} |
|
|
|
YEAR(dgsd.statistical_date) = #{startDate} AND |
|
|
|
</if> |
|
|
|
<if test="periodType == 3"> |
|
|
|
DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} |
|
|
|
DATE_FORMAT(dgsd.statistical_date, '%Y-%m') = #{startDate} AND |
|
|
|
</if> |
|
|
|
<if test="periodType == 4"> |
|
|
|
DATE(dgsd.statistical_date) = DATE(#{startDate}) |
|
|
|
<if test="periodType == 4 and startDate !=null and endDate !=null" > |
|
|
|
dgsd.statistical_date BETWEEN DATE(#{startDate}) and DATE(#{endDate}) AND |
|
|
|
</if> |
|
|
|
<if test="periodType == 4 and startDate !=null and endDate ==null" > |
|
|
|
DATE(dgsd.statistical_date) = DATE(#{startDate}) AND |
|
|
|
</if> |
|
|
|
<if test="periodType == 5"> |
|
|
|
DATE(dgsd.statistical_date) = DATE(#{startDate}) |
|
|
|
DATE(dgsd.statistical_date) = DATE(#{startDate}) AND |
|
|
|
</if> |
|
|
|
AND dgsd.period_type = #{periodType} |
|
|
|
|
|
|
|
dgsd.period_type = #{periodType} |
|
|
|
ORDER BY |
|
|
|
dgsd.statistical_date DESC |
|
|
|
</select> |
|
|
|