xyh
2021-06-17 718213fca4962070df0b7ab167d78cf2f85c4647
修改
4个文件已修改
33 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/PbWorkVO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ScreenWorkServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/PbWorkVO.java
@@ -22,9 +22,4 @@
    @ApiModelProperty("党员活动")
    private Long activity;
    @ApiModelProperty(hidden = true)
    private String start;
    @ApiModelProperty(hidden = true)
    private String end;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/DateUtils.java
@@ -33,6 +33,8 @@
    public static DateTimeFormatter format_ymd_String = DateTimeFormatter.ofPattern("yyMMdd");
    public static SimpleDateFormat yyyyMM_format = new SimpleDateFormat("yyyy-MM");
    /**
@@ -691,6 +693,16 @@
        return date1.getTime();
    }
    public static Date parseDateYM(String str) {
        try {
            return yyyyMM_format.parse(str);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
    public static int getMonth(Date date){
        Calendar instance = Calendar.getInstance();
        instance.setTime(date);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -271,6 +271,6 @@
            "WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5) ORDER BY create_at DESC LIMIT #{pageSize}")
    List<CarouselInfoVO> screenActivity(@Param("communityId")Long communityId, @Param("pageSize")Integer pageSize);
    @Select("SELECT cover FROM com_act_activity WHERE community_id = #{communityId} and AND (status = 3 OR status = 4 OR status = 5)")
    @Select("SELECT cover FROM com_act_activity WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5)")
    List<String> listImg(@Param("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ScreenWorkServiceImpl.java
@@ -1,5 +1,6 @@
package com.panzhihua.service_community.service.impl;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.panzhihua.common.model.dtos.partybuilding.ComPbActivityDTO;
@@ -12,6 +13,7 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -185,7 +187,7 @@
            dateList.add(startMap);
            Map<String,String> endMap = new HashMap<>();
            endMap.put("name",monthStr[m]+"月下旬");
            endMap.put("start",month+ "-"+half+" 23:59:58");
            endMap.put("start",month+ "-"+half+" 23:59:59");
            endMap.put("end",DateUtils.getDateFormatString(endDay,"yyyy-MM-dd HH:mm:ss"));
            dateList.add(endMap);
        }
@@ -203,7 +205,7 @@
        Map<String,Object> countMap = comActEasyPhotoDAO.countByCommunityId(communityId,date);
        comActEasyPhotoScreenVO.setCurrentNum(countMap.get("currentNum") == null ? 0L : Long.valueOf(countMap.get("currentNum").toString()));
        comActEasyPhotoScreenVO.setNoneDeal(countMap.get("noneDeal") == null ? 0L : Long.valueOf(countMap.get("noneDeal").toString()));
        comActEasyPhotoScreenVO.setPubPoint(countMap.get("pubPoint") == null ? 0 : Integer.valueOf(countMap.get("pubPoint").toString()));
        comActEasyPhotoScreenVO.setPubPoint(countMap.get("pubPoint") == null ? 0 : Double.valueOf(countMap.get("pubPoint").toString()).intValue());
        comActEasyPhotoScreenVO.setDealTime(countMap.get("dealTime") == null ? 0 : Double.valueOf(countMap.get("dealTime").toString()).intValue());
        List<EastPhotoVO> list = new ArrayList<>();
        //统计半年数据
@@ -215,10 +217,10 @@
            list.add(result);
        }
        comActEasyPhotoScreenVO.setList(list);
        Date start = DateUtil.parseTime(DateUtil.format(DateUtils.getDateM(new Date(),-n),moth_format_str)+" 00:00:00");
        Date initTime = DateUtil.parseTime(initMonth +" 00:00:00");
        if(DateUtils.before(start,initTime)){
        String fmt = "yyyy-MM-01 00:00:00";
        Date start = DateUtil.parse(DateUtil.format(DateUtils.getDateM(new Date(),-n),new SimpleDateFormat(fmt)));
        Date initTime = DateUtil.parse(initMonth +"-01 00:00:00", DatePattern.NORM_DATETIME_FORMAT);
        if(!DateUtils.before(initTime,start)){
            start = initTime;
        }
        comActEasyPhotoScreenVO.setListTimes(DateUtil.format(start,moth_format_ch)+"-"+DateUtil.format(DateUtils.getDateM(new Date(),-1),moth_format_ch));