Merge branch 'master' into test
| | |
| | | @ApiModelProperty("发生区域") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty("处理意见") |
| | | private String processDesc; |
| | | |
| | | @ApiModelProperty(value = "音频") |
| | | private List<EventResourceVO> audios; |
| | | |
| | |
| | | @ApiModelProperty("发生区域") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty("处理意见") |
| | | private String processDesc; |
| | | |
| | | @ApiModelProperty(value = "音频") |
| | | private List<EventResourceVO> audios; |
| | | |
| | |
| | | @ApiModelProperty("话题名称") |
| | | private String topicName; |
| | | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty("头像") |
| | | private String imageUrl; |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param communityId |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | @GetMapping("/bigscreen/party/partyActivityTop") |
| | | R partyActivityTop(@RequestParam("communityId")Long communityId); |
| | | @PostMapping("/bigscreen/party/partyActivityTop") |
| | | R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); |
| | | |
| | | /** |
| | | * 社区服务大屏数据分析接口 |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "党员积分前3", response = BigScreenActivityTop.class) |
| | | @GetMapping("/partyActivityTop") |
| | | public R partyActivityTop(){ |
| | | return communityService.partyActivityTop(this.getCommunityId()); |
| | | @PostMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ |
| | | pageBigScreenStatisticPartyOrg.setCommunityId(this.getCommunityId()); |
| | | return communityService.partyActivityTop(pageBigScreenStatisticPartyOrg); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 党员积分前3 |
| | | * @param communityId |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | @GetMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestParam("communityId")Long communityId){ |
| | | return bigScreenService.partyActivityTop(communityId); |
| | | @PostMapping("/partyActivityTop") |
| | | public R partyActivityTop(@RequestBody PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg){ |
| | | return bigScreenService.partyActivityTop(pageBigScreenStatisticPartyOrg); |
| | | } |
| | | } |
| | |
| | | EventNewStatisticsVO getEventScreenSSPDateil(@Param("eventId") Long eventId); |
| | | |
| | | @Select("SELECT " + " su.nick_name AS userName, " + " su.image_url AS imageUrl, " + " e.create_at as createAt, " |
| | | + " e.event_des, " + " e.event_clazz, " + " e.danger_level, " + " e.urgent, " + " e.major, " |
| | | + " e.event_des, " + " e.event_clazz, " + " e.danger_level, " + " e.urgent, " + " e.major,e.process_desc, " |
| | | + " e.happen_address, " + " e.happent_lat_lng, " + " e.event_type, " + " e.event_category, " + " e.id, " |
| | | + " egd.grid_name, " + " e.event_deal_status " + "FROM " + " `event` AS e " |
| | | + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id " |
| | |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | List<BigScreenActivityTop> selectActivityTop(@Param("communityId") Long communityId); |
| | | IPage<BigScreenActivityTop> selectActivityTop(Page page,@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 服务数据查询 |
| | |
| | | |
| | | /** |
| | | *查询党员积分前3 |
| | | * @param communityId |
| | | * @param pageBigScreenStatisticPartyOrg |
| | | * @return |
| | | */ |
| | | R partyActivityTop(Long communityId); |
| | | R partyActivityTop(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg); |
| | | |
| | | /** |
| | | * 服务数据 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R partyActivityTop(Long communityId) { |
| | | return R.ok(this.comPbMemberDAO.selectActivityTop(communityId)); |
| | | public R partyActivityTop(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) { |
| | | return R.ok(this.comPbMemberDAO.selectActivityTop(new Page(pageBigScreenStatisticPartyOrg.getPageNum(),pageBigScreenStatisticPartyOrg.getPageSize()),pageBigScreenStatisticPartyOrg.getCommunityId())); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<StatisticsCommVO> microWishRealizePercent = comActMicroWishDAO.selectRealizePercent(communityId); |
| | | statisticsVO.setMicroWishRealizePercent(microWishRealizePercent); |
| | | //微心愿图片 |
| | | List<String> microWishImages = comActMicroWishDAO.getPassedAllImages(communityId, pageSize); |
| | | List<String> microWishImages = comActMicroWishDAO.getPassedAllImages(communityId, 20); |
| | | statisticsVO.setMicroWishImages(microWishImages); |
| | | |
| | | //议事投票类型占比 |
| | |
| | | statisticsVO.setVoteTitles(voteTitles); |
| | | |
| | | //邻里圈图片 |
| | | List<String> neighborImages = comActNeighborCircleDAO.getAllImages(communityId, pageSize); |
| | | List<String> neighborImages = comActNeighborCircleDAO.getAllImages(communityId, 20); |
| | | statisticsVO.setNeighborImages(neighborImages); |
| | | //邻里圈文本内容 |
| | | List<String> neighborContents = comActNeighborCircleDAO.getContents(communityId, pageSize); |
| | |
| | | List<String> warehouseLoveTransfer = comActWarehouseDonatesDao.getWarehouseLoveTransfer(communityId, pageSize); |
| | | statisticsVO.setWarehouseLoveTransfer(warehouseLoveTransfer); |
| | | //捐赠图片 |
| | | List<String> warehouseImages = comActWarehouseDonatesDao.getWarehouseImages(communityId, pageSize); |
| | | List<String> warehouseImages = comActWarehouseDonatesDao.getWarehouseImages(communityId, 20); |
| | | statisticsVO.setWarehouseImages(warehouseImages); |
| | | |
| | | //居民活动柱状统计 |
| | |
| | | statisticsInfo.setNeighborCircleData(neighborCircleData); |
| | | if (!neighborCircleData.isEmpty()) { |
| | | statisticsInfo.setPublishContentNum(neighborCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum()); |
| | | statisticsInfo.setPublishTopicNum(neighborCircleData.size()); |
| | | statisticsInfo.setPublishTopicNum(neighborCircleData.stream().filter(e -> !"无话题".equals(e.getFiled())).collect(Collectors.toList()).size()); |
| | | } |
| | | //邻里圈新增折线数据 |
| | | Date nowDate = new Date(); |
| | |
| | | DetailNeighborCircleAdminVO vo = new DetailNeighborCircleAdminVO(); |
| | | BeanUtils.copyProperties(comActNeighborCircleDO, vo); |
| | | vo.setReleaseName(user.getName()); |
| | | vo.setImageUrl(user.getImageUrl()); |
| | | |
| | | // 查询话题名称 |
| | | if (comActNeighborCircleDO.getTopicId() != null) { |
| | |
| | | IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setTitle("其他"); |
| | | otherSpecialVO.setSum(0); |
| | | int countAll=comMngPopulationDAO.getSpecialStatistics(communityId); |
| | | IndexSpecialStatisticsVO otherSpecialVO1 = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO1.setTitle("普通居民"); |
| | | otherSpecialVO1.setSum(0); |
| | | int countNormal=comMngPopulationDAO.getSpecialStatistics(communityId); |
| | | int countElder=comMngPopulationDAO.getStatisticsCount(communityId); |
| | | int countAll=countElder+countNormal; |
| | | if (!userTagList.isEmpty()) { |
| | | userTagList.forEach(userTag -> { |
| | | if (userTag != null) { |
| | | if (userTag.getSysFlag().equals(0)) { |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | specialStatisticsVO.setSum(count); |
| | | specialStatisticsVO.setPercent(BigDecimal.valueOf(specialStatisticsVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(specialStatisticsVO); |
| | | } else { |
| | | if (StringUtils.isNotEmpty(userTag.getTagName())) { |
| | | if(userTag.getTagName().equals("高龄老人")||userTag.getTagName().equals("残疾人")||userTag.getTagName().equals("低保户")||userTag.getTagName().equals("退役军人")||userTag.getTagName().equals("养老金人员")||userTag.getTagName().equals("低收入")){ |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | Integer count =0; |
| | | if (userTag.getTagName().equals("高龄老人")) { |
| | | count=countElder; |
| | | } |
| | | else { |
| | | count= comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | } |
| | | specialStatisticsVO.setSum(count); |
| | | specialStatisticsVO.setPercent(BigDecimal.valueOf(specialStatisticsVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | specialStatisticsVOList.add(specialStatisticsVO); |
| | | } |
| | | else{ |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | otherSpecialVO.setSum(countAll-otherSpecialVO.getSum()); |
| | | otherSpecialVO.setPercent(BigDecimal.valueOf(otherSpecialVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO); |
| | | otherSpecialVO1.setSum(countAll-otherSpecialVO1.getSum()); |
| | | otherSpecialVO1.setPercent(BigDecimal.valueOf(otherSpecialVO1.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO1); |
| | | indexInfo.setSpecialStatisticsVOList(specialStatisticsVOList); |
| | | // 查询网格化治理 |
| | | IndexEventGridStatisticsVO eventGridStatisticsVO = new IndexEventGridStatisticsVO(); |
| | |
| | | // 查询网格化事件数据 |
| | | IndexGridEventStatisticsVO gridEventStatistics = comMngPopulationDAO.getGridEventStatisticsList(communityId); |
| | | int count=gridEventStatistics.getEventGGTotal()+gridEventStatistics.getEventBWDTotal()+gridEventStatistics.getEventMDTotal()+gridEventStatistics.getEventTFTotal()+gridEventStatistics.getEventTSTotal()+gridEventStatistics.getEventZATotal(); |
| | | if(count!=0){ |
| | | gridEventStatistics.setGgPercent(BigDecimal.valueOf(gridEventStatistics.getEventGGTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setBwdPercent(BigDecimal.valueOf(gridEventStatistics.getEventBWDTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setMdPercent(BigDecimal.valueOf(gridEventStatistics.getEventMDTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setTfPercent(BigDecimal.valueOf(gridEventStatistics.getEventTFTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setTsPercent(BigDecimal.valueOf(gridEventStatistics.getEventTSTotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | gridEventStatistics.setZaPercent(BigDecimal.valueOf(gridEventStatistics.getEventZATotal()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | }else{ |
| | | gridEventStatistics.setGgPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setBwdPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setMdPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setTfPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setTsPercent(BigDecimal.valueOf(0)); |
| | | gridEventStatistics.setZaPercent(BigDecimal.valueOf(0)); |
| | | } |
| | | |
| | | eventGridStatisticsVO.setGridEventStatisticsList(gridEventStatistics); |
| | | // 查询网格数据 |
| | | List<EventGridDataVO> gridDataList = comMngPopulationDAO.getGridDataListByCommunityId(communityId); |
| | |
| | | </select> |
| | | |
| | | <select id="indexBackReserve" resultType="Integer"> |
| | | select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%返攀登记%' |
| | | select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') |
| | | </select> |
| | | |
| | | <select id="indexHomeQuarantine" resultType="Integer"> |
| | |
| | | select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN |
| | | where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN |
| | | (select count(t2.id) as num,t1.key from com_act_reserve t |
| | | LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id |
| | | where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key |
| | | where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key |
| | | </select> |
| | | |
| | | <select id="IndexHomeQuarantineSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub"> |
| | |
| | | (select count(id) from com_sw_patrol_record t LEFT JOIN com_act t1 on t.community_id = t1.community_id where t1.area_code ='510423') safety, |
| | | (select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t1 on t.id = t1.reserve_id LEFT JOIN com_act t2 on t.community_id = t2.community_id where (title like '%居家隔离%' or title like '%返攀登记%' or title like '%来攀登记%') and t2.area_code ='510423' and t1.status = 2 ) reserve, |
| | | (select (select count(*) from com_act_activity t LEFT JOIN com_act t1 on t.community_id = t1.community_id where status !=6 and status !=1 and t1.area_code ='510423')+(select count(id) from com_pb_activity t LEFT JOIN com_act t1 on t.community_id = t1.community_id where status !=6 and status !=1 and t1.area_code ='510423')) activity, |
| | | (select count(*) from com_act_neighbor_circle t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where is_del =2 and status=2 and t1.area_code ='510423') neighbor, |
| | | (select count(*) from com_act_easy_photo t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where status in (1,2,4) and del_tag = 0 and t1.area_code ='510423') neighbor, |
| | | (select count(*) from com_act_discuss t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where is_del =2 and t1.area_code ='510423') discuss |
| | | </select> |
| | |
| | | |
| | | <select id="indexDynamic" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic"> |
| | | SELECT count( id ) AS microWish, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status = 4 AND community_id = camw.community_id ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status in (1,2,4) and del_tag = 0 AND community_id = camw.community_id ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id and is_hide=0 ),0) AS questionnaire, |
| | | IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS dynamic, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE community_id = camw.community_id AND is_del = 0 ),0) AS convenient, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE (community_id = camw.community_id OR community_id = 0) AND is_del = 0 ),0) AS convenient, |
| | | IFNULL(( SELECT count( id ) FROM com_act_neighbor_circle WHERE community_id = camw.community_id AND is_del = 2 ),0) AS neighbor |
| | | FROM com_act_micro_wish AS camw WHERE camw.STATUS = 6 |
| | | AND camw.community_id = #{communityId} |
| | |
| | | </select> |
| | | |
| | | <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1 order by integral_available_party desc limit 100 |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1 order by integral_available_party desc |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | |
| | | </select> |
| | | <select id="getEventAddPolylineData" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT filed, SUM(num) AS num FROM ( |
| | | SELECT DATE_FORMAT( e.create_at, '%m' ) AS filed, COUNT(e.id) AS num |
| | | FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | |
| | | UNION ALL SELECT |
| | | DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num |
| | | FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed |
| | | ) temp GROUP BY filed |
| | | </select> |
| | | <select id="getEventTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | |
| | | e.urgent, |
| | | e.danger_level, |
| | | e.major, |
| | | e.process_desc, |
| | | e.event_des, |
| | | e.event_category, |
| | | e.event_type, |