修复打印模板列表不显示

This commit is contained in:
钱涛 2024-11-11 16:58:16 +08:00
parent 02de1e4444
commit 99274b95ec
1 changed files with 13 additions and 3 deletions

View File

@ -205,9 +205,19 @@ public class SettingServiceImpl extends Service implements SettingService {
PageLinkPO link = getPageLinkMapper().getLink((long) user.getUID(), SALARY_DETAILS_REPORT.getValue());
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService().listAllTaxAgents((long) user.getUID());
List<Long> taxIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId, Collectors.toList());
List<String> taxIds = SalaryEntityUtil.properties(taxAgentPOS, po -> po.getId().toString(), Collectors.toList());
pos = pos.stream()
.filter(po -> po.getSharedType() != 1 || CollectionUtil.intersection(po.getLimitIds(), taxIds).size() != 0)
.filter(po -> {
if (po.getSharedType() == 1) {
List<Long> limitIds = po.getLimitIds();
List collect = new ArrayList<>();
for (int i = 0; i < limitIds.size(); i++) {
collect.add(limitIds.get(i).toString());
}
return CollectionUtil.isNotEmpty(limitIds) && CollectionUtil.intersection(collect, taxIds).size() != 0;
}
return true;
})
.peek(po -> {
po.setChecked(link != null && po.getId().equals(link.getTemplateId()));
})
@ -284,7 +294,7 @@ public class SettingServiceImpl extends Service implements SettingService {
if (link != null) {
PageListTemplateDTO pageListTemplate = getPageListTemplate(PageListTemplateQueryParam.builder().page(page).id(link.getTemplateId()).build());
return pageListTemplate.getChecked();
}else {
} else {
PageListTemplateDTO pageListTemplate = getPageListTemplate(PageListTemplateQueryParam.builder().page(page).build());
return pageListTemplate.getSetting();
}