From c5ba0661d5d83f75fc6c433a656e951d9a6767a6 Mon Sep 17 00:00:00 2001 From: tyty Date: Tue, 22 Aug 2023 12:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E7=8F=AD=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/duty/service/impl/ImsDutyMainServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 = "";