岗位管理操作人

This commit is contained in:
11528
2022-03-22 09:56:23 +08:00
parent 47ebd2a685
commit e2058872f4
@@ -13,10 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
/** /**
* <p> * <p>
@@ -44,7 +41,7 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
wgCommittee.setCommitteer(id); wgCommittee.setCommitteer(id);
List<WgCommitteeUser> list=new ArrayList<>(); List<WgCommitteeUser> list=new ArrayList<>();
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()) { if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()) {
List<String> res=new ArrayList<>(Arrays.asList(wgCommittee.getCommitteeIds().split(","))); List<String> res=new ArrayList<>(Collections.singletonList(wgCommittee.getCommitteeIds()));
res.stream().forEach(s -> list.add(new WgCommitteeUser().setCommitterId(s).setId(wgCommittee.getCommitteer()))); res.stream().forEach(s -> list.add(new WgCommitteeUser().setCommitterId(s).setId(wgCommittee.getCommitteer())));
iWgCommitteeUserService.saveOrUpdateBatch(list); iWgCommitteeUserService.saveOrUpdateBatch(list);
} }
@@ -61,7 +58,7 @@ public class WgCommitteeServiceImpl extends ServiceImpl<WgCommitteeDao, WgCommit
iWgCommitteeService.updateById(wgCommittee); iWgCommitteeService.updateById(wgCommittee);
List<WgCommitteeUser> save=new ArrayList<>(); List<WgCommitteeUser> save=new ArrayList<>();
if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()){ if (null!=wgCommittee.getCommitteeIds() && !wgCommittee.getCommitteeIds().isEmpty()){
List<String> res=new ArrayList<>(Arrays.asList(wgCommittee.getCommitteeIds())); List<String> res=new ArrayList<>(Collections.singletonList(wgCommittee.getCommitteeIds()));
res.forEach(s -> res.forEach(s ->
save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s)) save.add(new WgCommitteeUser().setId(wgCommittee.getCommitteer()).setCommitterId(s))
); );