Commit 600ed57f by zhangyuan

修改统计sql

parent 23d27110
......@@ -419,7 +419,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
d.dict_sort
</select>
<!-- 市直、各旗区社会组织分布折线统计-->
<!-- 市直、各旗区非公企业和社会组织已建立党组织数量分布折线统计-->
<select id="selectCurveChart" parameterType="java.util.List" resultType="java.util.Map">
SELECT
d.dict_label name,
......@@ -439,35 +439,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 全市非公企业与社会组织党委、党总支、党支部、联合党支部数量分布统计-->
<select id="selectPieChart" parameterType="java.util.List" resultType="java.util.Map">
SELECT
d.dict_label name,
(select count(0) from orhon_shzz where dept_id = d.dict_value) shzzValue,
(select count(0) from orhon_fgqy where dept_id = d.dict_value) fgqyValue
dict_label NAME,
( SELECT count( 0 ) FROM `orhon_fgqy` WHERE dzzlx = dd.dict_value GROUP BY dzzlx )
VALUE
FROM
sys_dict_data d
sys_dict_data dd
WHERE
d.dict_type = 'orhon_qyfl'
AND d.STATUS = '0'
GROUP BY
d.dict_code
dict_type = 'orhon_dzzlx'
ORDER BY
d.dict_sort
dict_sort
</select>
<!-- 市直、各旗区非公企业与社会组织统计-->
<!-- 市直、各旗区非公企业与社会组织党员人员分布统计-->
<select id="selectRadarChart" parameterType="java.util.List" resultType="java.util.Map">
SELECT
d.dict_label name,
(select count(0) from orhon_shzz where dept_id = d.dict_value) shzzValue,
(select count(0) from orhon_fgqy where dept_id = d.dict_value) fgqyValue
(select IFNULL(sum(IFNULL(dys,0)),0) from orhon_shzz where dept_id = d.dict_value) shzzDysValue,
(select IFNULL(sum(IFNULL(dys,0)),0) from orhon_fgqy where dept_id = d.dict_value) fgqyDysValue
FROM
sys_dict_data d
sys_dict_data d
WHERE
d.dict_type = 'orhon_qyfl'
AND d.STATUS = '0'
d.dict_type = 'orhon_qyfl'
AND d.STATUS = '0'
GROUP BY
d.dict_code
d.dict_code
ORDER BY
d.dict_sort
d.dict_sort
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment