| | |
| | | package com.panzhihua.sangeshenbian.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.beust.jcommander.internal.Lists; |
| | | import com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.sangeshenbian.dao.SystemUserMapper; |
| | | import com.panzhihua.sangeshenbian.model.entity.ComAct; |
| | |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemUserLevel; |
| | | import com.panzhihua.sangeshenbian.model.query.AppStaticsQuery; |
| | | import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsOneVo; |
| | | import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsTwoVo; |
| | | import com.panzhihua.sangeshenbian.model.vo.RegionVO; |
| | | import com.panzhihua.sangeshenbian.service.IBcRegionService; |
| | | import com.panzhihua.sangeshenbian.service.IComActService; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo); |
| | | return complaintService.analyticStatisticsOne(null, complaints, simpleDateFormat); |
| | | } |
| | | |
| | | public List<AnalyticStatisticsTwoVo> queryStaticsPartTwo(AppStaticsQuery query, LoginUserInfoVO loginUserInfo) { |
| | | List<Complaint> complaints = complaintService.queryCompliantList(query,loginUserInfo); |
| | | //时间范围 |
| | | String time = ""; |
| | | if (Objects.nonNull(query.getTimeType())) { |
| | | Date now = new Date(); |
| | | Date start = null; |
| | | switch (query.getTimeType()) { |
| | | case 2: |
| | | start = DateUtils.addDay(now, -15); |
| | | break; |
| | | case 3: |
| | | start = DateUtils.addDay(now, -30); |
| | | break; |
| | | default: |
| | | start = DateUtils.addDay(now, -7); |
| | | break; |
| | | } |
| | | //格式化 |
| | | String startStr = DateUtils.format(start, DateUtils.yyyyMMdd_format); |
| | | String endStr = DateUtils.format(now, DateUtils.yyyyMMdd_format); |
| | | time = startStr + " - " + endStr; |
| | | } |
| | | return complaintService.analyticStatisticsTwo(time, complaints, simpleDateFormat); |
| | | } |
| | | |
| | | } |