| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.panzhihua.common.model.dtos.DataKanBansDto; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_user.dao.*; |
| | | import com.panzhihua.service_user.model.dos.*; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.grid.GridMemberVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.GridMemberBuildingVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ActivityManagerVO; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 数据看板升级版 |
| | | * |
| | | * @return 运营后台数据看板升级版 |
| | | */ |
| | | @Override |
| | | public R dataKanBans(DataKanBansDto dataKanBansDto){ |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(); |
| | | List<String> communityUserX = new ArrayList<>(); |
| | | List<Integer> communityUserY = new ArrayList<>(); |
| | | |
| | | List<String> communityActiveUserX = new ArrayList<>(); |
| | | List<Integer> communityActiveUserY = new ArrayList<>(); |
| | | List<Integer> communityActiveUserZ = new ArrayList<>(); |
| | | |
| | | List<DataKanbanDTO> dataKanbanDTOS = null; |
| | | if(dataKanBansDto.getType() != null && dataKanBansDto.getType().equals(DataKanBansDto.type.by)){ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(); |
| | | }else{ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrder(); |
| | | } |
| | | if (!ObjectUtils.isEmpty(dataKanbanDTOS)) { |
| | | dataKanbanDTOS.forEach(dataKanbanDTO -> { |
| | | communityUserX.add(dataKanbanDTO.getName()); |
| | | communityUserY.add(dataKanbanDTO.getNum()); |
| | | }); |
| | | } |
| | | |
| | | // 获取最近二十天数据 |
| | | List<Date> serverndays = com.panzhihua.common.utlis.DateUtils.getOldDays(); |
| | | serverndays.forEach(date -> { |
| | | // 查询社区活动数量 |
| | | DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(date); |
| | | communityActiveUserX.add(DateFormatUtils.format(date, "MM-dd")); |
| | | communityActiveUserY.add(dataKanbanDTO.getNum()); |
| | | communityActiveUserZ.add(dataKanbanDTO.getDayNum()); |
| | | }); |
| | | indexDataKanbanVO.setCommunityActiveUserX(communityActiveUserX); |
| | | indexDataKanbanVO.setCommunityAddUserY(communityActiveUserY); |
| | | indexDataKanbanVO.setCommunityActiveUserY(communityActiveUserZ); |
| | | indexDataKanbanVO.setCommunityUserX(communityUserX); |
| | | indexDataKanbanVO.setCommunityUserY(communityUserY); |
| | | return R.ok(indexDataKanbanVO); |
| | | } |
| | | |
| | | /** |
| | | * 运营后台-用户数据统计汇总 |
| | | * @return 用户数据统计汇总 |
| | | */ |
| | | @Override |
| | | public R communityStatistics(){ |
| | | //返回结果数据 |
| | | IndexUserStatisticsVo userStatisticsVo = new IndexUserStatisticsVo(); |
| | | //查询所有街道 |
| | | List<IndexUserStreetVo> streetList = userDao.getUserStreetList(); |
| | | streetList.forEach(street -> { |
| | | List<IndexUserCommunityVo> communityList = userDao.getUserCommunityList(street.getStreetId()); |
| | | street.setCommunityList(communityList); |
| | | }); |
| | | userStatisticsVo.setStreetList(streetList); |
| | | return R.ok(userStatisticsVo); |
| | | } |
| | | |
| | | @Override |
| | | public R communityStatisticsExport(){ |
| | | return R.ok(userDao.getUserCommunityExcelExport()); |
| | | } |
| | | } |