lidongdong
2024-09-24 7fd5f56ea3eacd9d39bfbe775d000abd59de9c4b
花城 修改街道大屏月份筛选问题3
1个文件已修改
80 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/StreetBigScreenServiceImpl.java
@@ -79,13 +79,21 @@
        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");
@@ -325,13 +333,21 @@
        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");
@@ -485,13 +501,21 @@
        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");
@@ -643,13 +667,21 @@
        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");