upgrade
parent
9239222b91
commit
cfcc47bc84
|
|
@ -5,12 +5,8 @@ import com.jjb.saas.system.client.user.request.UserRoleUpdateCmd;
|
|||
import org.qinan.safetyeval.client.api.OrgPositionApi;
|
||||
import org.qinan.safetyeval.client.co.GbsRoleOptionCO;
|
||||
import org.qinan.safetyeval.client.co.OrgPositionCO;
|
||||
import org.qinan.safetyeval.client.dto.OrgPositionAddCmd;
|
||||
import org.qinan.safetyeval.client.dto.OrgPositionAssignGbsRoleCmd;
|
||||
import org.qinan.safetyeval.client.dto.OrgPositionModifyCmd;
|
||||
import org.qinan.safetyeval.client.dto.OrgPositionPageQuery;
|
||||
import org.qinan.safetyeval.client.dto.PageResponse;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.client.dto.*;
|
||||
import org.qinan.safetyeval.domain.constant.RoleTypeEnum;
|
||||
import org.qinan.safetyeval.domain.entity.OrgPersonnelEntity;
|
||||
import org.qinan.safetyeval.domain.entity.OrgPositionEntity;
|
||||
import org.qinan.safetyeval.domain.exception.BizException;
|
||||
|
|
@ -169,10 +165,12 @@ public class OrgPositionExecutor implements OrgPositionApi {
|
|||
@Override
|
||||
public SingleResponse<List<GbsRoleOptionCO>> listGbsRoles() {
|
||||
List<RoleCO> roles = gbsRoleFacadeClient.listRoles();
|
||||
List<GbsRoleOptionCO> options = new ArrayList<GbsRoleOptionCO>();
|
||||
if (roles != null) {
|
||||
List<GbsRoleOptionCO> options = new ArrayList<>();
|
||||
if (roles == null) {
|
||||
return SingleResponse.success(options);
|
||||
}
|
||||
for (RoleCO role : roles) {
|
||||
if (role == null) {
|
||||
if (role == null || !RoleTypeEnum.GRZHJS.getValue().equals(role.getRoleTypeEnum())) {
|
||||
continue;
|
||||
}
|
||||
GbsRoleOptionCO option = new GbsRoleOptionCO();
|
||||
|
|
@ -181,7 +179,6 @@ public class OrgPositionExecutor implements OrgPositionApi {
|
|||
option.setRoleName(role.getRoleName());
|
||||
options.add(option);
|
||||
}
|
||||
}
|
||||
return SingleResponse.success(options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package org.qinan.safetyeval.domain.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 角色类型枚举
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum RoleTypeEnum {
|
||||
GLYJS("GLYJS", "管理员"),
|
||||
GRZHJS("GRZHJS", "个人账号");
|
||||
|
||||
private final String value; // 中文描述
|
||||
private final String label; // 中文描述
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue