// 获取近30天 员工持股业绩考核内容为空的数据
List<OssMetaGqDto> ossMetaList = iOssMetaDataService.selectOssEmployeeStockPathList();
if (CollectionUtils.isEmpty(ossMetaList)) {
log.info("未加载到待解析的员工持股草案。");
return;
}
List<EmployeeStockInfo> employeeStockInfoList = Lists.newArrayList();
List<EmployeeStockUserInfo> employeeStockUserInfoList = Lists.newArrayList();
List<EmployeeStockUnlockSchedule> employeeStockUnlockScheduleList = Lists.newArrayList();
for (OssMetaGqDto ossMetaGqDto : ossMetaList) {
if (ossMetaGqDto == null || StringUtils.isEmpty(ossMetaGqDto.getFilePath())) {
continue;
}
// 读取员工持股草案PDF文件内容
PdfFileDto pdfFileDto = iAliYunOssDataService.fetchPdfFileDto(ossMetaGqDto.getFilePath());
if (pdfFileDto == null || CollectionUtils.isEmpty(pdfFileDto.getCatalogMap())
|| CollectionUtils.isEmpty(pdfFileDto.getChapterContentMap())) {
continue;
}
// 公司业绩考核内容
String companyAppraisal = employeeStockAppraisalService.fetchCompanyAppraisal(pdfFileDto);
// 个人业绩考核内容
String personAppraisal = employeeStockAppraisalService.fetchPersonAppraisal(pdfFileDto);
// 摊销成本
BigDecimal amortizedCost = employeeStockAmortizedService.fetchAmortizedCost(pdfFileDto);
// 解析激励对象
List<EmployeeStockUserInfo> stockUserInfoList = employeeStockUserService.fetchStockUserList(ossMetaGqDto.getPlanId(), pdfFileDto);
if (!CollectionUtils.isEmpty(stockUserInfoList)) {
employeeStockUserInfoList.addAll(stockUserInfoList);
}
// 行权解锁
List<EmployeeStockUnlockSchedule> unlockList = employeeStockUnlockService.fetchUnlockList(ossMetaGqDto.getPlanId(), pdfFileDto);
if(StringUtils.isNotEmpty(companyAppraisal) || StringUtils.isNotEmpty(personAppraisal) || amortizedCost.intValue() > 0) {
EmployeeStockInfo employeeStockInfo = EmployeeStockInfo.builder()
.id(ossMetaGqDto.getPlanId())
.companyAppraisalContent(companyAppraisal)
.personalAppraisalContent(personAppraisal)
.amortizedCost(amortizedCost)
.build();
employeeStockInfoList.add(employeeStockInfo);
}
if (!CollectionUtils.isEmpty(unlockList)) {