Commit 8d47ba0e by 罗志长

fix: 平台设备关联长者

parent b5f93060
...@@ -108,7 +108,10 @@ ...@@ -108,7 +108,10 @@
and pd.device_license is null and pd.device_license is null
</if> </if>
<if test="param.elderId !=null and param.elderId != ''"> <if test="param.elderId !=null and param.elderId != ''">
and (pe.id = #{param.elderId} and ((prbd.bed_id is null and prbd.room_id = pe.room_id) or (prbd.bed_id is not null and prbd.bed_id = pe.bed_id))) and (pe.id = #{param.elderId} and
((pd.category != '0' and prbd.bed_id is null and prbd.room_id = pe.room_id) -- 空间、跌倒 关联房间
or
(pd.category = '0' and prbd.bed_id is not null and prbd.bed_id = pe.bed_id))) -- 呼吸 关联床位
</if> </if>
<if test="param.orgIds != null and param.orgIds.size() > 0 "> <if test="param.orgIds != null and param.orgIds.size() > 0 ">
AND pd.org_id in AND pd.org_id in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment