create or replace view vw_zs_dzbfhzdxx as
select distinct A.FFBZBM DBZBM0,BZMC00 DBZMC0,a.YBZXLB,a.YBBRLB,''BRLBMC,
       BZSFJE YBHDJE,'' GRZFJE,'' TCJJJE,'' YYZFJE,BZ0000,SSCZBM SSCZBM,ZCZMC0 SSCZMC,
       '' SFLSTD,'' ZFBL01,'' ZFBL02,'' ZFBL03,'' YJJE00,B.ZYID00,A.BZMCPY
  from BM_BZSFBZ A,ZY_BRXXB0 B 
 where A.FBBH00=B.FBBH00 and A.YBZXLB=B.YBZXLB
   and (A.YBBRLB=B.YBBRLB or exists (select 1  from XT_XTCS00 where NAME00='ZS_SFXYQDDBZTJ' and trim(VALUE0)='Y')) 
 order by A.BZMCPY
