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DTIME,a.SDYZFH,a.SDYZFHMAN,a.SDYZFHTIME,b.xm,b.xb,a.BABM from HIS_JZ_BASEINFO a left join HIS_HZINFO b on a.hzpkey=b.pkey and a.JGID=b.JGID where a.JGID=? and a.JZLX='Z' #select# order by a.BAGDTIME desc PKEYHZPKEYJGID

12

93

93

select a.PKEY,a.HZPKEY,a.SQR,a.SQRQ,a.CKR,a.CKRQ,a.RKR,a.RKRQ,a.JYKS,a.JYYS,a.KSDH,a.YSDH,a.JYMD,a.YJGHRQ,a.JYBZ,a.GHZT,a.CJR,a.CJRQ,a.XGR,a.XGRQ,a.JGID,a.LOCKFLAG,b.zybah,b.zyno,b.zynum,b.jznl,c.xm,c.xb,b.pkey jzpkey,b.bajy from HIS_BA_JY a left join HIS_JZ_BASEINFO b on a.jzpkey=b.pkey and a.JGID=b.JGID left join HIS_HZINFO c on a.hzpkey=c.pkey and a.JGID=c.JGID where a.JGID=? order by a.CJRQ desc JZPKEYJGID
PKEYJGID

12

select a.PKEY,a.HZPKEY,a.GHPKEY,a.JZLX,a.JZZT,a.JZZB,a.HZFB,a.JZJS,a.ISYB,a.ISZZ,a.YYLX,a.ISLG,a.ISGSSJJ,a.HZYBLX,a.JJKS,a.JJRQ,a.JJYS,a.FBRQ,a.ZYNUM,a.WARD,a.ROOM,a.BED,a.KZRQ,a.JSRQ,a.THRY,a.HDYY,a.HDRQ,a.MZNUM,a.CJR,a.CJRQ,a.JGID,a.JZNO,a.MZNO,a.ZYNO,a.JZKH,a.CARDPKEY,a.JZNL,a.ISJZ,a.ZYLX,a.ZYHZLY,a.ZYYYRQ,a.CYRQ,a.CYYS,a.ZYNOOLD,a.SCZYRQ,a.ISGL,a.ISSJ,a.HZLX,a.GRLX,a.QTGRLX,a.CWFJLX,a.YSLX,a.MQJZINFO,a.ZKRQ,a.RYTJ,a.RYBQ,a.RYJZINFO,a.RYYS,a.RYQK,a.JZZL,a.JYYJ,a.ZYBZ,a.RYZD,a.RYZDMS,a.ZYBAH,a.RY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Q,JGID,LOCKFLAG from HIS_BA_PF where JGID=? and hzpkey=? and jzpkey=? PKEYJGID

12

12

12

select PKEY,HZPKEY,JZPKEY,PFPKEY,ZKBM,ZKMC,ZKFZ,ZKBZ,BZ,ZKR,ZKRQ,ZRKS,ZRR,CJR,CJRQ,XGR,XGRQ,JGID,LOCKFLAG from HIS_BA_PF_MX where JGID=? and PFPKEY=? order by pkey PKEY

12

12