提交 f0208aad 编写于 作者: O o2null

Merge branch 'fix/ScriptObject' into 'wrdp'

修复ActionListWithPersonWithUnitObject

See merge request o2oa/o2oa!1895
...@@ -64,12 +64,11 @@ class ActionListWithPersonWithUnitObject extends BaseAction { ...@@ -64,12 +64,11 @@ class ActionListWithPersonWithUnitObject extends BaseAction {
Root<Identity> root = cq.from(Identity.class); Root<Identity> root = cq.from(Identity.class);
Predicate p = cb.disjunction(); Predicate p = cb.disjunction();
for (Pair o : cartesian) { 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()))); cb.equal(root.get(Identity_.person), o.getPerson())));
} }
List<String> identityIds = em.createQuery(cq.select(root.get(Identity_.id)).where(p)) List<String> identityIds = em.createQuery(cq.select(root.get(Identity_.id)).where(p)).getResultList().stream()
.getResultList().stream().distinct().collect(Collectors.toList()); .distinct().collect(Collectors.toList());
identityIds = ListTools.trim(identityIds, true, true);
List<Identity> list = business.identity().pick(identityIds); List<Identity> list = business.identity().pick(identityIds);
for (Identity o : list) { for (Identity o : list) {
wos.add(this.convert(business, o, Wo.class)); 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.
先完成此消息的编辑!
想要评论请 注册