Commit 6e4126d7 by 徐高华

朋友圈

parent 113ed1dd
......@@ -182,14 +182,16 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
List<String> newList = dto.getSelectClerkIdList();
List<String> addList = newList.stream().filter(o -> !oldList.contains(o)).distinct().collect(Collectors.toList());
List<String> delList = oldList.stream().filter(o -> !newList.contains(o)).distinct().collect(Collectors.toList());
List<StaffClerkRelationDTO> list = this.staffClerkRelationApiService.listByClerkIdsWxEnterpriseId(addList,plan.getWxEnterpriseId()) ;
List<ClerkStaffBO> clerkStaffList = list.stream().map(o->{
ClerkStaffBO bo = new ClerkStaffBO() ;
bo.setClerkId(o.getClerkId());
bo.setStaffId(o.getStaffId());
return bo ;
}).collect(Collectors.toList()) ;
this.qwMomentPlanAttendService.saveClerk(wxEnterpriseId,enterpriseId, planId , clerkStaffList , 0);
if (CollectionUtils.isNotEmpty(addList)) {
List<StaffClerkRelationDTO> list = this.staffClerkRelationApiService.listByClerkIdsWxEnterpriseId(addList,plan.getWxEnterpriseId()) ;
List<ClerkStaffBO> clerkStaffList = list.stream().map(o->{
ClerkStaffBO bo = new ClerkStaffBO() ;
bo.setClerkId(o.getClerkId());
bo.setStaffId(o.getStaffId());
return bo ;
}).collect(Collectors.toList()) ;
this.qwMomentPlanAttendService.saveClerk(wxEnterpriseId,enterpriseId, planId , clerkStaffList , 0);
}
if (CollectionUtils.isNotEmpty(delList)) {
this.qwMomentPlanAttendMapper.delClerks(planId, delList);
}
......
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