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)); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml index 5883c4ccec..3284be99e6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml @@ -47,9 +47,9 @@ )t LEFT JOIN resi_event_attachment rea - ON (rea.RESI_EVENT_ID = t.eventId) - where rea.DEL_FLAG = '0' - AND rea.ATTACHMENT_TYPE = 'image' + ON (rea.RESI_EVENT_ID = t.eventId + and rea.DEL_FLAG = '0' + AND rea.ATTACHMENT_TYPE = 'image') ORDER BY t.eventTime,rea.sort asc