|
|
@@ -1030,12 +1030,14 @@ public class AssetService {
|
|
|
criteriaBuilder.lessThan(root.get("lockTo"), LocalDateTime.now()))),
|
|
|
// and status = 'NORMAL'
|
|
|
criteriaBuilder.equal(root.get("status"), AssetStatus.NORMAL),
|
|
|
+
|
|
|
+ criteriaBuilder.equal(root.get("consignment"), false),
|
|
|
// and has some tagId
|
|
|
root.join("tags").get("id").in(tags.stream().map(Tag::getId).toArray()))
|
|
|
.getRestriction(), pageable);
|
|
|
} else {
|
|
|
- return assetRepo.findByUserIdAndStatusAndCompanyIdAndNameLike(userId, AssetStatus.NORMAL, companyId,
|
|
|
- "%" + commonMatchDTO.getCollectionName() + "%", pageable);
|
|
|
+ return assetRepo.findByUserIdAndStatusAndCompanyIdAndNameLikeAndConsignment(userId, AssetStatus.NORMAL, companyId,
|
|
|
+ "%" + commonMatchDTO.getCollectionName() + "%", pageable, false);
|
|
|
}
|
|
|
}
|
|
|
|