标签:join and jpa ica int cal gre get tween
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.YEAR, Integer.valueOf(reportYear));
Date yearFirst = calendar.getTime();
Calendar calendar0 = Calendar.getInstance();
calendar0.clear();
calendar0.set(Calendar.YEAR, Integer.valueOf(reportYear)+1);
Date yearEnd = calendar0.getTime();
//重点
predicates.add(
cb.or(
cb.between(root.get("flowEndTime"),yearFirst,yearEnd),
cb.greaterThanOrEqualTo(root.join("closeReport", JoinType.LEFT).get("flowEndTime"),yearFirst)
)
);
where project0_.flow_status = ?
and (project0_.flow_end_time between ? and ? or projectclo3_.flow_end_time >= ?)
标签:join and jpa ica int cal gre get tween
原文地址:https://www.cnblogs.com/nm666/p/11791314.html