同步单位 SynCompany
select
a.RWID00 as hisCompanyCode,
b.TTqC00||'('||a.RWID00||')' as hisCompanyName,
b.YYBH00 as hishospitalcode,
a.TTID00 as groupId,
a.RWYDRQ as examStart,
a.YDZZRQ as examEnd,
sysdate as insertTime,
1 as operateType,
1 as busiType,
0 as upload
from HM_YW_TTRW00 a inner join HM_YW_TJTT00 b on a.TTID00=b.TTID00
where exists(select 1 from TBL_HANDLELOG where KEYID = A.RWID00 and status = 0 and BUSCODE = 'COMPANYADD')
文档更新时间: 2023-05-25 15:40