提交 4963d488 编写于 作者:  Peijun.zhao's avatar Peijun.zhao

add filter null obj

上级 4e153895
流水线 #25573 已失败 于阶段
in 0 second
...@@ -129,13 +129,13 @@ public class PatHealthPackServiceIml implements PatHealthPackService { ...@@ -129,13 +129,13 @@ public class PatHealthPackServiceIml implements PatHealthPackService {
patFamilyList = patFamilyMapper.getListByPatIds(allPadIds); patFamilyList = patFamilyMapper.getListByPatIds(allPadIds);
for(AcctPatFamily family : patFamilyList){ for(AcctPatFamily family : patFamilyList){
AcctPatFamilyDto dto = new AcctPatFamilyDto(); AcctPatFamilyDto dto = new AcctPatFamilyDto();
if(!dto.getRelation().equals(1)){ if(!family.getRelation().equals(1)){
dto.setPatientId(family.getPatientId()); dto.setPatientId(family.getPatientId());
dto.setRelation(family.getRelation()); dto.setRelation(family.getRelation());
} }
dtos.add(dto); dtos.add(dto);
} }
resp.setMemberPatIds(dtos.stream().map(obj ->obj.getPatientId()).collect(toList())); resp.setMemberPatIds(dtos.stream().map(obj ->obj.getPatientId()).filter(x -> x!=null).collect(toList()));
} }
resp.setMemberList(dtos); resp.setMemberList(dtos);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册