帆软-第一张报表
步骤:
- 链接数据库
2.写SQL:写查询
SELECT … FROM 表
– 下面的语句是为了查询时的多个参数,只选择任意几个,有几个不选择也是可以的
–方法一
这是开始和结束日期参数
where manage_date between ‘ p b e g i n d a t e ′ a n d ′ {p_begin_date}' and ' pbegindate′and′{p_end_date}’
下面是审核状态,工时类型,员工职位 的查询参数,当无时,就忽略这个条件,当选择的时候就是选择的参数
and if(length(concat(’ p s t a t u s ′ ) ) = 0 , 1 = 1 , s t a t u s i n ( ′ {p_status}'))=0,1=1,status i