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t WHERE 1 = 2 PKEY
//PKEY,ZBPKEY,SFX,SFXDJ,SFXSL,SFXZJE,JBDWSL,YZMXPKEY,YZTS,YZYF,IS_JB,GZFL,KSS1_BDD,KSS1_BDDS,KSS1_DDD,KSS1_DDDS,KSS2_BDD,KSS2_BDDS,KSS2_DDD,KSS2_DDDS,KSS3_BDD,KSS3_BDDS,KSS3_DDD,KSS3_DDDS
= ? AND a.JFRQ <= ? GROUP BY b.CFH, a.JGID ) SELECT b.CFH, d.JZLX, d.JJKS, b.YZXZYS, b.HZPKEY , b.JZPKEY, MAX(b.YZTS) AS YZTS , c.GZFL, c.JXDL, COUNT(c.BM) AS ISYP FROM HIS_SFZD_SFXMXB a LEFT JOIN HIS_YZ_MXB b ON a.JGID = b.JGID AND a.YZMX = b.PKEY LEFT JOIN HIS_YPXX c ON b.YZXPKEY = c.BM LEFT JOIN HIS_JZ_BASEINFO d ON b.JGID = d.JGID AND b.JZPKEY = d.PKEY WHERE a.JGID = ? AND EXISTS ( SELECT 1 FROM CF WHERE CF.cfh = b.cfh ) GROUP BY b.CFH, d.JZLX, d.JJKS, b.YZXZYS, b.HZPKEY , b.JZPKEY, c.GZFL, c.JXDL ]]> //CFH,JZLX,JJKS,YZXZYS,HZPKEY,JZPKEY,YZTS,GZFL,JXDL,ISYP

12

93

93

12

=? AND a.JFRQ <=? ]]> //SFPKEY,YZPKEY,CFH,YZXPKEY,YZMC,ISGJJBYW,SFXZFY,GZFL,YZYF,MC,ISJMGY,ISZSGY,BDD,DDD,DXSL,DXDW,JBDW,YZDW,SFXSL,SFX,SFXDJ,YZMX,YZTS,JXDL,JZLX

12

93

93

SELECT PKEY, ZBPKEY, SFX, SFXDJ, SFXSL, SFXZJE, JBDWSL, YZMXPKEY, YZTS, YZYF, IS_JB, GZFL, KSS1_BDD, KSS1_BDDS, KSS1_DDD, KSS1_DDDS, KSS2_BDD, KSS2_BDDS, KSS2_DDD, KSS2_DDDS, KSS3_BDD, KSS3_BDDS, KSS3_DDD, KSS3_DDDS, KSS_DDDS FROM HIS_GAT_YPCF_MXB WHERE ZBPKEY =? PKEY
//PKEY,ZBPKEY,SFX,SFXDJ,SFXSL,SFXZJE,JBDWSL,YZMXPKEY,YZTS,YZYF,IS_JB,GZFL,KSS1_BDD,KSS1_BDDS,KSS1_DDD,KSS1_DDDS,KSS2_BDD,KSS2_BDDS,KSS2_DDD,KSS2_DDDS,KSS3_BDD,KSS3_BDDS,KSS3_DDD,KSS3_DDDS,KSS_DDDS

12