| | |
| | | import org.springblade.modules.system.excel.UserImporters; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.vo.UserRegisterStatisVO; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.system.vo.UsersVo; |
| | | import org.springblade.modules.system.wrapper.UserWrapper; |
| | | import org.springblade.modules.taskqd.vo.TaskqdVO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | return R.status(status); |
| | | } |
| | | |
| | | /** |
| | | * 人员统计 |
| | | */ |
| | | @GetMapping("/userCount") |
| | | public R cancelTask(String xid,String index) { |
| | | List<UserRegisterStatisVO> cout = userService.getUserTypeCountXq(xid); |
| | | List<UserVO> list = userService.getUserTypeList(xid,index); |
| | | Map<String,Object> res = new HashMap<>(); |
| | | res.put("cout",cout); |
| | | res.put("list",list); |
| | | return R.data(res); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.vo.UserDistrictStatisVO; |
| | | import org.springblade.modules.system.vo.UserRegisterStatisVO; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.system.vo.UsersVo; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | List<UserRegisterStatisVO> getUserTypeCount(); |
| | | List<UserRegisterStatisVO> getUserTypeCountXq(String xid); |
| | | List<UserVO> getUserTypeList(String xid, String index); |
| | | |
| | | List<UserDistrictStatisVO> getUserDistrictTypeCount(); |
| | | |
| | |
| | | dept.id = '1424616047083905026' |
| | | </select> |
| | | |
| | | <!-- 按辖区统计六大队伍数量 --> |
| | | <select id="getUserTypeCountXq" 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' and bu.jurisdiction = #{xid} |
| | | 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' and bu.jurisdiction = #{xid} |
| | | 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' and bu.jurisdiction = #{xid} |
| | | 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' and bu.jurisdiction = #{xid} |
| | | 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' and bu.jurisdiction = #{xid} |
| | | 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' and bu.jurisdiction = #{xid} |
| | | 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 = '1416225906918195201' and bu.jurisdiction = #{xid} |
| | | </select> |
| | | |
| | | <!-- 按辖区统计六大队伍数量 --> |
| | | <select id="getUserTypeList" resultType="org.springblade.modules.system.vo.UserVO"> |
| | | SELECT |
| | | bu.* |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN blade_dept dept ON substring_index( substring_index( bu.dept_id, ',', 3 ), ',',- 1 ) = dept.id |
| | | WHERE |
| | | bu.jurisdiction = "1415620815526883329" |
| | | <if test="index == 1"> |
| | | AND dept.id = '1424615693403414529' |
| | | </if> |
| | | <if test="index == 2"> |
| | | AND dept.id = '1424615773594312705' |
| | | </if> |
| | | <if test="index == 3"> |
| | | AND dept.id = '1424615835435130881' |
| | | </if> |
| | | <if test="index == 4"> |
| | | AND dept.id = '1424615909959524354' |
| | | </if> |
| | | <if test="index == 5"> |
| | | AND dept.id = '1424615972718895106' |
| | | </if> |
| | | <if test="index == 6"> |
| | | AND dept.id = '1424616047083905026' |
| | | </if> |
| | | <if test="index == 7"> |
| | | AND dept.id ='1416225906918195201' |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getUserDistrictTypeCount" resultType="org.springblade.modules.system.vo.UserDistrictStatisVO"> |
| | | SELECT |
| | | br.NAME AS region, |
| | |
| | | * 统计六大队伍 |
| | | */ |
| | | List<UserRegisterStatisVO> getUserTypeCount(); |
| | | List<UserRegisterStatisVO> getUserTypeCountXq(String xid); |
| | | List<UserVO> getUserTypeList(String xid,String index); |
| | | |
| | | List<UserDistrictStatisVO> getUserDistrictTypeCount(); |
| | | |
| | |
| | | public List<UserRegisterStatisVO> getUserTypeCount() { |
| | | return baseMapper.getUserTypeCount(); |
| | | } |
| | | @Override |
| | | public List<UserRegisterStatisVO> getUserTypeCountXq(String xid) { |
| | | return baseMapper.getUserTypeCountXq(xid); |
| | | } |
| | | @Override |
| | | public List<UserVO> getUserTypeList(String xid,String index) { |
| | | return baseMapper.getUserTypeList(xid,index); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserDistrictStatisVO> getUserDistrictTypeCount() { |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | return R.status(taskqdService.updateSerid(rid, resid, newteam, newnum)); |
| | | } |
| | | |
| | | @GetMapping("/taskCount") |
| | | public R cancelTask(String id,String type) { |
| | | List<Map<String,Object>> cout = taskqdService.taskCount(id,type); |
| | | List<TaskqdVO> list = taskqdService.getlist(id,type); |
| | | Map<String,Object> res = new HashMap<>(); |
| | | res.put("ywc",cout.get(0).get("count")); |
| | | res.put("wwc",cout.get(1).get("count")); |
| | | res.put("data",list); |
| | | return R.data(res); |
| | | } |
| | | |
| | | } |
| | |
| | | boolean updateSerid(String rid,String serid,String newteam,int newnum); |
| | | List<Taskqd> selectList(Integer id); |
| | | List<Map<String, Object>> queryReceiver(String serid); |
| | | List<Map<String, Object>> taskCount(String id,String type); |
| | | List<TaskqdVO> getlist(String id,String type); |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | |
| | | </update> |
| | | |
| | | <!--日常任务列表--> |
| | | <select id="getlist" resultMap="taskResultMap"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | sys_taskqd |
| | | WHERE |
| | | serid LIKE concat("%",#{id},"%") |
| | | <if test="type == 3"> |
| | | and rtype = 1 |
| | | </if> |
| | | <if test="type == 2"> |
| | | AND ( rtype = "0" OR rtype = "2" ) |
| | | </if> |
| | | </select> |
| | | |
| | | <!--任务统计--> |
| | | <select id="selectList" resultMap="taskResultMap"> |
| | | select jnum, num, serid, team |
| | | from sys_taskqd |
| | | where id = #{id} |
| | | </select> |
| | | <select id="taskCount" resultType="java.util.HashMap"> |
| | | SELECT |
| | | count( * ) AS count |
| | | FROM |
| | | sys_taskqd |
| | | WHERE |
| | | serid LIKE concat("%",#{id},"%") |
| | | AND rtype = "1" UNION ALL |
| | | SELECT |
| | | count( * ) AS count |
| | | FROM |
| | | sys_taskqd |
| | | WHERE |
| | | serid LIKE concat("%",#{id},"%") |
| | | AND ( rtype = "0" OR rtype = "2" ) |
| | | </select> |
| | | |
| | | <select id="queryReceiver" resultType="java.util.HashMap"> |
| | |
| | | select qd.* from sys_taskqd qd LEFT JOIN sys_jurisdiction j ON j.id = qd.jurisdiction where 1=1 AND |
| | | <if test="type==0"> |
| | | (qd.rtype = "2" or qd.rtype = "0") AND |
| | | find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid FROM |
| | | find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid |
| | | FROM |
| | | sys_taskfk WHERE |
| | | serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid |
| | | </if> |
| | | <if test="type==2"> |
| | | qd.rtype = "1" AND |
| | | find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid FROM |
| | | find_in_set(#{serid}, serid) and qd.tasktype=#{tasktype}) A LEFT JOIN (SELECT COUNT(*) as num,hdid,serid |
| | | FROM |
| | | sys_taskfk WHERE |
| | | serid=#{serid} GROUP BY hdid,serid) B ON A.id=B.hdid |
| | | </if> |
| | |
| | | Boolean updateSerid(String type,String rid,String newteam,int newnum); |
| | | List<Taskqd> selectList(Integer id); |
| | | List<Map<String, Object>> queryReceiver(String serid); |
| | | List<Map<String, Object>> taskCount(String id,String type); |
| | | List<TaskqdVO> getlist(String id,String type); |
| | | List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype); |
| | | List<Map<String, Object>> selectNum(String serid,String jurisdiction,String workjurisdiction); |
| | | String querySerid(String rid); |
| | |
| | | public List<Map<String, Object>> queryReceiver(String serid) { |
| | | return baseMapper.queryReceiver(serid); |
| | | } |
| | | @Override |
| | | public List<Map<String, Object>> taskCount(String id,String type) { |
| | | return baseMapper.taskCount(id,type); |
| | | } |
| | | @Override |
| | | public List<TaskqdVO> getlist(String id,String type) { |
| | | return baseMapper.getlist(id,type); |
| | | } |
| | | |
| | | @Override |
| | | public List<TaskqdVO> selectLi(String type, String serid,String jurisdiction,String workjurisdiction,String tasktype) { |