| | |
| | | </resultMap> |
| | | |
| | | <select id="selectUserPage" resultMap="userResultMap"> |
| | | select * from blade_user |
| | | select * from blade_user |
| | | where is_deleted = 0 |
| | | <if test="tenantId!=null and tenantId != ''"> |
| | | and tenant_id = #{tenantId} |
| | |
| | | |
| | | |
| | | <select id="selectUserPages" resultMap="userResultMaps"> |
| | | select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate ) from blade_user s |
| | | select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate ) from blade_user s |
| | | LEFT JOIN sys_position p ON p.snumber = s.CODE |
| | | LEFT JOIN sys_enclosure e ON e.anumber = s.CODE |
| | | left join |
| | |
| | | </select> |
| | | |
| | | <select id="selectUserPagetxl" resultMap="userResultMaps"> |
| | | select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate ) from blade_user s |
| | | select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate ) from blade_user s |
| | | LEFT JOIN sys_position p ON p.snumber = s.CODE |
| | | LEFT JOIN sys_enclosure e ON e.anumber = s.CODE |
| | | left join |
| | |
| | | where bu.region_id is not null |
| | | group by bu.region_id |
| | | </select> |
| | | |
| | | <!-- 统计六大队伍数量 --> |
| | | <select id="getUserTypeCount" resultType="org.springblade.modules.system.vo.UserRegisterStatisVO"> |
| | | SELECT |
| | | '治保会队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424615693403414529' |
| | | UNION ALL |
| | | SELECT |
| | | '内保干部队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424615773594312705' |
| | | UNION ALL |
| | | SELECT |
| | | '治安巡防队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424615835435130881' |
| | | UNION ALL |
| | | SELECT |
| | | '信息员队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424615909959524354' |
| | | UNION ALL |
| | | SELECT |
| | | '保安员队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424615972718895106' |
| | | UNION ALL |
| | | SELECT |
| | | '警务辅助队伍' AS region, |
| | | count( * ) num |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | dept.id = '1424616047083905026' |
| | | </select> |
| | | </mapper> |