Commit f18ddae4 by 刘鑫

fix(容量): 已完成单子按照时间开始时间和完单时间计算

1 parent e1423902
......@@ -111,7 +111,16 @@ public class CapacityUtils {
}
return DateUtil.checkTimesHasOverlap(checkStartTime, checkEndTime, startTime, endTime);
})
.map(e -> DateUtil.intersection(e.getPlanStartTime(), e.getPlanEndTime(), startTime, endTime))
.map(e -> {
String serviceStatus = e.getServiceStatus();
LocalDateTime checkStartTime = e.getPlanStartTime();
LocalDateTime checkEndTime = e.getPlanEndTime();
if (Objects.equals(serviceStatus, "FINISHED")) {
checkStartTime = e.getActualStartTime();
checkEndTime = e.getActualEndTime();
}
return DateUtil.intersection(checkStartTime, checkEndTime, startTime, endTime);
})
.collect(Collectors.toList());
List<OccupyInfoDetail> resultList = Stream.of(calendar, order).flatMap(Collection::stream).collect(Collectors.toList());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!