TRX há 1 ano atrás
pai
commit
e30314b9f4

+ 25 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/model/org/ProjectOrgModel.java

@@ -3,6 +3,9 @@ package com.zhongshu.card.client.model.org;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author TRX
  * @date 2024/5/31
@@ -22,6 +25,12 @@ public class ProjectOrgModel extends OrganizationModel {
     @Schema(description = "在线设备数量")
     private Long onLineNumber = 0L;
 
+    @Schema(description = "管理员userId")
+    private List<String> managerUserIds = new ArrayList<>();
+
+    @Schema(description = "负责任信息列表")
+    private List<UserCountSimpleModel> managerUserList = new ArrayList<>();
+
     @Schema(description = "是否完成 项目管理的微信配置")
     private Boolean isFinishWeChat = Boolean.FALSE;
 
@@ -31,4 +40,20 @@ public class ProjectOrgModel extends OrganizationModel {
     @Schema(description = "是否完成通用设置")
     private Boolean isFinishCommon = Boolean.FALSE;
 
+    @Schema(description = "是否完成支付配置")
+    private Boolean isFinishPay = Boolean.FALSE;
+
+    @Schema(description = "是否完成所有的配置")
+    private Boolean isFinishAll = Boolean.FALSE;
+
+    public Boolean getIsFinishAll() {
+        if (isFinishWeChat != null && isFinishWeChat
+                && isFinishIot != null && isFinishIot
+                && isFinishCommon != null && isFinishCommon
+                && isFinishPay != null && isFinishPay) {
+            return Boolean.TRUE;
+        }
+        return Boolean.FALSE;
+    }
+
 }

+ 62 - 0
FullCardClient/src/main/java/com/zhongshu/card/client/model/org/UserCountSimpleModel.java

@@ -0,0 +1,62 @@
+package com.zhongshu.card.client.model.org;
+
+import com.zhongshu.card.client.model.base.SuperModel;
+import com.zhongshu.card.client.type.CertificateType;
+import com.zhongshu.card.client.type.Sex;
+import com.zhongshu.card.client.type.UserLoginType;
+import com.zhongshu.card.client.type.UserState;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * @author TRX
+ * @date 2024/5/31
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UserCountSimpleModel {
+
+    @Schema(description = "数据ID")
+    private String id;
+
+    @Schema(description = "用户ID(由鉴权中心颁发)")
+    private String userId;
+
+    @Schema(description = "登录名")
+    private String loginName;
+
+    @Schema(description = "用户手机号")
+    private String phone;
+
+    @Schema(description = "姓名")
+    private String name;
+
+    @Schema(description = "真实姓名")
+    private String realName;
+
+    public String getRealName() {
+        if (StringUtils.isNotEmpty(realName)) {
+            return realName;
+        }
+        return name;
+    }
+
+    @Schema(description = "头像")
+    private String profilePic;
+
+    @Schema(description = "性别")
+    private Sex sex;
+
+    private String sexStr;
+
+    public String getSexStr() {
+        if (sex != null) {
+            return sex.getRemark();
+        }
+        return "";
+    }
+}

+ 2 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/org/OrganizationServiceImpl.java

@@ -1103,6 +1103,8 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
             Long number = organizationRelationDao.countByRelOrganizationAndRelationType(entity, OrganizationRelationType.SchoolToProject);
             model.setSchoolNumber(number);
 
+            model.setManagerUserList(userAccountService.toListSimpleModel(userAccountService.getUserAccounts(entity.getManagerUserIds())));
+
             // 在线设备数量
 
             // 是否完成配置

+ 17 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/org/UserAccountServiceImpl.java

@@ -10,6 +10,7 @@ import com.github.microservice.auth.client.type.LoginType;
 import com.github.microservice.components.data.base.util.PageEntityUtil;
 import com.github.microservice.net.ResultContent;
 import com.github.microservice.net.ResultMessage;
+import com.google.common.collect.Lists;
 import com.zhongshu.card.client.model.base.AuthTypeParam;
 import com.zhongshu.card.client.model.base.UserIdModel;
 import com.zhongshu.card.client.model.org.*;
@@ -659,6 +660,13 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
         return list;
     }
 
+    public List<UserCountSimpleModel> toListSimpleModel(List<UserAccount> list) {
+        if (ObjectUtils.isNotEmpty(list)) {
+            return list.stream().map(this::toSimpleModel).collect(Collectors.toList());
+        }
+        return Lists.newArrayList();
+    }
+
     public UserCountModel toModel(UserAccount entity) {
         UserCountModel model = null;
         if (ObjectUtils.isNotEmpty(entity)) {
@@ -668,6 +676,15 @@ public class UserAccountServiceImpl extends SuperService implements UserAccountS
         return model;
     }
 
+    public UserCountSimpleModel toSimpleModel(UserAccount entity) {
+        UserCountSimpleModel model = null;
+        if (ObjectUtils.isNotEmpty(entity)) {
+            model = new UserCountSimpleModel();
+            BeanUtils.copyProperties(entity, model);
+        }
+        return model;
+    }
+
     public OrganizationUserModel toOrgUserModel(OrganizationUser entity) {
         OrganizationUserModel model = new OrganizationUserModel();
         if (ObjectUtils.isNotEmpty(entity)) {