sSql .append( "select id,hbbh,sfjdm,qfsj,zdjdm," )
.append( " jlsj,zxbq,fjxh,note,")
.append( " to_char(qszxrq,'yyyy-mm-dd') as qszxrq, to_char(zzzxrq,'yyyy-mm-dd') as zzzxrq,qrbz,dw,hkgs,userid,czrq, ")
.append( " case when trunc(sysdate)<qszxrq then '1' ")
.append( " when trunc(sysdate)<=zzzxrq and trunc(sysdate)>=qszxrq then '2' ")
.append( " when trunc(sysdate)> zzzxrq then '3' ")
.append( " else '*' ")
.append( " end as sxbz ,")
.append( " '2' as zxbx ")//默认备选
.append( " from dd_hbxxb a where 1=1 ")
.append( " and not exists (select * ")
.append( " from dd_hbjh b ")
.append( " where a.sfjdm = b.sfjdm ")
.append( " and a.zdjdm = b.zdjdm ")
.append( " and a.id = b.hbid ) ");