|
|
@ -73,33 +73,37 @@ public class StaffGetEAIService extends AbsEAIService { |
|
|
|
List<StaffEntity> list = request.getObject("wait_register_personnel", StaffUtil.LIST_ENTITY_STAFF); |
|
|
|
LambdaQueryWrapper<StaffEntity> lmq = new LambdaQueryWrapper<>(); |
|
|
|
lmq.eq(StaffEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); |
|
|
|
lmq.and(queryWrapperInner -> { |
|
|
|
for (StaffEntity staff : list) { |
|
|
|
queryWrapperInner.or( |
|
|
|
wrapper -> wrapper |
|
|
|
.eq(!StringUtils.isEmpty(staff.getTabStatus()), StaffEntity::getTabStatus, staff.getTabStatus()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getId()), StaffEntity::getId, staff.getId()) |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
|
lmq.and(queryWrapperInner -> { |
|
|
|
for (StaffEntity staff : list) { |
|
|
|
queryWrapperInner.or( |
|
|
|
wrapper -> wrapper |
|
|
|
.eq(!StringUtils.isEmpty(staff.getTabStatus()), StaffEntity::getTabStatus, staff.getTabStatus()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getId()), StaffEntity::getId, staff.getId()) |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
List<StaffEntity> staffEntities = staffRepository.selectList(lmq); |
|
|
|
return EAIUtil.buildEAIResult(new JSONObject().fluentPut("wait_register_personnel", staffEntities)); |
|
|
|
} else if (OptionEnums.BASIC.getValue().equals(option)) { |
|
|
|
List<StaffEntity> list = request.getObject("wait_register_personnel", StaffUtil.LIST_ENTITY_STAFF); |
|
|
|
LambdaQueryWrapper<StaffEntity> lmq = new LambdaQueryWrapper<>(); |
|
|
|
lmq.eq(StaffEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); |
|
|
|
lmq.and(queryWrapperInner -> { |
|
|
|
for (StaffEntity staff : list) { |
|
|
|
queryWrapperInner.or( |
|
|
|
wrapper -> wrapper |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmployeeNo()), StaffEntity::getEmployeeNo, staff.getEmployeeNo()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmployeeName()), StaffEntity::getEmployeeName, staff.getEmployeeName()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEnEmployeeName()), StaffEntity::getEnEmployeeName, staff.getEnEmployeeName()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmail()), StaffEntity::getEmail, staff.getEmail()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getMobileNo()), StaffEntity::getMobileNo, staff.getMobileNo()) |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
|
lmq.and(queryWrapperInner -> { |
|
|
|
for (StaffEntity staff : list) { |
|
|
|
queryWrapperInner.or( |
|
|
|
wrapper -> wrapper |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmployeeNo()), StaffEntity::getEmployeeNo, staff.getEmployeeNo()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmployeeName()), StaffEntity::getEmployeeName, staff.getEmployeeName()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEnEmployeeName()), StaffEntity::getEnEmployeeName, staff.getEnEmployeeName()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getEmail()), StaffEntity::getEmail, staff.getEmail()) |
|
|
|
.eq(!StringUtils.isEmpty(staff.getMobileNo()), StaffEntity::getMobileNo, staff.getMobileNo()) |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
List<StaffEntity> staffEntities = staffRepository.selectList(lmq); |
|
|
|
return EAIUtil.buildEAIResult(new JSONObject().fluentPut("wait_register_personnel", staffEntities)); |
|
|
|
} |
|
|
|