${if(type='day', " and day(dbo.t0_C0019_d08.F4) >= '" + 开始日期 + "' and day(dbo.t0_C0019_d08.F4)<='" + 结束日期 + "'", "")}${if(type='month', " and cast(strftime('%m',dbo.t0_C0019_d08.F4) as int) = "+ 月 + " and strftime('%Y',dbo.t0_C0019_d08.F4) = '" + 年+"'", "")}${if(type='year', " and strftime('%Y',dbo.t0_C0019_d08.F4) = '" + 年+"'", "")}${if(len(是否完结)==0,"","and dbo.t0_C0017.F42 in ('"+是否完结+"')")}${if(len(生产车间)==0,"","and t0_C0019_d08.F1 in ('"+生产车间+"')")} ${if(len(生产工序)==0,"","and t0_C0019_d08.F2 in ('"+生产工序+"')")}