报表查询条件(报表三)

允许为空的查询条件写法
${if(len(stu)==0,"",“and (’”+stu+"’) LIKE CONCAT(’%’,a.STU_PLATFORM_SYS_USER_ID,’%’) ")}

日期
${if(len(date1)==0,""," and DATE_FORMAT(f.createtime,’%Y-%m-%d’) >= ‘"+date1+"’")}
${if(len(date2)==0,""," and DATE_FORMAT( f.endtime,’%Y-%m-%d’) <= ‘"+date2+"’")}

机构数
${IF(len(orgNos)==0,""," AND C.PLATFORM_SYS_ORG_NO in (’" + TREELAYER(orgNos,true,"’,’") + “’)”)}

${IF(LEN(orgNos)==0,""," AND a.PLATFORM_SYS_ORG_NO IN (’" + treelayer(orgNos,true,"’,’") + “’)”)}

你可能感兴趣的:(报表设计)