TRX 1 tahun lalu
induk
melakukan
381334147b

+ 0 - 6
FullCardClient/src/main/java/com/zhongshu/card/client/model/org/DepartmentSimpleModel.java

@@ -22,12 +22,6 @@ public class DepartmentSimpleModel implements ITree<DepartmentSimpleModel>, Seri
     @Schema(description = "部门名称")
     private String name;
 
-    @Schema(description = "部门编码")
-    private String code;
-
-    @Schema(description = "部门状态")
-    private DataState state = DataState.Enable;
-
     @Schema(description = "上级ID")
     private String parentId;
 

+ 1 - 1
FullCardClient/src/main/java/com/zhongshu/card/client/model/org/register/UserCountRegisterParam.java

@@ -46,7 +46,7 @@ public class UserCountRegisterParam extends ProjectOidParam {
     @Schema(description = "地址")
     private String address;
 
-    @Schema(description = "地址")
+    @Schema(description = "备注")
     private String remark;
 
     @Schema(description = "证件类型")

+ 3 - 1
FullCardClient/src/main/java/com/zhongshu/card/client/service/org/DepartmentService.java

@@ -1,8 +1,8 @@
 package com.zhongshu.card.client.service.org;
 
+import com.github.microservice.net.ResultContent;
 import com.zhongshu.card.client.model.org.DepartmentModel;
 import com.zhongshu.card.client.model.org.DepartmentParam;
-import com.github.microservice.net.ResultContent;
 import com.zhongshu.card.client.utils.ITree;
 
 import java.util.List;
@@ -23,4 +23,6 @@ public interface DepartmentService {
     // 删除部门
     ResultContent deleteDepartment(String id);
 
+    ResultContent<List<ITree>> getCurrentProjectDepartmentTree();
+
 }

+ 5 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/org/DepartmentController.java

@@ -65,4 +65,9 @@ public class DepartmentController {
         return this.departmentService.getDepartmentTree(param.getOid());
     }
 
+    @Operation(summary = "(小程序)得到当前项目的部门树-未登录", description = "得到当前项目的部门树")
+    @RequestMapping(value = "getCurrentProjectDepartmentTree", method = {RequestMethod.GET})
+    public ResultContent getCurrentProjectDepartmentTree() {
+        return this.departmentService.getCurrentProjectDepartmentTree();
+    }
 }

+ 1 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/orgManager/ProjectBindOrgController.java

@@ -95,4 +95,5 @@ public class ProjectBindOrgController {
         Assert.hasText(param.getProjectOid(), "projectOid不能为空");
         return this.projectBindOrgService.getProjectOrgList(param.getProjectOid());
     }
+
 }

+ 9 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/user/DepartmentServiceImpl.java

@@ -140,6 +140,14 @@ public class DepartmentServiceImpl extends SuperService implements DepartmentSer
         return ResultContent.buildSuccess();
     }
 
+    /**
+     *
+     * @return
+     */
+    public ResultContent<List<ITree>> getCurrentProjectDepartmentTree() {
+        return getDepartmentTree(getCurrentProjectOid());
+    }
+
     /**
      * 得到结构所有部门信息 (树形结构)
      *
@@ -152,7 +160,7 @@ public class DepartmentServiceImpl extends SuperService implements DepartmentSer
             return ResultContent.buildFail("oid不能为空");
         }
         List<Department> list = departmentDao.findByOidOrderBySortAsc(oid);
-        List<ITree> models = list.stream().map(this::toModel).collect(Collectors.toList());
+        List<ITree> models = list.stream().map(this::toSimpleModel).collect(Collectors.toList());
         List<ITree> iTrees = TreeUtil.buildTree(models, ITree.ROOT_ID);
         return ResultContent.buildSuccess(iTrees);
     }