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.WARD,c.hzlx,c.bed,g.PKEY anespkey,c.cybed,c.jjys,c.JZZT from HIS_OPA_ORDER a left join HIS_YZ_MXB b on a.JGID=b.JGID and a.yzmx=b.pkey left join HIS_JZ_BASEINFO c on a.JGID=c.JGID and a.jzpkey=c.pkey left join HIS_HZINFO d on a.JGID=d.JGID and a.hzpkey=d.pkey left join HIS_OPA_ORDER_SQZD e on a.JGID=e.JGID and a.pkey=e.opapkey AND e.ismain='1' left join HIS_OPA_ORDER_PLANOPA f on a.JGID=f.JGID and a.pkey=f.opapkey and f.ismain='1' left join HIS_OPA_ANES g on a.pkey=g.OPAPKEY and a.JGID=g.JGID where a.JGID=? and a.hzpkey=? and a.jzpkey=? and a.OPASTATE !='003' and a.OPASTATE !='004' and b.YZZT != '5' order by a.CJRQ YZMXPKEYYZZTJGID
PKEYJGID

12

12

12