|
|
@@ -61,10 +61,11 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
* @param info 分页新
|
|
|
* @param filter 过滤条件
|
|
|
* @param state 过滤状态
|
|
|
+ * @param overdue 是否过期 1、已过期;0、未过期
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public Page<PurcInquiryItemInfo> findTodoByPageInfo(final PageInfo info, SearchFilter filter, String state) {
|
|
|
+ public Page<PurcInquiryItemInfo> findTodoByPageInfo(final PageInfo info, SearchFilter filter, String state, Integer overdue) {
|
|
|
if (null != filter) {
|
|
|
if (StringUtils.hasText(filter.getKeyword())) {
|
|
|
SimpleExpression cmpCode = new SimpleExpression("cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE);
|
|
|
@@ -104,6 +105,15 @@ public class InquiryServiceImpl implements InquiryService {
|
|
|
info.expression(logicalExpression);
|
|
|
}
|
|
|
}
|
|
|
+ if (null != overdue) {
|
|
|
+ // 已超过截止日期
|
|
|
+ if (overdue.equals(Constant.YES)) {
|
|
|
+ SimpleExpression date = new SimpleExpression("endDate", new Date(System.currentTimeMillis()), CriterionExpression.Operator.LT);
|
|
|
+ SimpleExpression[] simpleExpressions = new SimpleExpression[]{date};
|
|
|
+ LogicalExpression logicalExpression = PredicateUtils.and(simpleExpressions);
|
|
|
+ info.expression(logicalExpression);
|
|
|
+ }
|
|
|
+ }
|
|
|
return inquiryItemDao.findAll(new Specification<PurcInquiryItemInfo>() {
|
|
|
public Predicate toPredicate(Root<PurcInquiryItemInfo> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
query.where(info.getPredicates(root, query, builder));
|