diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 4f067f4..7ffef15 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -1404,13 +1404,14 @@ left outer join assign ua on ua.asno=u.asno - (p.pstatus in (21) and p.rstatus = 0) - (p.pstatus in (22) and p.rstatus = 0) - (p.pstatus in (1) and (p.rstatus = 0 or pri.pino is null)) - (pr.rfdno is not null and pr.rstatus = 0) - (pi.rstatus=1 and p.payamt>p.refundamt) - (p.rstatus > 0 and p.payamt=p.refundamt) - (p.pstatus in (41,42,43) and p.rstatus = 0) + (p.pstatus in (21) and p.rstatus = 0) + (p.pstatus in (22) and p.rstatus = 0) + (p.pstatus in (1) and (p.rstatus = 0 or pri.pino is null)) and p.rstatus = 0 + and (case when p.rstatus=0 and pr.rstatus = 0 and pri.rfdno is not null then 1 else 0 end) = 0 + (pr.rfdno is not null and pr.rstatus = 0) + (pi.rstatus=1 and p.payamt>p.refundamt) + (p.rstatus > 0 and p.payamt=p.refundamt) + (p.pstatus in (41,42,43) and p.rstatus = 0) ) a