问题单整改

This commit is contained in:
zhuxinyu
2023-05-05 13:02:44 +08:00
parent bc603fdb5e
commit d4ba963d98
5 changed files with 21 additions and 33 deletions

View File

@@ -954,7 +954,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
Integer endMonth = Integer.parseInt(endTime.substring(5, 7));
Integer startYear = Integer.parseInt(startTime.substring(0, 4));
Integer endYear = Integer.parseInt(endTime.substring(0, 4));
if (statisticsParam.getFlag() == 0) {
if (statisticsParam.getFlag()==0) {
while (startYear != endYear && startMonth != endMonth) {
builder1.delete(0, builder1.length());
builder2.delete(0, builder2.length());
@@ -1019,12 +1019,12 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
);
Map<String, List<RmpEventDetailPO>> map = eventDetailList.stream().filter(x -> data.getId().equals(x.getEventType()))
.collect(Collectors.groupingBy(s -> s.getStartTime().toString()));
.peek(t ->t.setFormatTime(t.getStartTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))))
.collect(Collectors.groupingBy(RmpEventDetailPO::getFormatTime));
Set<String> keySet = map.keySet();
LocalDate parse1 = LocalDate.parse(startTime);
LocalDate parse2 = LocalDate.parse(endTime);
while (!parse1.equals(parse2.plus(1, ChronoUnit.DAYS))) {
while (!parse1.equals(parse2.plus(1, ChronoUnit.DAYS))){
if (keySet.contains(parse1.toString())) {
// List<EventDetailNew> eventDetailNews = map.get(parse1.toString());
List<RmpEventDetailPO> eventDetailNews = map.get(parse1.toString());
@@ -1067,7 +1067,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
}
@Override
public StatisticVO getStatistic(StatisticsParam statisticsParam) {
public StatisticVO getStatistic (StatisticsParam statisticsParam) {
StatisticVO result = new StatisticVO();
List<EventDetail> list = new ArrayList<>();
List<ReasonsVO> reasonsVOS = new ArrayList<>();
@@ -1107,8 +1107,8 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
for (DictData data : typeData) {
typeMap.put(data.getName(), 0);
if (detail.getAdvanceType().equals(data.getId())) {
details = BeanUtil.copyProperties(detail, EventDetail.class);
detail.setAdvanceType(data.getName());
// details = BeanUtil.copyProperties(detail, EventDetail.class);
details.setAdvanceType(data.getName());
}
}
list.add(details);