diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java index 3901698..ecc07ca 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java @@ -1409,6 +1409,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl personWrapper = new LambdaQueryWrapper(); personWrapper.eq(ImsDutyMainPersonEntity::getCreateDept, deptId); + personWrapper.like(ImsDutyMainPersonEntity::getDutyDate, yearAndMonth); List deptPersonList = imsDutyMainPersonMapper.selectList(personWrapper); // 获取本月天数 @@ -1438,13 +1439,15 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl list = imsDutyGroupPService.list(groupPWrapper); managerName = deptUserMap.get(deptDutyGroupMap.get(imsDutyMainEntity.getDutyGroupId()).getManagerId()); - personIds = list.stream().map(ImsDutyGroupPEntity::getPersonId).collect(Collectors.toList()); + personIds = list.stream() +// 过滤出组长 + .filter(s->!s.getPersonId().equals(deptDutyGroupMap.get(imsDutyMainEntity.getDutyGroupId()).getManagerId())) + .map(ImsDutyGroupPEntity::getPersonId).collect(Collectors.toList()); } else { // 不存在分组id从排班人员中获取组长和组员 List personList = deptPersonList.stream().filter(var -> var.getDutyMainId().equals(imsDutyMainEntity.getId())).collect(Collectors.toList()); - managerName = deptUserMap.get(personList.get(0).getDutyChargePerson()); - personIds = personList.stream().map(ImsDutyMainPersonEntity::getDutyPerson).collect(Collectors.toList()); + personIds = personList.stream().filter(s->!s.getDutyPerson().equals(personList.get(0).getDutyChargePerson())).map(ImsDutyMainPersonEntity::getDutyPerson).collect(Collectors.toList()); } String personNames = "";