diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/dao/AttGroupDao.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/dao/AttGroupDao.java index 959dae5..1718fbf 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/dao/AttGroupDao.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/dao/AttGroupDao.java @@ -104,7 +104,7 @@ public interface AttGroupDao { * 查询出可选中人员 * @return list bean */ - List getAttGroupCheckPerson(); + List getAttGroupCheckPerson(Long groupId); /** * diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttGroupServiceImpl.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttGroupServiceImpl.java index a4c2566..7d50a93 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttGroupServiceImpl.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttGroupServiceImpl.java @@ -36,7 +36,7 @@ public class AttGroupServiceImpl implements AttGroupService { @Override public List selectOrgList() { - List listTree = attGroupDao.getAttGroupCheckPerson(); + List listTree = attGroupDao.getAttGroupCheckPerson(null); // 返回处理后的树形结构 return listTree.stream() .filter(m -> m.getParentId() == null) @@ -80,14 +80,14 @@ public class AttGroupServiceImpl implements AttGroupService { @Override public AttGroupBean selectAttGroupById(Long groupId) { //查出选择的人员 - List checkList = attGroupDao.selectAttGroupUserById(groupId); +// List checkList = attGroupDao.selectAttGroupUserById(groupId); //查出组织人员 - List orgList = attGroupDao.getAttGroupCheckPerson(); + List orgList = attGroupDao.getAttGroupCheckPerson(groupId); //查出考勤组详细数据 AttGroupBean attGroupBean = attGroupDao.selectAttGroupById(groupId); - List treeList = getOrgCheckList(orgList, checkList); - attGroupBean.setTreeList(treeList.stream().filter(m -> m.getParentId() == null).peek((m) -> - m.setChildren(TreeUtils.getOrgTreeChild(m, treeList, 0))).collect(Collectors.toList())); +// List treeList = getOrgCheckList(orgList, checkList); + attGroupBean.setTreeList(orgList.stream().filter(m -> m.getParentId() == null).peek((m) -> + m.setChildren(TreeUtils.getOrgTreeChild(m, orgList, 0))).collect(Collectors.toList())); return attGroupBean; } @@ -205,8 +205,8 @@ public class AttGroupServiceImpl implements AttGroupService { private List getOrgCheckList(List orgList, List checkList) { // 使用forEach结合stream进行比对 - checkList.forEach(c -> orgList.stream().filter(v -> (c.getUserId() + Constants.VERTICAL + - c.getOrgId()).equals(v.getId())).forEach(x -> x.setIsChecked(true))); +// checkList.forEach(c -> orgList.stream().filter(v -> (c.getUserId() + Constants.VERTICAL + +// c.getOrgId()).equals(v.getId())).forEach(x -> x.setIsChecked(true))); return orgList; } diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/att/AttGroupMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/att/AttGroupMapper.xml index 25603fc..a84571d 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/att/AttGroupMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/att/AttGroupMapper.xml @@ -5,16 +5,14 @@ @@ -41,7 +39,7 @@