
select sum(HJJE00) HJJE00 from 
(select d.ZYID00,a.YPMC00,d.QDRQ00 QDRQ00,d.ZYH000 ZYH000,a.LSDJ00*a.YPZSL0 HJJE00 from YF_ZYCFMX a,BM_YD0000 b,YF_ZYCF00 c,ZY_BRFY00 d
where  c.DJH000=d.DJH000 and c.CFLSH0=a.CFLSH0 and a.YPNM00=b.YPNM00 and b.KSSJB0>'0' union all 
select c.ZYID00,a.YPMC00,c.QDRQ00 QDRQ00,c.ZYH000 ZYH000,a.LSDJ00*a.YPZSL0 HJJE00 from yf_yzypsq a,BM_YD0000 b,ZY_BRFY00 c
where  c.DJH000=a.DJH000 and a.YPNM00=b.YPNM00 and b.KSSJB0>'0')
where  QDRQ00 in ( '0','20240411','20240412','20240413','20240414','20240415','20240416','20240417','20240418','20240419','20240420','20240421','20240422' ) and  ZYH000  in ( '0','24031870' )
