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