Commit 36ace9f2 by huangZW

111

parent a8cf2263
......@@ -103,22 +103,12 @@ public class AuditApiServiceImpl implements AuditApiService{
List<String> storeIds = new ArrayList<>();
if(StringUtils.isNotEmpty(search)){
// List<StoreDTO> list = storeService.searchStoreByCodeOrName(enterpriseId,search);
List<TabHaobanDepartment> departmentList = departmentMapper.listDepartmentLikeName(search);
if(CollectionUtil.isNotEmpty(departmentList)){
departmentIds = departmentList.stream().map(s->s.getDepartmentId()).collect(Collectors.toList());
}else{
departmentIds = Arrays.asList("-999");
}
if(CollectionUtil.isNotEmpty(departmentList)){
List<StaffDepartmentRelatedDTO> staffDepartments = staffDepartmentRelatedApiService.listByDepartmentIds(departmentIds);
if(CollectionUtil.isNotEmpty(staffDepartments)){
List<String> staffIds1 = staffDepartments.stream().map(s->s.getStaffId()).collect(Collectors.toList());
staffIds.addAll(staffIds1);
}
List<StoreDTO> list = storeService.searchStoreByCodeOrName(enterpriseId,search);
if(CollectionUtil.isNotEmpty(list)){
List<String> storeIds1 = list.stream().map(s->s.getStoreId()).collect(Collectors.toList());
storeIds.addAll(storeIds1);
}
List<TabHaobanStaff> staffList = staffMapper.listLikeName(search);
if(CollectionUtil.isNotEmpty(staffList)){
List<String> staffIds2 = staffList.stream().map(s->s.getStaffId()).collect(Collectors.toList());
......@@ -127,7 +117,9 @@ public class AuditApiServiceImpl implements AuditApiService{
if(CollectionUtil.isEmpty(staffIds)){
staffIds.add("-999");
}
storeIds.add("-999");
if(CollectionUtil.isEmpty(storeIds)){
storeIds.add("-999");
}
}
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
com.github.pagehelper.Page<TabHaobanAudit> page = new com.github.pagehelper.Page<TabHaobanAudit>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment