|
@@ -167,23 +167,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectRegisterAccountCount" resultType="java.util.HashMap">
|
|
|
SELECT
|
|
|
count(dept_id) `all`,
|
|
|
- count(((dept_id = 365) OR NULL)) sbj,
|
|
|
- count(((dept_id = 367) OR FIND_IN_SET(367,a.ancestors) OR NULL)) lyj,
|
|
|
- count(((dept_id = 3776) OR FIND_IN_SET(3776,a.ancestors) OR NULL)) nyncj,
|
|
|
- count(((dept_id = 3778) OR FIND_IN_SET(3778,a.ancestors) OR NULL)) slj,
|
|
|
- count(((dept_id = 3773) OR FIND_IN_SET(3773,a.ancestors) OR NULL)) sthjj,
|
|
|
- count(((dept_id = 3774) OR FIND_IN_SET(3774,a.ancestors) OR NULL)) yjglj,
|
|
|
- count(((dept_id = 3775) OR FIND_IN_SET(3775,a.ancestors) OR NULL)) jtysj,
|
|
|
- count(((dept_id = 3772) OR FIND_IN_SET(3772,a.ancestors) OR NULL)) zrzyj,
|
|
|
- count(((dept_id = 3777) OR FIND_IN_SET(3777,a.ancestors) OR NULL)) xfjyzd,
|
|
|
- count(((dept_id = 369) OR FIND_IN_SET(369,a.ancestors) OR NULL)) sls,
|
|
|
- count(((dept_id = 371) OR FIND_IN_SET(371,a.ancestors)OR NULL)) lsx,
|
|
|
- count(((dept_id = 370) OR FIND_IN_SET(370,a.ancestors)OR NULL)) ytx,
|
|
|
- count(((dept_id = 372) OR FIND_IN_SET(372,a.ancestors)OR NULL)) tdq,
|
|
|
- count(((dept_id = 373) OR FIND_IN_SET(373,a.ancestors)OR NULL)) txq,
|
|
|
- count(((dept_id = 14449) OR FIND_IN_SET(14449,a.ancestors)OR NULL)) gajjc,
|
|
|
- count(((dept_id = 14450) OR FIND_IN_SET(14450,a.ancestors)OR NULL)) gaj,
|
|
|
- count(((dept_id = 14451) OR FIND_IN_SET(14451,a.ancestors)OR NULL)) fgw
|
|
|
+ count(((dept_id = 365) OR NULL)) etk,
|
|
|
+ count(((dept_id = 314391) OR FIND_IN_SET(314391,a.ancestors) OR NULL)) zlzqz,
|
|
|
+ count(((dept_id = 314392) OR FIND_IN_SET(314392,a.ancestors) OR NULL)) ccz,
|
|
|
+ count(((dept_id = 314393) OR FIND_IN_SET(314393,a.ancestors) OR NULL)) asz,
|
|
|
+ count(((dept_id = 314394) OR FIND_IN_SET(314394,a.ancestors) OR NULL)) shmz
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
@@ -206,23 +194,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectActiveAccountCount" resultType="java.util.HashMap">
|
|
|
SELECT
|
|
|
count(1) `all`,
|
|
|
- count(((dept_id = 365) OR NULL)) sbj,
|
|
|
- count(((dept_id = 367) OR FIND_IN_SET(367,a.ancestors) OR NULL)) lyj,
|
|
|
- count(((dept_id = 3776) OR FIND_IN_SET(3776,a.ancestors) OR NULL)) nyncj,
|
|
|
- count(((dept_id = 3778) OR FIND_IN_SET(3778,a.ancestors) OR NULL)) slj,
|
|
|
- count(((dept_id = 3773) OR FIND_IN_SET(3773,a.ancestors) OR NULL)) sthjj,
|
|
|
- count(((dept_id = 3774) OR FIND_IN_SET(3774,a.ancestors) OR NULL)) yjglj,
|
|
|
- count(((dept_id = 3775) OR FIND_IN_SET(3775,a.ancestors) OR NULL)) jtysj,
|
|
|
- count(((dept_id = 3772) OR FIND_IN_SET(3772,a.ancestors) OR NULL)) zrzyj,
|
|
|
- count(((dept_id = 3777) OR FIND_IN_SET(3777,a.ancestors) OR NULL)) xfjyzd,
|
|
|
- count(((dept_id = 369) OR FIND_IN_SET(369,a.ancestors) OR NULL)) sls,
|
|
|
- count(((dept_id = 371) OR FIND_IN_SET(371,a.ancestors)OR NULL)) lsx,
|
|
|
- count(((dept_id = 370) OR FIND_IN_SET(370,a.ancestors)OR NULL)) ytx,
|
|
|
- count(((dept_id = 372) OR FIND_IN_SET(372,a.ancestors)OR NULL)) tdq,
|
|
|
- count(((dept_id = 373) OR FIND_IN_SET(373,a.ancestors)OR NULL)) txq,
|
|
|
- count(((dept_id = 14449) OR FIND_IN_SET(14449,a.ancestors)OR NULL)) gajjc,
|
|
|
- count(((dept_id = 14450) OR FIND_IN_SET(14450,a.ancestors)OR NULL)) gaj,
|
|
|
- count(((dept_id = 14451) OR FIND_IN_SET(14451,a.ancestors)OR NULL)) fgw
|
|
|
+ count(((dept_id = 365) OR NULL)) etk,
|
|
|
+ count(((dept_id = 314391) OR FIND_IN_SET(314391,a.ancestors) OR NULL)) zlzqz,
|
|
|
+ count(((dept_id = 314392) OR FIND_IN_SET(314392,a.ancestors) OR NULL)) ccz,
|
|
|
+ count(((dept_id = 314393) OR FIND_IN_SET(314393,a.ancestors) OR NULL)) asz,
|
|
|
+ count(((dept_id = 314394) OR FIND_IN_SET(314394,a.ancestors) OR NULL)) shmz
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
@@ -277,21 +253,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
'shuichi'
|
|
|
END
|
|
|
) device_type,
|
|
|
- IFNULL(dt.`梨树县`, 0) '梨树县',
|
|
|
- IFNULL(dt.`伊通县`, 0) '伊通县',
|
|
|
- IFNULL(dt.`双辽市`, 0) '双辽市',
|
|
|
- IFNULL(dt.`铁东区`, 0) '铁东区',
|
|
|
- IFNULL(dt.`铁西区`, 0) '铁西区'
|
|
|
+ IFNULL(dt.`敖勒召其镇`, 0) '敖勒召其镇',
|
|
|
+ IFNULL(dt.`城川镇`, 0) '城川镇',
|
|
|
+ IFNULL(dt.`昂素镇`, 0) '昂素镇',
|
|
|
+ IFNULL(dt.`上海庙镇`, 0) '上海庙镇'
|
|
|
FROM
|
|
|
sys_dict_data dd
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
device_type,
|
|
|
- count((qx = '梨树县' OR NULL)) '梨树县',
|
|
|
- count((qx = '伊通县' OR NULL)) '伊通县',
|
|
|
- count((qx = '双辽市' OR NULL)) '双辽市',
|
|
|
- count((qx = '铁东区' OR NULL)) '铁东区',
|
|
|
- count((qx = '铁西区' OR NULL)) '铁西区'
|
|
|
+ count((qx = '敖勒召其镇' OR NULL)) '敖勒召其镇',
|
|
|
+ count((qx = '城川镇' OR NULL)) '城川镇',
|
|
|
+ count((qx = '昂素镇' OR NULL)) '昂素镇',
|
|
|
+ count((qx = '上海庙镇' OR NULL)) '上海庙镇'
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -299,21 +273,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
d.device_type,
|
|
|
(
|
|
|
CASE
|
|
|
- WHEN find_in_set(369, sd.ancestors) > 0
|
|
|
- OR sd.dept_id = 369 THEN
|
|
|
- '双辽市'
|
|
|
- WHEN find_in_set(370, sd.ancestors) > 0
|
|
|
- OR sd.dept_id = 370 THEN
|
|
|
- '伊通县'
|
|
|
- WHEN find_in_set(371, sd.ancestors) > 0
|
|
|
- OR sd.dept_id = 371 THEN
|
|
|
- '梨树县'
|
|
|
- WHEN find_in_set(372, sd.ancestors) > 0
|
|
|
- OR sd.dept_id = 372 THEN
|
|
|
- '铁东区'
|
|
|
- WHEN find_in_set(373, sd.ancestors) > 0
|
|
|
- OR sd.dept_id = 373 THEN
|
|
|
- '铁西区'
|
|
|
+ WHEN find_in_set(314391, sd.ancestors) > 0
|
|
|
+ OR sd.dept_id = 314391 THEN
|
|
|
+ '敖勒召其镇'
|
|
|
+ WHEN find_in_set(314392, sd.ancestors) > 0
|
|
|
+ OR sd.dept_id = 314392 THEN
|
|
|
+ '城川镇'
|
|
|
+ WHEN find_in_set(314393, sd.ancestors) > 0
|
|
|
+ OR sd.dept_id = 314393 THEN
|
|
|
+ '昂素镇'
|
|
|
+ WHEN find_in_set(314394, sd.ancestors) > 0
|
|
|
+ OR sd.dept_id = 314394 THEN
|
|
|
+ '上海庙镇'
|
|
|
ELSE
|
|
|
'0'
|
|
|
END
|