select point,year,sys_enterpriseid,sum(amount) amount from (SELECT 0+CAST(if(isclose,t1.price*t1.deliedqty,amount) AS CHAR) amount, QUARTER(t2.billdate) point,YEAR(t2.billdate) year,t2.sys_enterpriseid FROM sa_orderitems t1
INNER JOIN sa_order t2 ON t1.sa_orderid=t2.sa_orderid AND t1.siteid=t2.siteid
-WHERE t1.siteid = $siteid$ and t2.sys_enterpriseid in $sys_enterpriseid$ and $where1$) a
+WHERE t1.siteid = $siteid$ and t2.sys_enterpriseid in $sys_enterpriseid$ and $where1$) a where ifnull(year,'')!=''
select point,year,sys_enterpriseid,sum(amount) amount from (SELECT 0+CAST(amount AS CHAR) amount, QUARTER(period) point,YEAR(period) year,sys_enterpriseid FROM sa_cashbill
- WHERE siteid =$siteid$ AND status in('审核') and ($where1$) and type=1 and sys_enterpriseid in $sys_enterpriseid$) a
+ WHERE siteid =$siteid$ AND status in('审核') and ($where1$) and type=1 and sys_enterpriseid in $sys_enterpriseid$) a where ifnull(year,'')!=''
select point,year,sys_enterpriseid,sum(amount) amount from (SELECT 0+CAST(if(isclose,t1.price*t1.deliedqty,amount) AS CHAR) amount, QUARTER(t2.billdate) point,YEAR(t2.billdate) year,t2.sys_enterpriseid FROM sa_orderitems t1
INNER JOIN sa_order t2 ON t1.sa_orderid=t2.sa_orderid AND t1.siteid=t2.siteid
-WHERE t1.siteid = $siteid$ and t2.sys_enterpriseid in $sys_enterpriseid$ and $where1$) a
+WHERE t1.siteid = $siteid$ and t2.sys_enterpriseid in $sys_enterpriseid$ and $where1$) a where ifnull(year,'')!=''