${if(len(yg) == 0 && (oop=='00000001' || len(oop)==0) ,"select hx.dwmc,hxzs,zxzs,sum(hxzs+zxzs) from (select xx.dwmc, sum(dm.xmdzzjf) hxzs from dm_hxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 group by xx.dwmc )hx left join (select xx.dwmc, sum(dm.xmdzzjf) zxzs from dm_zxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 group by xx.dwmc ) zx on hx.dwmc=zx.dwmcwhere 1=1"+ if(len(tbsj_ks) == 0,"","and tjny >= '" +tbsj_ks + "'")+ if(len(tbsj_js) == 0,"","and tjny <= '" +tbsj_js + "'") +"group by hx.dwmc,hxzs,zxzsorder by hxzs desc","") } ${if(len(yg) != 0 && (oop=='00000001' || len(oop)==0) ,"select hx.dwmc,hxzs,zxzs,sum(hxzs+zxzs) from (select xx.dwmc, sum(dm.xmdzzjf) hxzs from dm_hxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 and fzrh='yg' group by xx.dwmc )hx left join (select xx.dwmc, sum(dm.xmdzzjf) zxzs from dm_zxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 and fzrh='yg' group by xx.dwmc ) zx on hx.dwmc=zx.dwmcwhere 1=1"+ if(len(tbsj_ks) == 0,"","and tjny >= '" +tbsj_ks + "'")+ if(len(tbsj_js) == 0,"","and tjny <= '" +tbsj_js + "'") +"group by hx.dwmc,hxzs,zxzsorder by hxzs desc","") }${if(len(yg) == 0 && (oop!='00000001' || len(oop)!=0) ,"select hx.dwmc,hxzs,zxzs,sum(hxzs+zxzs) from (select xx.dwmc, sum(dm.xmdzzjf) hxzs from dm_jyshxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 and dm.lsdwh='"+oop+"' group by xx.dwmc )hx left join (select xx.dwmc, sum(dm.xmdzzjf) zxzs from dm_jyszxxm_info dm left join xx_yxsdwjbsj xx on dm.dwh=xx.dwh where 1=1 and dm.lsdwh='"+oop+"' group by xx.dwmc ) zx on hx.dwmc=zx.dwmcwhere 1=1"+ if(len(tbsj_ks) == 0,"","and tjny >= '" +tbsj_ks + "'")+ if(len(tbsj_js) == 0,"","and tjny <= '" +tbsj_js + "'") +"group by hx.dwmc,hxzs,zxzsorder by hxzs desc","") }当我oop和yg不输入任何数据的时候,应该调用第一个,但是报错,提示我select附近语法错误,单独执行就都可以