diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index f05f6e5f70..f4f616a722 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.service.project.ProjectService; import com.epmet.service.stats.DimCustomerService; import com.epmet.service.topic.TopicService; import com.epmet.util.DimIdGenerator; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -478,9 +479,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { formattingData.add(dest); }); - if(!CollectionUtils.isEmpty(formattingData)) { - factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null,param.getCustomerId()); - factOriginProjectOrgPeriodDailyDao.insertBatch(formattingData); + if (!CollectionUtils.isEmpty(formattingData)) { + factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null, param.getCustomerId()); + Lists.partition(formattingData, NumConstant.ONE_HUNDRED) + .forEach(part -> factOriginProjectOrgPeriodDailyDao.insertBatch(part)); + } }