| | |
| | | */ |
| | | List<GridmanVO> getGridmanList(@Param("gridman") GridmanVO gridman); |
| | | |
| | | Integer getGridStatistics(String code, Long userId); |
| | | Integer getGridStatistics(String code, Long userId, String roleType); |
| | | |
| | | Integer getCompanyStatistics(String code, Long userId); |
| | | Integer getCompanyStatistics(String code, Long userId, String roleType); |
| | | |
| | | Integer getOwnersCommitteeStatistics(String code, Long userId, String roleType); |
| | | |
| | | /** |
| | | * 网格员表 自定义详情 |
| | |
| | | AND jda.aoi_code IS NOT NULL |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | | <if test="userId != null and roleType == '3'"> |
| | | AND jd.aoi_code IN (SELECT |
| | | <select id="getOwnersCommitteeStatistics" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count(1) |
| | | FROM jczz_owners_committee joc LEFT JOIN |
| | | jczz_district jd ON jd.id = joc.area_id |
| | | WHERE |
| | | jd.community_code = #{code} |
| | | and jpcd.is_deleted= 0 |
| | | <if test="userId!=null and roleType == '1'"> |
| | | AND jd.aoi_code in ( |
| | | SELECT distinct |
| | | jda.aoi_code |
| | | FROM |
| | | jczz_doorplate_address jda |
| | | LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jgr.house_code |
| | | WHERE |
| | | jc.res_police_user_id = #{userId}) |
| | | jgm.user_id = #{userId} |
| | | AND jg.is_deleted = 0 |
| | | AND jda.aoi_code IS NOT NULL |
| | | ) |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | public Object getGridStatistics(String code, String roleType) { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | if (roleType.equals("2")) { |
| | | Integer gridStatistics = baseMapper.getGridStatistics(code, null); |
| | | Integer companyStatistics = baseMapper.getCompanyStatistics(code, null); |
| | | Integer gridStatistics = baseMapper.getGridStatistics(code, null, roleType); |
| | | Integer companyStatistics = baseMapper.getCompanyStatistics(code, null, roleType); |
| | | Integer ownersCommitteeStatistics = baseMapper.getOwnersCommitteeStatistics(code, null, roleType); |
| | | objectObjectHashMap.put("gridStatistics", gridStatistics); |
| | | objectObjectHashMap.put("companyStatistics", companyStatistics); |
| | | objectObjectHashMap.put("ownersStatistics", ownersCommitteeStatistics); |
| | | } else { |
| | | |
| | | Integer gridStatistics = baseMapper.getGridStatistics(code, AuthUtil.getUserId()); |
| | | Integer companyStatistics = baseMapper.getCompanyStatistics(code, AuthUtil.getUserId()); |
| | | Integer gridStatistics = baseMapper.getGridStatistics(code, AuthUtil.getUserId(), roleType); |
| | | Integer companyStatistics = baseMapper.getCompanyStatistics(code, AuthUtil.getUserId(), roleType); |
| | | Integer ownersCommitteeStatistics = baseMapper.getOwnersCommitteeStatistics(code, AuthUtil.getUserId(), roleType); |
| | | objectObjectHashMap.put("gridStatistics", gridStatistics); |
| | | objectObjectHashMap.put("companyStatistics", companyStatistics); |
| | | objectObjectHashMap.put("ownersStatistics", ownersCommitteeStatistics); |
| | | |
| | | } |
| | | return objectObjectHashMap; |
| | | } |
| | |
| | | |
| | | <!--查询场所集合信息--> |
| | | <select id="selectPlaceNodeList" resultType="org.springblade.common.node.TreeStringNode" > |
| | | select jp.id, |
| | | SELECT jp.id, |
| | | jp.house_code houseCode, |
| | | jp.place_name as name, |
| | | jda.doorplate_type doorplateType, |
| | | jp.place_name AS NAME, |
| | | jpr.doorplate_num doorplateType, |
| | | jda.address_level addressLevel, |
| | | jda.nei_name neiName, |
| | | false as hasChildren |
| | | from jczz_place jp |
| | | left join jczz_doorplate_address jda on jp.house_code = jda.address_code |
| | | jpr.community_name neiName, |
| | | FALSE AS hasChildren |
| | | FROM jczz_place jp |
| | | LEFT JOIN jczz_place_rel jpr ON jp.id = jpr.place_id |
| | | LEFT JOIN jczz_doorplate_address jda on jp.house_code = jda.address_code |
| | | where 1 = 1 |
| | | and jp.is_deleted = 0 |
| | | and jp.principal_user_id = #{userId} |
| | |
| | | IOwnersCommitteeService bean = SpringUtils.getBean(IOwnersCommitteeService.class); |
| | | OwnersCommitteeEntity one = bean.getOne(Wrappers.<OwnersCommitteeEntity>lambdaQuery() |
| | | .eq(OwnersCommitteeEntity::getAreaId, applyVO.getDistrictId()) |
| | | .eq(OwnersCommitteeEntity::getDeleteFlag,0) |
| | | .eq(OwnersCommitteeEntity::getStatus,0) |
| | | .last("limit 1")); |
| | | Integer ownersCommitteeFlag = CommonConstant.NUMBER_TWO; |
| | | if (one != null && one.getPrincipalId() != null) { |
| | |
| | | |
| | | /** 主键id */ |
| | | @ApiModelProperty(value = "主键ID", example = "") |
| | | // @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** 任务ID */ |
| | | @ApiModelProperty(value = "任务ID", example = "") |