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

获取家庭成员根据patIds

上级 6cea988d
流水线 #25686 已失败 于阶段
in 0 second
......@@ -35,4 +35,6 @@ public interface AcctPatFamilyMapper {
int initBatch(List<AcctPatFamily> list);
List<AcctPatFamily> getMemberListByPatIds(List<Integer> patIds);
}
\ No newline at end of file
......@@ -280,8 +280,8 @@ public class PatHealthPackServiceIml implements PatHealthPackService {
List<AcctPatFamilyDto> failList = new ArrayList<>();
List<Integer> patIds = memberList.stream().map(obj -> obj.getPatientId()).collect(toList());
List<AcctPatFamilyDto> relatedPats = new ArrayList<>();
List<AcctPatFamily> familyList = patFamilyMapper.getListByPatIds(patIds);
for(AcctPatFamily member : familyList){
List<AcctPatFamily> members = patFamilyMapper.getMemberListByPatIds(patIds);
for(AcctPatFamily member : members){
if(!familyReqReq.getAcctId().equals(member.getAcctId())){
//居民已被其他账户绑定为家庭成员
AcctPatFamilyDto failOne = new AcctPatFamilyDto();
......
......@@ -185,6 +185,18 @@
and delete_flag = 1;
</select>
<select id="getMemberListByPatIds" parameterType="java.util.List" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from account_pat_family
where patient_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
AND relation != 1
and delete_flag = 1;
</select>
<select id="getByPatIdSelfList" parameterType="java.util.List" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册