0
|
ooshanghaiLv5初级互助发布于2020-2-18 15:19(编辑于 2020-2-18 15:22)
|
直接在数据源的sql里写 AND USER_CODE = '${fine_username}'
|
-
Scyalcire(提问者)
- select * from erp_cmp_query
where \'1\'=\'1\'
${if(len(org_name)>0,\"AND org_name =\'\"+org_name+\"\'\",\"\")}
${if(len(VBILLNO)>0,\"AND VBILLNO =\'\"+VBILLNO+\"\'\",\"\")}
${if(len(SUPPLIER_NAME)>0,\"AND SUPPLIER_NAME like\'%\"+SUPPLIER_NAME+\"%\'\",\"\")}
${if(len(SETTLEFLAG)>0,\"AND SETTLEFLAG =\'\"+SETTLEFLAG+\"\'\",\"\")}
${if(len(USER_NAME)>0,\"AND USER_NAME =\'\"+USER_NAME+\"\'\",\"\")}
${if(len(startrq)>0&&len(stoprq)>0,\"AND BILLMAKEDATE BETWEEN\'\"+startrq+\"\' AND \'\"+stoprq+\"\'\",\"\")}
直接从视图取得数据,可以加在哪里
|
|