|
|
@@ -7,6 +7,7 @@ import com.izouma.zhumj.repo.*;
|
|
|
import com.izouma.zhumj.security.Authority;
|
|
|
import com.izouma.zhumj.utils.excel.ExcelUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.apache.commons.collections.list.SynchronizedList;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.transaction.Transactional;
|
|
|
@@ -22,9 +23,7 @@ import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
import java.time.YearMonth;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Optional;
|
|
|
+import java.util.*;
|
|
|
import java.util.Optional;
|
|
|
|
|
|
@Service
|
|
|
@@ -86,7 +85,7 @@ public class BusinessIndicatorService {
|
|
|
YearMonth thisOne = YearMonth.of(start.getYear(), start.getMonth());
|
|
|
//找到所有当月的经营计划
|
|
|
List<BusinessIndicator> businessIndicators = businessIndicatorRepo.findAllByMonth(thisOne);
|
|
|
- List<BusinessIndicatorReportDTO> dtos = new ArrayList<>();
|
|
|
+ List<BusinessIndicatorReportDTO> dtos = Collections.synchronizedList(new LinkedList<>());
|
|
|
LocalDate finalEnd = end;
|
|
|
LocalDate finalStart = start;
|
|
|
businessIndicators.stream().parallel().forEach(businessIndicator -> {
|