|
|
|
@ -3,8 +3,10 @@ package com.biutag.supervisiondata.service.impl; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.biutag.supervisiondata.common.interfaces.CompletableFutureUtil; |
|
|
|
import com.biutag.supervisiondata.common.interfaces.CompletableFutureUtil; |
|
|
|
import com.biutag.supervisiondata.pojo.constants.Default; |
|
|
|
import com.biutag.supervisiondata.pojo.constants.Default; |
|
|
|
|
|
|
|
import com.biutag.supervisiondata.pojo.constants.Media; |
|
|
|
import com.biutag.supervisiondata.pojo.database.Contradiction; |
|
|
|
import com.biutag.supervisiondata.pojo.database.Contradiction; |
|
|
|
import com.biutag.supervisiondata.pojo.database.PointOrg; |
|
|
|
import com.biutag.supervisiondata.pojo.database.PointOrg; |
|
|
|
|
|
|
|
import com.biutag.supervisiondata.pojo.domain.PersonImageInfo; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.ads.GBaseSYRKXX; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.ads.GBaseSYRKXX; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseJJD; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseJJD; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseZDRY; |
|
|
|
import com.biutag.supervisiondata.pojo.entity.dwd.GBaseZDRY; |
|
|
|
@ -509,6 +511,34 @@ public class PersonalServiceImpl implements PersonalService { |
|
|
|
wdpcPersonRepository.saveBatch(personList, 10000); |
|
|
|
wdpcPersonRepository.saveBatch(personList, 10000); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final RiskPersonInfoRepository infoRepository; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void syncPersonImage() { |
|
|
|
|
|
|
|
int total = wdpcPersonRepository.getBaseMapper().selectPersonImageCount(); |
|
|
|
|
|
|
|
log.info("有效头像共:{}", total); |
|
|
|
|
|
|
|
List<PersonImageInfo> infoList; |
|
|
|
|
|
|
|
List<RiskPersonInfo> infos; |
|
|
|
|
|
|
|
for (int page = 1; ; page++) { |
|
|
|
|
|
|
|
log.info("{}", page); |
|
|
|
|
|
|
|
int pageNo = (page- 1) * 10000; |
|
|
|
|
|
|
|
int pageSize = 10000; |
|
|
|
|
|
|
|
infoList = wdpcPersonRepository.getBaseMapper().selectPersonImagePage(pageNo, pageSize); |
|
|
|
|
|
|
|
infos = new ArrayList<>(); |
|
|
|
|
|
|
|
log.info("图像转base64开始:{}",infoList.size()); |
|
|
|
|
|
|
|
for (PersonImageInfo item : infoList) { |
|
|
|
|
|
|
|
RiskPersonInfo info = new RiskPersonInfo(); |
|
|
|
|
|
|
|
info.setIdCode(item.getIdCode()); |
|
|
|
|
|
|
|
info.setImageBase64(Media.JPEG.concat(Base64.getEncoder().encodeToString(item.getImage()))); |
|
|
|
|
|
|
|
infos.add(info); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
infoRepository.saveBatch(infos, 1000); |
|
|
|
|
|
|
|
if(pageNo + pageSize >= total) { |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通过身份证号查询实有人口 |
|
|
|
* 通过身份证号查询实有人口 |
|
|
|
* |
|
|
|
* |
|
|
|
|