| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | |
| | | 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<>(); |
| | | //统计半年数据 |
| | |
| | | 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)); |