From 7bcd6e0a9f10a36454f9d793f983881edc26c24d Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 1 Jul 2024 17:46:20 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E9=A2=86=E5=9F=9F=E7=BC=96=E7=A0=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java | 7 +++++++ .../src/main/java/com/hz/pm/api/user/model/vo/ResUserDetailVO.java | 3 +++ 2 files changed, 10 insertions(+) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java index 2bbac27..ade128d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/user/manage/UserInfoManage.java @@ -14,6 +14,8 @@ import com.hz.pm.api.sys.model.entity.Role; import com.hz.pm.api.sys.model.entity.UserRole; import com.hz.pm.api.sys.service.IRoleService; import com.hz.pm.api.sys.service.IUserRoleService; +import com.hz.pm.api.user.helper.MhUnitCache; +import com.hz.pm.api.user.model.dto.UnitDTO; import com.hz.pm.api.user.model.entity.UserInfo; import com.hz.pm.api.user.model.enumeration.UserAvailableEnum; import com.hz.pm.api.user.model.po.ReqUserDetailEditPO; @@ -47,6 +49,7 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class UserInfoManage { + private final MhUnitCache mhUnitCache; private final UserAuthManage userAuthManage; private final IUserInfoService userInfoService; private final IRoleService roleService; @@ -276,6 +279,10 @@ public class UserInfoManage { resUserDetail.setStatus(userInfo.getAvailable()); resUserDetail.setEmployeeCode(userInfo.getEmployeeCode()); resUserDetail.setMhUnitId(userInfo.getMhUnitId()); + UnitDTO unit = mhUnitCache.getById(userInfo.getMhUnitId()); + if (unit != null && unit.getType() != null) { + resUserDetail.setUnitStrip(unit.getType().getStrip().getCode()); + } resUserDetail.setMhUnitName(userInfo.getMhUnitName()); // 装配用户角色信息列表 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/user/model/vo/ResUserDetailVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/user/model/vo/ResUserDetailVO.java index 63aa5ce..0b72723 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/user/model/vo/ResUserDetailVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/user/model/vo/ResUserDetailVO.java @@ -36,6 +36,9 @@ public class ResUserDetailVO { @ApiModelProperty("所在单位code") private Long mhUnitId; + @ApiModelProperty("领域编码") + private Integer unitStrip; + @ApiModelProperty("用户角色") private List userRoleList;