Commit a0e94505 by qwmqiuwenmin

fix

parent 3d8104c3
......@@ -44,4 +44,6 @@ public interface StaffApiService {
StaffDepartmentRelatedDTO getDepartmentIdAndCode(String departmentId, String code);
void initWxUser(String corpid, String suiteid, String wxEnterpriseId, Integer wxDepartmentId);
public List<String> listUnBindClerk(String storeId);
}
package com.gic.haoban.manage.service.service.out.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
......@@ -615,4 +618,22 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public List<String> listUnBindClerk(String storeId) {
TabHaobanDepartment department = departmentService.selectByRelatedId(storeId);
if(department == null){
return Collections.EMPTY_LIST;
}
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedService.listByDepartmentId(department.getDepartmentId());
List<String> clerkCodes = list.stream().filter(s->s.getClerkCode()!=null).map(s->s.getClerkCode()).collect(Collectors.toList());
List<String> unBindList = new ArrayList<>();
if(CollectionUtil.isNotEmpty(clerkCodes)){
List<ClerkDTO> clerkList = clerkService.listClerk(storeId, clerkCodes, false);
for (ClerkDTO clerkDTO : clerkList) {
unBindList.add(clerkDTO.getClerkId());
}
}
return unBindList;
}
}
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