| | |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM"); |
| | | LocalDate localDate = LocalDate.parse(starTime, formatter2); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = null; |
| | | try { |
| | | date = sdf.parse(starTime+"-01"); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | Date lastDay = calendar.getTime(); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | String firstDayOfMonth = starTime+"-01"; |
| | | // // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = sdf.format(lastDay); |
| | | |
| | | //获取小程序用户数量 |
| | | userNum= baseMapper.getUserNum(streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM"); |
| | | LocalDate localDate = LocalDate.parse(starTime, formatter2); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = null; |
| | | try { |
| | | date = sdf.parse(starTime+"-01"); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | Date lastDay = calendar.getTime(); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | String firstDayOfMonth = starTime+"-01"; |
| | | // // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = sdf.format(lastDay); |
| | | |
| | | //旧的报道需求问题统计数 2.问题清单 3.需求清单 |
| | | OleProblemNum=baseMapper.getOleNeedProblemNum("2",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM"); |
| | | LocalDate localDate = LocalDate.parse(starTime, formatter2); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = null; |
| | | try { |
| | | date = sdf.parse(starTime+"-01"); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | Date lastDay = calendar.getTime(); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | String firstDayOfMonth = starTime+"-01"; |
| | | // // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = sdf.format(lastDay); |
| | | |
| | | photoList=baseMapper.getPhotoMicroWishData("1","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | | microWishList=baseMapper.getPhotoMicroWishData("2","%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |
| | |
| | | else if(StringUtils.equals(type,"2")) |
| | | { |
| | | //按月份 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM"); |
| | | LocalDate localDate = LocalDate.parse(starTime, formatter2); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date date = null; |
| | | try { |
| | | date = sdf.parse(starTime+"-01"); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | Date lastDay = calendar.getTime(); |
| | | // 获取当前月份的第一天 |
| | | String firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()).format(formatter); |
| | | // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()).format(formatter); |
| | | String firstDayOfMonth = starTime+"-01"; |
| | | // // 获取当前月份的最后一天 |
| | | String lastDayOfMonth = sdf.format(lastDay); |
| | | |
| | | //* 社区活动统计 |
| | | nommunityActNumList=baseMapper.getNommunityActNumList("%Y-%m",streetId,communityId,firstDayOfMonth+" 00:00:00",lastDayOfMonth+" 23:59:59"); |