From 747b81ca442e4e2f6dc49371bf029021ef7e6384 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Fri, 22 Mar 2024 16:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=80=BC=E7=8F=AD=E5=A2=9E=E5=8A=A0=E5=80=BC?= =?UTF-8?q?=E7=8F=AD=E9=95=BF=E5=90=8D=E7=A7=B0=E5=92=8C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/duty/vo/ImsDutyGroupVO.java | 2 ++ .../duty/service/impl/ImsDutyGroupServiceImpl.java | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyGroupVO.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyGroupVO.java index cdcd73d..fc5020d 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyGroupVO.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyGroupVO.java @@ -40,4 +40,6 @@ public class ImsDutyGroupVO extends ImsDutyGroupEntity { @ApiModelProperty(value = "是否更新排班 true 是 false 否") private Boolean updateDuty; + @ApiModelProperty(value = "值班组组长名字") + private String managerName; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java index 876cf7a..eb4d5b2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java @@ -164,6 +164,25 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl imsDutyGroupPVOS = imsDutyGroupPService.listByGroupId(entity.getId()); + if (CollectionUtil.isNotEmpty(imsDutyGroupPVOS)){ + List userIds = imsDutyGroupPVOS.stream().map(ImsDutyGroupPVO::getPersonId).collect(Collectors.toList()); + String name=""; + for (int i1 = 0; i1 < userIds.size(); i1++) { + name=name+UserCache.getUser(userIds.get(i1)).getName(); + if (i1!= userIds.size()-1){ + name=name+","; + } + } + if (StringUtils.isNotBlank(name)) { + imsDutyGroupVO.setPersonName(name); + } + } imsDutyGroupVO.setGroupName(entity.getGroupName()); imsDutyGroupVO.setTenantId(entity.getTenantId()); imsDutyGroupVO.setIsDeleted(entity.getIsDeleted()); @@ -171,7 +190,6 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl list = imsDutyGroupPService.selectByGroupId(entity.getId()); String personId = ""; - String personName = ""; for (int j = 0, len = list.size(); j < len; j++) { if (j != 0) { personId += "^" + list.get(j).getPersonId(); @@ -183,7 +201,6 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl