|
|
@@ -485,12 +485,11 @@ public class PurchaseManage { |
|
|
|
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) |
|
|
|
.eq(req.getStatus() != null, function, req.getStatus()) |
|
|
|
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT |
|
|
|
+ "and np.stage != {0}", ProjectStatus.STOPPED) |
|
|
|
+ "and np.stage != {0}", ProjectStatus.STOPPED.getCode()) |
|
|
|
.isNotNull(function) |
|
|
|
.orderByDesc(Purchase::getCreateOn); |
|
|
|
boolean display = !Boolean.FALSE.equals(req.getDisplay()); |
|
|
|
String existsSql = String.format("select 1 from nd_project_operation no" + |
|
|
|
" where no.bid_id = nd_purchase.id and no.%s is not null", actualTimeColumn); |
|
|
|
String existsSql = String.format(ExistsSqlConst.PURCHASE_EXISTS_OPERATION + " and npo.%s is not null", actualTimeColumn); |
|
|
|
if (display) { |
|
|
|
query.and(q1 -> q1.eq(Purchase::getBidType, BidTypeEnum.BUILD_APP.getCode()) |
|
|
|
.or(q2 -> q2.exists(existsSql))); |
|
|
|