|
|
@ -20,12 +20,9 @@ package com.elink.esua.epdc.modules.screen.service.impl; |
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.DateUtils; |
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
|
|
import com.elink.esua.epdc.dto.SysDeptDTO; |
|
|
|
|
|
import com.elink.esua.epdc.dto.screen.form.DataStatisticsFormDTO; |
|
|
import com.elink.esua.epdc.dto.screen.form.DataStatisticsFormDTO; |
|
|
import com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO; |
|
|
import com.elink.esua.epdc.dto.screen.form.EventStatisticsFormDTO; |
|
|
import com.elink.esua.epdc.dto.screen.result.*; |
|
|
import com.elink.esua.epdc.dto.screen.result.*; |
|
|
import com.elink.esua.epdc.modules.feign.AdminFeignClient; |
|
|
|
|
|
import com.elink.esua.epdc.modules.screen.dao.ScreenDeptEventStatDao; |
|
|
import com.elink.esua.epdc.modules.screen.dao.ScreenDeptEventStatDao; |
|
|
import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventStatEntity; |
|
|
import com.elink.esua.epdc.modules.screen.entity.ScreenDeptEventStatEntity; |
|
|
import com.elink.esua.epdc.modules.screen.service.ScreenDeptEventStatService; |
|
|
import com.elink.esua.epdc.modules.screen.service.ScreenDeptEventStatService; |
|
|
@ -33,7 +30,6 @@ import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.function.Function; |
|
|
import java.util.function.Function; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
@ -62,12 +58,12 @@ public class ScreenDeptEventStatServiceImpl extends BaseServiceImpl<ScreenDeptEv |
|
|
String statYear; |
|
|
String statYear; |
|
|
if (StringUtils.isBlank(formDTO.getStatDate())) { |
|
|
if (StringUtils.isBlank(formDTO.getStatDate())) { |
|
|
statDate = DateUtils.format(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN); |
|
|
statDate = DateUtils.format(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN); |
|
|
statMonth = statDate.substring(0,7); |
|
|
statMonth = statDate.substring(0, 7); |
|
|
statYear = statDate.substring(0,4); |
|
|
statYear = statDate.substring(0, 4); |
|
|
} else { |
|
|
} else { |
|
|
statDate = formDTO.getStatDate(); |
|
|
statDate = formDTO.getStatDate(); |
|
|
statMonth = formDTO.getStatDate().substring(0,7); |
|
|
statMonth = formDTO.getStatDate().substring(0, 7); |
|
|
statYear = formDTO.getStatDate().substring(0,4); |
|
|
statYear = formDTO.getStatDate().substring(0, 4); |
|
|
} |
|
|
} |
|
|
//统计总数
|
|
|
//统计总数
|
|
|
List<ScreenDeptEventStatEntity> list = baseDao.getEventStat("all", statDate); |
|
|
List<ScreenDeptEventStatEntity> list = baseDao.getEventStat("all", statDate); |
|
|
@ -226,9 +222,11 @@ public class ScreenDeptEventStatServiceImpl extends BaseServiceImpl<ScreenDeptEv |
|
|
} else if (NumConstant.TWO_STR.equals(formDTO.getStatType())) { |
|
|
} else if (NumConstant.TWO_STR.equals(formDTO.getStatType())) { |
|
|
//日期为本月
|
|
|
//日期为本月
|
|
|
formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 7)); |
|
|
formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 7)); |
|
|
|
|
|
formDTO.setStartDate(DateUtils.format(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN)); |
|
|
} else if (NumConstant.THREE_STR.equals(formDTO.getStatType())) { |
|
|
} else if (NumConstant.THREE_STR.equals(formDTO.getStatType())) { |
|
|
//日期为本年
|
|
|
//日期为本年
|
|
|
formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 4)); |
|
|
formDTO.setStatDate(DateUtils.format(new Date(), DateUtils.DATE_PATTERN).substring(0, 4)); |
|
|
|
|
|
formDTO.setStartDate(DateUtils.format(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN)); |
|
|
} |
|
|
} |
|
|
return baseDao.getScreenExportData(formDTO); |
|
|
return baseDao.getScreenExportData(formDTO); |
|
|
} |
|
|
} |
|
|
|