提交 27d95d10 编写于 作者: Z zhourui

修复ActionListWithPersonWithUnitObject

上级 0834f67a
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册