Browse Source

附件默认,插入改成500

master
zxc 3 years ago
parent
commit
c4ff2ae332
  1. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java

@ -32,6 +32,7 @@ import com.epmet.service.IcNatService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -231,6 +232,8 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
e.setNatAddress(natInfo.getSampling_org_pcr());
e.setAgencyId(idCard.getAgencyId());
e.setPids(idCard.getPids());
e.setAttachmentType("");
e.setAttachmentUrl("");
entities.add(e);
});
}
@ -240,7 +243,9 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
entities.forEach(e -> existNatInfos.stream().filter(i -> i.getUserId().equals(e.getUserId()) && i.getIdCard().equals(e.getIdCard())).forEach(i -> e.setExistStatus(true)));
Map<Boolean, List<IcNatEntity>> groupByStatus = entities.stream().collect(Collectors.groupingBy(IcNatEntity::getExistStatus));
if (CollectionUtils.isNotEmpty(groupByStatus.get(false))){
icNatService.insertBatch(groupByStatus.get(false));
for (List<IcNatEntity> icNatEntities : ListUtils.partition(groupByStatus.get(false), 500)) {
icNatService.insertBatch(icNatEntities);
}
}
//组织关系表
List<IcNatRelationEntity> relationEntities = new ArrayList<>();

Loading…
Cancel
Save