|
|
@@ -118,8 +118,8 @@ class ActionListLike extends BaseAction {
|
|
|
CriteriaQuery<String> cq = cb.createQuery(String.class);
|
|
|
Root<Identity> root = cq.from(Identity.class);
|
|
|
Predicate p = cb.conjunction();
|
|
|
- p = cb.and(p, cb.or(cb.like(cb.lower(root.get(Identity_.name)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
- cb.like(cb.lower(root.get(Identity_.unique)), "%" + str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
+ p = cb.and(p, cb.or(cb.like(cb.lower(root.get(Identity_.name)), str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
+ cb.like(cb.lower(root.get(Identity_.unique)), str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
cb.like(cb.lower(root.get(Identity_.pinyin)), str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
cb.like(cb.lower(root.get(Identity_.pinyinInitial)), str + "%", StringTools.SQL_ESCAPE_CHAR),
|
|
|
cb.like(cb.lower(root.get(Identity_.distinguishedName)), str + "%", StringTools.SQL_ESCAPE_CHAR)));
|
|
|
@@ -134,8 +134,10 @@ class ActionListLike extends BaseAction {
|
|
|
set.addAll(unitDutyIdentities);
|
|
|
}
|
|
|
if (ListTools.isNotEmpty(wi.getUnitList())) {
|
|
|
- List<String> identityIds = business.expendUnitToIdentity(wi.getUnitList());
|
|
|
- set.addAll(identityIds);
|
|
|
+ List<String> units = business.expendUnitToUnit(wi.getUnitList());
|
|
|
+ if (units.isEmpty()) {
|
|
|
+ p = cb.and(p, root.get(Identity_.unit).in(units));
|
|
|
+ }
|
|
|
}
|
|
|
if (ListTools.isNotEmpty(wi.getGroupList())) {
|
|
|
List<String> identityIds = business.expendGroupToIdentity(wi.getGroupList());
|