Commit bfbbd021 by 徐高华

离职继承优化查询关联的离职导购

parent 66f1ba7f
......@@ -632,18 +632,22 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
List<String> takeoverClerkIdList = new ArrayList<>() ;
if(CollectionUtils.isNotEmpty(staffIdList)) {
for(int i=0;i<staffIdList.size();i++) {
List<String> clerkIdList = null ;
String staffId = staffIdList.get(i) ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKeyNoStatus(staffId) ;
if(null != staff && null!= staff.getDelTime()) {
Date delTime = DateUtil.addNumForMinute(staff.getDelTime(),-5);
List<String> clerkIdList = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdList(staffId,delTime) ;
if(CollectionUtils.isNotEmpty(clerkIdList)) {
takeoverClerkIdList.addAll(clerkIdList);
}
}else if(null != staff) {
List<TabHaobanStaffClerkRelation> list = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdListAll(staffId) ;
if(CollectionUtils.isNotEmpty(list)) {
takeoverClerkIdList.add(list.get(0).getClerkId()) ;
if(null != staff) {
if (null != staff.getDelTime()) {
Date delTime = DateUtil.addNumForMinute(staff.getDelTime(), -5);
clerkIdList = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdList(staffId, delTime);
if (CollectionUtils.isNotEmpty(clerkIdList)) {
takeoverClerkIdList.addAll(clerkIdList);
}
if (CollectionUtils.isEmpty(clerkIdList)) {
List<TabHaobanStaffClerkRelation> list = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdListAll(staffId);
if (CollectionUtils.isNotEmpty(list)) {
takeoverClerkIdList.add(list.get(0).getClerkId());
}
}
}
}
}
......
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