修改xml
This commit is contained in:
parent
0f0ce60ef9
commit
6faaa71bf5
|
@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="perId != null "> and a.per_id = #{perId}</if>
|
||||
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
|
||||
<if test="branchId != null "> and a.branch_id = #{branchId}</if>
|
||||
<if test="year != null and year != ''"> and DATE_FORMAT(a.finish_date,'%Y') = #{year}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -221,6 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
finish_date
|
||||
|
||||
<if test="status != null "> and a.status = #{status}</if>
|
||||
<if test="year != null and year != ''"> and DATE_FORMAT(a.finish_date,'%Y') = #{year}</if>
|
||||
</select>
|
||||
|
||||
<select id="deptTree" parameterType="TAmentPartyAffairs" resultType="map">
|
||||
|
@ -296,6 +298,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
t_ament_party_affairs a
|
||||
where a.degree = 1
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
group by a.type,a.shot_name
|
||||
</select>
|
||||
|
||||
|
@ -352,6 +357,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t_ament_party_affairs
|
||||
WHERE
|
||||
type = '党务及意识形态'
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
shot_name
|
||||
</select>
|
||||
|
@ -365,6 +373,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t_ament_party_affairs
|
||||
WHERE
|
||||
type = '党风廉政建设'
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
shot_name
|
||||
</select>
|
||||
|
@ -377,6 +388,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t_ament_party_affairs
|
||||
WHERE
|
||||
type = '日常考核指标'
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
shot_name
|
||||
</select>
|
||||
|
@ -389,6 +403,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t_ament_party_affairs
|
||||
WHERE
|
||||
type = '季度考核指标'
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
shot_name
|
||||
</select>
|
||||
|
@ -403,6 +420,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t_ament_party_affairs a LEFT JOIN sys_dept d on a.dept_id = d.dept_id
|
||||
WHERE
|
||||
a.type IN ( '日常考核指标', '季度考核指标' ) and a.dept_id != 100
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
a.dept_id,
|
||||
a.type
|
||||
|
@ -417,6 +437,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ROUND(IF( SUM( now_score ), SUM( now_score ), 0 )/ SUM( score )*100) percent
|
||||
FROM
|
||||
t_ament_party_affairs
|
||||
WHERE 1=1
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(finish_date, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
type
|
||||
</select>
|
||||
|
|
|
@ -42,8 +42,10 @@
|
|||
GROUP_CONCAT( '{"label":"', trade_type, '","trade":', trade_mony, ',"count":', trade_count, '}' ) json
|
||||
FROM
|
||||
t_ament_trade
|
||||
WHERE
|
||||
month_of LIKE CONCAT( '%', DATE_FORMAT( NOW(), '%Y' ), '%' )
|
||||
WHERE 1=1
|
||||
<if test="year != null and year != ''">
|
||||
AND DATE_FORMAT(month_of, '%Y') = #{year}
|
||||
</if>
|
||||
GROUP BY
|
||||
month_of,
|
||||
type
|
||||
|
|
Loading…
Reference in New Issue