|
|
|
( select distinct A.JGID,A.BM,A.MC||'['||F.WZGG||']' MC,A.YZDL,A.YZZL,A.ISDDYZ,A.ISXSYZ,A.ISMZSY,A.ISJZSY,A.ISZYSY,A.DCZDJL,A.MTZDJL,A.ZDL,A.SZSYTS,A.YF,A.LC,A.PC,A.ISMZPSYY,A.ISZYPSYY,A.ISMZSJL,A.ISZYSJL,C.JG JE,A.BZ,A.ZT,A.YZDW JBDW,A.YZDW RKDW,1 ZHXS,A.YZDW MZFYDW,A.YZDW ZYFYDW,A.JE JBJG,F.WZGG GG,A.YZDW,1 DXSL,A.YZDW DXDW,A.MC TYM,'0' ISKJY,'0' ISJK,'0' ISGJJBYW,'0' ISPS,nvl(E.SL,0) SL,nvl(E.DJSL,0) DJSL,nvl(E.KYSL,0) KYSL,'' GZFL,'' DDD,'' WHONET,'' JX,'' TYMPKEY,A.GLLX,A.LMT_USED_FLAG,A.XZSYFW,A.CHRGITM_LV,A.YBBM,A.YBMC from HIS_YZX A left join HIS_YZX_ZJM B on A.BM=B.YZX_BM and A.JGID=B.JGID LEFT JOIN HIS_SFX C ON A.JGID=C.JGID AND A.BM=C.BM LEFT JOIN HIS_KSKC E ON A.JGID=E.JGID AND A.BM=E.SFX_BM left join HIS_MMS_WZZD F on C.GLBM=F.WZBM AND C.JGID=F.JGID WHERE A.JGID=? AND A.ISDDYZ = '1' AND A.ISJZSY != '1' AND ISZYSY !='1' AND A.ZT='1' AND A.GLLX = 'W' and (A.YZDL !='01' and A.YZDL !='02' and A.YZDL !='03') AND (B.PYM LIKE ? OR A.BM LIKE ? OR A.BM LIKE ? OR A.MC LIKE ?) AND E.KYSL > 0) |
|
|
|
( select distinct A.JGID,A.BM,A.MC||'['||F.WZGG||']' MC,A.YZDL,A.YZZL,A.ISDDYZ,A.ISXSYZ,A.ISMZSY,A.ISJZSY,A.ISZYSY,A.DCZDJL,A.MTZDJL,A.ZDL,A.SZSYTS,A.YF,A.LC,A.PC,A.ISMZPSYY,A.ISZYPSYY,A.ISMZSJL,A.ISZYSJL,C.JG JE,A.BZ,A.ZT,F.JBDW,F.RKDW,1 ZHXS,A.YZDW MZFYDW,A.YZDW ZYFYDW,C.JBJG,F.WZGG GG,A.YZDW,1 DXSL,A.YZDW DXDW,A.MC TYM,'0' ISKJY,'0' ISJK,'0' ISGJJBYW,'0' ISPS,nvl(E.SL,0) SL,nvl(E.DJSL,0) DJSL,nvl(E.KYSL,0) KYSL,'' GZFL,'' DDD,'' WHONET,'' JX,'' TYMPKEY,A.GLLX,A.LMT_USED_FLAG,A.XZSYFW,A.CHRGITM_LV,A.YBBM,A.YBMC from HIS_YZX A left join HIS_YZX_ZJM B on A.BM=B.YZX_BM and A.JGID=B.JGID LEFT JOIN HIS_SFX C ON A.JGID=C.JGID AND A.BM=C.BM LEFT JOIN HIS_KSKC E ON A.JGID=E.JGID AND A.BM=E.SFX_BM left join HIS_MMS_WZZD F on C.GLBM=F.WZBM AND C.JGID=F.JGID WHERE A.JGID=? AND A.ISDDYZ = '1' AND A.ISJZSY != '1' AND ISZYSY !='1' AND A.ZT='1' AND A.GLLX = 'W' and (A.YZDL !='01' and A.YZDL !='02' and A.YZDL !='03') AND (B.PYM LIKE ? OR A.BM LIKE ? OR A.BM LIKE ? OR A.MC LIKE ?) AND E.KYSL > 0) |