select d.disab_info_id from CH_DISAB_ACCOUNTS_detail d where d.mode_name <![CDATA[ <> ]]> '异地' and to_char(d.accounts_time,'yyyy-MM') = to_char(sysdate,'yyyy-MM')
select d.disab_info_id from CH_DISAB_ACCOUNTS_detail d where d.mode_name <![CDATA[ <> ]]> '异地' and to_char(d.accounts_time,'yyyy-MM') = to_char(sysdate,'yyyy-MM')
)
)
-- 该人员未退出,或者退出时间大于等于当月时间才需要结算金额
-- 该人员未退出,或者退出时间大于异地申请时间,并且退出时间大于等于当月时间才需要结算金额
and (info.EXIT_TIME is null or info.EXIT_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd'))
and (info.EXIT_TIME is null or (info.EXIT_TIME> info.OTHER_APPLY_TIME
and info.EXIT_TIME >= to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')))