diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java index ef164bfaf8..36e8f87ae7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.dto.screencoll.form.*; import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService; +import org.apache.commons.collections4.ListUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -229,7 +230,10 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } while (deleteNum != NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO.getDataList(), customerId); + List> pageByOneHundred = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + pageByOneHundred.forEach(one -> { + screenCpcBaseDataDao.batchInsertCpcBaseData(one, customerId); + }); } } @@ -305,7 +309,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { List pidIsZeroList = formDTO.getDataList().stream().filter(d -> d.getPid().equals(NumConstant.ZERO_STR) || "".equals(d.getPid())).collect(Collectors.toList()); - if (pidIsZeroList.size()>=NumConstant.ONE){ + if (pidIsZeroList.size()>NumConstant.ONE){ Object o = JSONObject.toJSON(pidIsZeroList); throw new RenException("多个pid为【0】的数据:"+o.toString()); }