|
|
@@ -64,12 +64,11 @@ class ActionListWithPersonWithUnitObject extends BaseAction {
|
|
|
Root<Identity> root = cq.from(Identity.class);
|
|
|
Predicate p = cb.disjunction();
|
|
|
for (Pair o : cartesian) {
|
|
|
- p = cb.or(cb.and(cb.equal(root.get(Identity_.unit), o.getUnit()),
|
|
|
+ p = cb.or(p, cb.and(cb.equal(root.get(Identity_.unit), o.getUnit()),
|
|
|
cb.equal(root.get(Identity_.person), o.getPerson())));
|
|
|
}
|
|
|
- List<String> identityIds = em.createQuery(cq.select(root.get(Identity_.id)).where(p))
|
|
|
- .getResultList().stream().distinct().collect(Collectors.toList());
|
|
|
- identityIds = ListTools.trim(identityIds, true, true);
|
|
|
+ List<String> identityIds = em.createQuery(cq.select(root.get(Identity_.id)).where(p)).getResultList().stream()
|
|
|
+ .distinct().collect(Collectors.toList());
|
|
|
List<Identity> list = business.identity().pick(identityIds);
|
|
|
for (Identity o : list) {
|
|
|
wos.add(this.convert(business, o, Wo.class));
|