public PlanDao getDao(){
return (PlanDao)this.dao;
}
public ListPage<Plan> list(ListPage<Plan> page,Plan t ){
SearchCondition sc = new SearchCondition();
if( t != null ){
if( !StringUtils.isEmpty(t.getId()) )
sc.like( "id",t.getId() );
if( t.get_pftPeriod() != null ){
Calendar cal = Calendar.getInstance();
Date start = t.get_pftPeriod().getStart();
Date end = t.get_pftPeriod().getEnd();
if( start != null ){
cal.setTime(start);
sc.greateThanOrEqual("planFireTime",cal);
}
if( end != null ){
Calendar cal_end = Calendar.getInstance();
cal_end.setTime(end);
cal_end.add(Calendar.DAY_OF_MONTH, 1);
cal_end.add(Calendar.SECOND, -1);
sc.lessThanOrEqual("planFireTime",cal_end);
}
}
}
return super.list(page, sc);