浏览代码

项目级归档树

huangtf 2 年之前
父节点
当前提交
1149497217
共有 16 个文件被更改,包括 800 次插入42 次删除
  1. 2 2
      blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/entity/ArchivesAuto.java
  2. 2 2
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTree.java
  3. 41 24
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTreeContract.java
  4. 112 1
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeContractVO.java
  5. 29 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeVO.java
  6. 77 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TreeNodeVO2.java
  7. 93 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeContractController.java
  8. 12 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeController.java
  9. 10 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.java
  10. 174 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml
  11. 3 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.java
  12. 105 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.xml
  13. 21 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeContractService.java
  14. 6 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeService.java
  15. 84 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractServiceImpl.java
  16. 29 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeServiceImpl.java

+ 2 - 2
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/entity/ArchivesAuto.java

@@ -39,11 +39,11 @@ public class ArchivesAuto extends BaseEntity {
 	/**
 	* 项目ID
 	*/
-		private String projectId;
+		private Long projectId;
 	/**
 	* 合同段ID
 	*/
-		private String contractId;
+		private Long contractId;
 	/**
 	* 案卷提名
 	*/

+ 2 - 2
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTree.java

@@ -120,9 +120,9 @@ public class ArchiveTree extends BaseEntity {
     @ApiModelProperty(value = "工程类型")
     private Integer projectType;
 	/**
-	* 关联类型
+	* 存储类型
 	*/
-    @ApiModelProperty(value = "关联类型")
+    @ApiModelProperty(value = "存储类型")
     private Integer storageType;
 	/**
 	* 扩展类型

+ 41 - 24
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTreeContract.java

@@ -18,9 +18,13 @@ package org.springblade.manager.entity;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
+
 import org.springblade.core.mp.base.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.manager.vo.ArchiveTreeVO;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.BeansException;
 
 /**
  * 实体类
@@ -38,99 +42,112 @@ public class ArchiveTreeContract extends BaseEntity {
 	/**
 	* 项目ID
 	*/
-		private String projectId;
+	private Long projectId;
 	/**
 	* 合同段ID
 	*/
-		private String contractId;
+	private Long contractId;
 	/**
 	* 是否配置到上传文件显示配置树 '0'否 '1'是
 	*/
-		private Integer isUploadFileDisplayConfigurationTree;
+	private Integer isUploadFileDisplayConfigurationTree;
 	/**
 	* 父主键
 	*/
-		private Long parentId;
+	private Long parentId;
 	/**
 	* 祖级列表
 	*/
-		private String ancestors;
+	private String ancestors;
 	/**
 	* 节点名
 	*/
-		private String nodeName;
+	private String nodeName;
 	/**
 	* 节点全称
 	*/
-		private String fullName;
+	private String fullName;
 	/**
 	* 节点类型
 	*/
-		private Integer nodeType;
+	private Integer nodeType;
 	/**
 	* 岗位类型
 	*/
-		private String postType;
+	private String postType;
 	/**
 	* 关联类型
 	*/
-		private Integer associationType;
+	private Integer associationType;
 	/**
 	* 内业资料类型
 	*/
-		private String majorDataType;
+	private String majorDataType;
 	/**
 	* 显示层级
 	*/
-		private String displayHierarchy;
+	private String displayHierarchy;
 	/**
 	* 是否为存储节点 '0'否 '1'是
 	*/
-		private Integer isStorageNode;
+	private Integer isStorageNode;
 	/**
 	* 是否为竣工图 '0'否 '1'是
 	*/
-		private Integer isBuiltDrawing;
+	private Integer isBuiltDrawing;
 	/**
 	* 是否为接口节点 '0'否 '1'是
 	*/
-		private Integer isInterfaceNode;
+	private Integer isInterfaceNode;
 	/**
 	* 接口类型
 	*/
-		private Integer interfaceType;
+	private Integer interfaceType;
 	/**
 	* 排序
 	*/
-		private Integer sort;
+	private Integer sort;
 	/**
 	* 备注
 	*/
-		private String remark;
+	private String remark;
 	/**
 	* 工程类型
 	*/
-		private Integer projectType;
+	private Integer projectType;
 	/**
 	* 关联类型
 	*/
-		private Integer storageType;
+	private Integer storageType;
 	/**
 	* 扩展类型
 	*/
-		private Integer extType;
+	private Integer extType;
 	/**
 	* 扩展关联Id
 	*/
-		private Long extId;
+	private Long extId;
 	/**
 	* 自动立卷类型
 	*/
-		private Integer archiveAutoType;
+	private Integer archiveAutoType;
 	/**
 	* 自动立卷关联Id
 	*/
-		private Long archiveAutoNodeId;
+	private Long archiveAutoNodeId;
+
+	public ArchiveTreeContract() {
+	}
 
+	public ArchiveTreeContract(ArchiveTree archiveTree) {
+		if (archiveTree == null) {
+			return;
+		}
 
+		try {
+			BeanUtils.copyProperties(archiveTree,this);
+		} catch (BeansException e) {
+			e.printStackTrace();
+		}
+	}
 }

+ 112 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeContractVO.java

@@ -16,10 +16,18 @@
  */
 package org.springblade.manager.vo;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.tool.node.INode;
 import org.springblade.manager.entity.ArchiveTreeContract;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * 视图实体类
  *
@@ -28,7 +36,110 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class ArchiveTreeContractVO extends ArchiveTreeContract {
+public class ArchiveTreeContractVO extends ArchiveTreeContract implements INode<ArchiveTreeContractVO> {
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 主键ID
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "主键id")
+	private Long id;
+
+	/**
+	 * 父节点ID
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "父级id")
+	private Long parentId;
+
+	/**
+	 * title
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "节点名称")
+	private String title;
+
+	/**
+	 * 子孙节点
+	 */
+	@JsonInclude(JsonInclude.Include.NON_EMPTY)
+	@ApiModelProperty(value = "子孙节点")
+	private List<ArchiveTreeContractVO> children;
+
+	/**
+	 * 是否有子孙节点
+	 */
+	@JsonInclude(JsonInclude.Include.NON_EMPTY)
+	@ApiModelProperty(value = "是否有子孙节点")
+	private Boolean hasChildren;
+
+	@Override
+	public List<ArchiveTreeContractVO> getChildren() {
+		if (this.children == null) {
+			this.children = new ArrayList<>();
+		}
+		return this.children;
+	}
+
+	/**
+	 * 内业资料类型(用于显示控制)
+	 */
+	@ApiModelProperty(value = "内业资料类型(用于显示控制)")
+	private String majorDataType;
+
+	/**
+	 * 显示层级(用于显示控制)
+	 */
+	@ApiModelProperty(value = "显示层级(用于显示控制)")
+	private String displayHierarchy;
+
+	/**
+	 * 是否为存储节点
+	 */
+	@ApiModelProperty(value = "是否为存储节点")
+	private Integer isStorageNode;
+
+	/**
+	 * 是否为显示树
+	 */
+	@ApiModelProperty(value = "是否为显示树")
+	private Integer isUploadFileDisplayConfigurationTree;
+
+	/**
+	 * 是否为竣工图 '0'否 '1'是
+	 */
+	@ApiModelProperty(value = "是否为竣工图 '0'否 '1'是")
+	private Integer isBuiltDrawing;
+
+	/**
+	 * 工程类型
+	 */
+	private Integer projectType;
+	/**
+	 * 关联类型
+	 */
+	private Integer storageType;
+
+	/**
+	 * 扩展类型
+	 */
+	@ApiModelProperty(value = "扩展类型")
+	private Integer extType;
+	/**
+	 * 扩展关联Id
+	 */
+	@ApiModelProperty(value = "扩展关联Id")
+	private Long extId;
+	/**
+	 * 自动立卷类型
+	 */
+	@ApiModelProperty(value = "自动立卷类型")
+	private Integer archiveAutoType;
+	/**
+	 * 自动立卷关联Id
+	 */
+	@ApiModelProperty(value = "自动立卷关联Id")
+	private Long archiveAutoNodeId;
+
 }

+ 29 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeVO.java

@@ -90,5 +90,34 @@ public class ArchiveTreeVO extends ArchiveTree implements INode<ArchiveTreeVO> {
     @ApiModelProperty(value = "是否为竣工图 '0'否 '1'是")
     private Integer isBuiltDrawing;
 
+    /**
+     * 工程类型
+     */
+    private Integer projectType;
+    /**
+     * 关联类型
+     */
+    private Integer storageType;
+
+    /**
+     * 扩展类型
+     */
+    @ApiModelProperty(value = "扩展类型")
+    private Integer extType;
+    /**
+     * 扩展关联Id
+     */
+    @ApiModelProperty(value = "扩展关联Id")
+    private Long extId;
+    /**
+     * 自动立卷类型
+     */
+    @ApiModelProperty(value = "自动立卷类型")
+    private Integer archiveAutoType;
+    /**
+     * 自动立卷关联Id
+     */
+    @ApiModelProperty(value = "自动立卷关联Id")
+    private Long archiveAutoNodeId;
 
 }

+ 77 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TreeNodeVO2.java

@@ -2,6 +2,7 @@ package org.springblade.manager.vo;
 
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.core.tool.node.BaseNode;
 import org.springblade.core.tool.node.TreeNode;
 
@@ -48,6 +49,33 @@ public class TreeNodeVO2 extends BaseNode<TreeNode> {
 
     private String postType;
 
+    /**
+     * 工程类型
+     */
+    private Integer projectType;
+
+
+    /**
+     * 存储类型
+     */
+    private Integer storageType;
+    /**
+     * 扩展类型
+     */
+    private Integer extType;
+    /**
+     * 扩展关联Id
+     */
+    private Long extId;
+    /**
+     * 自动立卷类型
+     */
+    private Integer archiveAutoType;
+    /**
+     * 自动立卷关联Id
+     */
+    private Long archiveAutoNodeId;
+
     public TreeNodeVO2() {
     }
 
@@ -141,6 +169,55 @@ public class TreeNodeVO2 extends BaseNode<TreeNode> {
         this.isBuiltDrawing = isBuiltDrawing;
     }
 
+    public Integer getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Integer projectType) {
+        this.projectType = projectType;
+    }
+
+    public Integer getStorageType() {
+        return storageType;
+    }
+
+    public void setStorageType(Integer storageType) {
+        this.storageType = storageType;
+    }
+
+    public Integer getExtType() {
+        return extType;
+    }
+
+    public void setExtType(Integer extType) {
+        this.extType = extType;
+    }
+
+    public Long getExtId() {
+        return extId;
+    }
+
+    public void setExtId(Long extId) {
+        this.extId = extId;
+    }
+
+    public Integer getArchiveAutoType() {
+        return archiveAutoType;
+    }
+
+    public void setArchiveAutoType(Integer archiveAutoType) {
+        this.archiveAutoType = archiveAutoType;
+    }
+
+    public Long getArchiveAutoNodeId() {
+        return archiveAutoNodeId;
+    }
+
+    public void setArchiveAutoNodeId(Long archiveAutoNodeId) {
+        this.archiveAutoNodeId = archiveAutoNodeId;
+    }
+
+
     public String toString() {
         return "TreeNode(tenantId=" + this.getTenantId()
                 + ",ancestors" + this.getAncestors()

+ 93 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeContractController.java

@@ -16,17 +16,23 @@
  */
 package org.springblade.manager.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import com.mixsmart.utils.StringUtils;
+import io.swagger.annotations.*;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
+import org.checkerframework.checker.units.qual.A;
+import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.service.IArchiveTreeService;
+import org.springblade.manager.vo.ArchiveTreeContractVO2;
+import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -36,6 +42,11 @@ import org.springblade.manager.wrapper.ArchiveTreeContractWrapper;
 import org.springblade.manager.service.IArchiveTreeContractService;
 import org.springblade.core.boot.ctrl.BladeController;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  *  控制器
  *
@@ -44,12 +55,14 @@ import org.springblade.core.boot.ctrl.BladeController;
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("/archivetreecontract")
+@RequestMapping("/archiveTreeContract")
 @Api(value = "", tags = "接口")
 public class ArchiveTreeContractController extends BladeController {
 
 	private final IArchiveTreeContractService archiveTreeContractService;
 
+	private final IArchiveTreeService archiveTreeService;
+
 	/**
 	 * 详情
 	 */
@@ -125,5 +138,81 @@ public class ArchiveTreeContractController extends BladeController {
 		return R.status(archiveTreeContractService.deleteLogic(Func.toLongList(ids)));
 	}
 
+
+	/**
+	 * 初始化归档树根节点
+	 */
+	@PostMapping("/init")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "初始化项目级归档树", notes = "传入token")
+	public R<ArchiveTree> init() {
+
+
+		return R.fail(200, "初始化创建失败");
+	}
+
+	/**
+	 * 懒加载树形结构
+	 */
+	@GetMapping("/lazy-tree")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "懒加载树形结构", notes = "传入父级id")
+	@ApiImplicitParams(value = {
+			@ApiImplicitParam(name = "parentId", value = "父级id", required = true)
+	})
+	public R<List<ArchiveTreeContractVO2>> lazyTree(Long parentId) {
+		Long projectId = 1578599210897772545L;
+		List<ArchiveTreeContractVO2> tree = archiveTreeContractService.lazyTree2(AuthUtil.getTenantId(), parentId,projectId);
+		if (tree != null && tree.size() > 0) {
+			return R.data(tree);
+		}
+		return R.fail(200, "未查询到信息");
+	}
+
+
+	/**
+	 * 全加载树形结构/显示树
+	 */
+	@GetMapping("/tree")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "全加载树形结构/显示树", notes = "disPlayTree、nodeType")
+	@ApiImplicitParams(value = {
+			@ApiImplicitParam(name = "disPlayTree", value = "是否加载显示树 'null'=不加载 '1'=加载"),
+			@ApiImplicitParam(name = "nodeType", value = "'null'=全加载 '1'=关联电子原生文件类型树 '2'=文件上传类型树")
+	})
+	public R<List<ArchiveTreeContractVO2>> tree(Integer disPlayTree, Integer nodeType){
+		Long projectId = 1578599210897772545L;
+		List<ArchiveTreeContractVO2> tree = archiveTreeContractService.tree2(AuthUtil.getTenantId(), disPlayTree, nodeType,projectId);
+		if (tree != null && tree.size() > 0) {
+			return R.data(tree);
+		}
+
+		return R.fail(200, "未查询到信息");
+	}
+
+
+
+	@GetMapping("/test")
+	public R test(){
+		Long projectId = 1578599210897772545L;
+		List<ArchiveTree> trees = archiveTreeService.treeList(AuthUtil.getTenantId(), null, null);
+
+		archiveTreeContractService.initTree(AuthUtil.getTenantId(),projectId,trees);
+
+		return R.fail(200, "初始化成功");
+	}
+
+	@GetMapping("/test1")
+	public R test1(){
+		Long projectId = 1578599210897772545L;
+		List<ArchiveTreeContractVO> tree = archiveTreeContractService.tree(AuthUtil.getTenantId(), null, null,projectId);
+		if (tree != null && tree.size() > 0) {
+			return R.data(tree);
+		}
+
+		return R.fail(200, "初始化成功");
+	}
+
+
 	
 }

+ 12 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeController.java

@@ -15,6 +15,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.dto.ArchiveTreeDTO;
 import org.springblade.manager.dto.ArchiveTreeSortDTO;
+import org.springblade.manager.vo.ArchiveTreeVO2;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springblade.manager.entity.ArchiveTree;
@@ -112,8 +113,8 @@ public class ArchiveTreeController extends BladeController {
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "parentId", value = "父级id", required = true)
     })
-    public R<List<ArchiveTreeVO>> lazyTree(Long parentId) {
-        List<ArchiveTreeVO> tree = archiveTreeService.lazyTree(AuthUtil.getTenantId(), parentId);
+    public R<List<ArchiveTreeVO2>> lazyTree(Long parentId) {
+        List<ArchiveTreeVO2> tree = archiveTreeService.lazyTree2(AuthUtil.getTenantId(), parentId);
         if (tree != null && tree.size() > 0) {
             return R.data(tree);
         }
@@ -130,8 +131,8 @@ public class ArchiveTreeController extends BladeController {
             @ApiImplicitParam(name = "disPlayTree", value = "是否加载显示树 'null'=不加载 '1'=加载"),
             @ApiImplicitParam(name = "nodeType", value = "'null'=全加载 '1'=关联电子原生文件类型树 '2'=文件上传类型树")
     })
-    public R<List<ArchiveTreeVO>> tree(Integer disPlayTree, Integer nodeType) {
-        List<ArchiveTreeVO> tree = archiveTreeService.tree(AuthUtil.getTenantId(), disPlayTree, nodeType);
+    public R<List<ArchiveTreeVO2>> tree(Integer disPlayTree, Integer nodeType) {
+        List<ArchiveTreeVO2> tree = archiveTreeService.tree2(AuthUtil.getTenantId(), disPlayTree, nodeType);
         if (tree != null && tree.size() > 0) {
             return R.data(tree);
         }
@@ -171,5 +172,12 @@ public class ArchiveTreeController extends BladeController {
         return R.status(archiveTreeService.submitArchiveTreeSort(listSort));
     }
 
+    @GetMapping("/test")
+    public R test(){
+
+
+        return R.fail(200, "初始化成功");
+    }
+
 
 }

+ 10 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.java

@@ -16,10 +16,14 @@
  */
 package org.springblade.manager.mapper;
 
+import feign.Param;
 import org.springblade.manager.entity.ArchiveTreeContract;
 import org.springblade.manager.vo.ArchiveTreeContractVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.ArchiveTreeContractVO2;
+import org.springblade.manager.vo.ArchiveTreeVO;
+
 import java.util.List;
 
 /**
@@ -38,5 +42,11 @@ public interface ArchiveTreeContractMapper extends BaseMapper<ArchiveTreeContrac
 	 * @return
 	 */
 	List<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage page, ArchiveTreeContractVO archiveTreeContract);
+	List<ArchiveTreeContractVO> lazyTree(@Param("tenantId") String tenantId, @Param("parentId") Long parentId, @Param("projectId") Long projectId);
+
+	List<ArchiveTreeContractVO> tree(@Param("tenantId") String tenantId, @Param("disPlayTree") Integer disPlayTree, @Param("nodeType") Integer nodeType, @Param("projectId") Long projectId);
+
+	List<ArchiveTreeContractVO2> lazyTree2(@Param("tenantId") String tenantId, @Param("parentId") Long parentId, @Param("projectId") Long projectId);
 
+	List<ArchiveTreeContractVO2> tree2(@Param("tenantId") String tenantId, @Param("disPlayTree") Integer disPlayTree, @Param("nodeType") Integer nodeType, @Param("projectId") Long projectId);
 }

+ 174 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml

@@ -43,4 +43,178 @@
         select * from m_archive_tree_contract where is_deleted = 0
     </select>
 
+    <resultMap id="treeNodeResultMap" type="org.springblade.manager.vo.TreeNodeVO2">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+        <result column="has_children" property="hasChildren"/>
+        <result column="displayHierarchy" property="displayHierarchy"/>
+        <result column="majorDataType" property="majorDataType"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isDisplayTree" property="isDisplayTree"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isBuiltDrawing" property="isBuiltDrawing"/>
+        <result column="postType" property="postType"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
+    </resultMap>
+
+    <resultMap id="ArchiveTreeContractVO2ResultMap" type="org.springblade.manager.vo.ArchiveTreeContractVO2">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+        <result column="has_children" property="hasChildren"/>
+        <result column="displayHierarchy" property="displayHierarchy"/>
+        <result column="majorDataType" property="majorDataType"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isDisplayTree" property="isDisplayTree"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isBuiltDrawing" property="isBuiltDrawing"/>
+        <result column="postType" property="postType"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
+    </resultMap>
+
+    <select id="lazyTree" resultMap="treeNodeResultMap">
+        SELECT
+        d.id,
+        d.parent_id,
+        d.node_name AS title,
+        d.id AS "value",
+        d.id AS "key",
+        d.major_data_type AS "majorDataType",
+        d.display_hierarchy AS "displayHierarchy",
+        d.is_storage_node AS "isStorageNode",
+        d.post_type AS postType,
+        d.project_type,
+        d.storage_type,
+        d.ext_type,
+        d.ext_id,
+        d.archive_auto_type,
+        d.archive_auto_node_id,
+        (SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_archive_tree_contract WHERE parent_id = d.id and is_deleted = 0 and project_id = #{projectId})
+        AS "has_children"
+        FROM
+        m_archive_tree_contract d
+        WHERE
+        d.parent_id = #{parentId} AND d.is_deleted = 0 and project_id = #{projectId}
+        <if test="tenantId!=null and tenantId!=''">
+            AND d.tenant_id = #{tenantId}
+        </if>
+        ORDER BY d.sort
+    </select>
+
+
+    <select id="tree" resultMap="treeNodeResultMap">
+        SELECT
+        id,
+        parent_id,
+        node_name AS title,
+        id AS "value",
+        id AS "key",
+        major_data_type AS "majorDataType",
+        display_hierarchy AS "displayHierarchy",
+        is_storage_node AS "isStorageNode",
+        is_upload_file_display_configuration_tree AS "isDisplayTree",
+        is_built_drawing AS "isBuiltDrawing",
+        post_type AS postType,
+        project_type,
+        storage_type,
+        ext_type,
+        ext_id,
+        archive_auto_type,
+        archive_auto_node_id
+        FROM m_archive_tree_contract
+        WHERE is_deleted = 0 and project_id = #{projectId}
+        <if test=" tenantId!=null and tenantId!='' ">
+            AND tenant_id = #{tenantId}
+        </if>
+        <if test=" disPlayTree!=null and disPlayTree!='' ">
+            AND is_upload_file_display_configuration_tree = 1
+        </if>
+        <if test=" nodeType !=null and nodeType !='' ">
+            /*根节点=0 关联电子原生文件=1 数字化上传文件=2*/
+            AND node_type in (0,#{nodeType})
+        </if>
+        OR parent_id = 0
+        ORDER BY sort
+    </select>
+
+    <select id="lazyTree2" resultMap="ArchiveTreeContractVO2ResultMap">
+        SELECT
+        d.id,
+        d.parent_id,
+        d.node_name AS title,
+        d.id AS "value",
+        d.id AS "key",
+        d.major_data_type AS "majorDataType",
+        d.display_hierarchy AS "displayHierarchy",
+        d.is_storage_node AS "isStorageNode",
+        d.post_type AS postType,
+        d.project_type,
+        d.storage_type,
+        d.ext_type,
+        d.ext_id,
+        d.archive_auto_type,
+        d.archive_auto_node_id,
+        (SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_archive_tree_contract WHERE parent_id = d.id and is_deleted = 0 and project_id = #{projectId})
+        AS "has_children"
+        FROM
+        m_archive_tree_contract d
+        WHERE
+        d.parent_id = #{parentId} AND d.is_deleted = 0 and project_id = #{projectId}
+        <if test="tenantId!=null and tenantId!=''">
+            AND d.tenant_id = #{tenantId}
+        </if>
+        ORDER BY d.sort
+    </select>
+
+
+    <select id="tree2" resultMap="ArchiveTreeContractVO2ResultMap">
+        SELECT
+        id,
+        parent_id,
+        node_name AS title,
+        id AS "value",
+        id AS "key",
+        major_data_type AS "majorDataType",
+        display_hierarchy AS "displayHierarchy",
+        is_storage_node AS "isStorageNode",
+        is_upload_file_display_configuration_tree AS "isDisplayTree",
+        is_built_drawing AS "isBuiltDrawing",
+        post_type AS postType,
+        project_type,
+        storage_type,
+        ext_type,
+        ext_id,
+        archive_auto_type,
+        archive_auto_node_id
+        FROM m_archive_tree_contract
+        WHERE is_deleted = 0 and project_id = #{projectId}
+        <if test=" tenantId!=null and tenantId!='' ">
+            AND tenant_id = #{tenantId}
+        </if>
+        <if test=" disPlayTree!=null and disPlayTree!='' ">
+            AND is_upload_file_display_configuration_tree = 1
+        </if>
+        <if test=" nodeType !=null and nodeType !='' ">
+            /*根节点=0 关联电子原生文件=1 数字化上传文件=2*/
+            AND node_type in (0,#{nodeType})
+        </if>
+        OR parent_id = 0
+        ORDER BY sort
+    </select>
+
 </mapper>

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.java

@@ -5,15 +5,16 @@ import org.springblade.manager.entity.ArchiveTree;
 import org.springblade.manager.vo.ArchiveTreeVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.ArchiveTreeVO2;
 
 import java.util.List;
 
 public interface ArchiveTreeMapper extends BaseMapper<ArchiveTree> {
 
     List<ArchiveTreeVO> lazyTree(@Param("tenantId") String tenantId, @Param("parentId") Long parentId);
-
+    List<ArchiveTreeVO2> lazyTree2(@Param("tenantId") String tenantId, @Param("parentId") Long parentId);
     List<ArchiveTreeVO> tree(@Param("tenantId") String tenantId, @Param("disPlayTree") Integer disPlayTree, @Param("nodeType") Integer nodeType);
-
+    List<ArchiveTreeVO2> tree2(@Param("tenantId") String tenantId, @Param("disPlayTree") Integer disPlayTree, @Param("nodeType") Integer nodeType);
     int updateBatch(@Param("diffRent") List<String> diffRent);
 
     int updateBatch2(@Param("diffRent") List<String> diffRent);

+ 105 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.xml

@@ -36,6 +36,28 @@
         <result column="is_upload_file_display_configuration_tree" property="isUploadFileDisplayConfigurationTree"/>
     </resultMap>
 
+    <resultMap id="ArchiveTreeVOResultMap" type="org.springblade.manager.vo.ArchiveTreeVO2">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+        <result column="has_children" property="hasChildren"/>
+        <result column="displayHierarchy" property="displayHierarchy"/>
+        <result column="majorDataType" property="majorDataType"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isDisplayTree" property="isDisplayTree"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isBuiltDrawing" property="isBuiltDrawing"/>
+        <result column="postType" property="postType"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
+    </resultMap>
+
     <resultMap id="treeNodeResultMap" type="org.springblade.manager.vo.TreeNodeVO2">
         <id column="id" property="id"/>
         <result column="parent_id" property="parentId"/>
@@ -49,6 +71,12 @@
         <result column="isDisplayTree" property="isDisplayTree"/>
         <result column="isStorageNode" property="isStorageNode"/>
         <result column="isBuiltDrawing" property="isBuiltDrawing"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
         <result column="postType" property="postType"/>
     </resultMap>
 
@@ -93,6 +121,12 @@
         d.display_hierarchy AS "displayHierarchy",
         d.is_storage_node AS "isStorageNode",
         d.post_type AS postType,
+        d.project_type,
+        d.storage_type,
+        d.ext_type,
+        d.ext_id,
+        d.archive_auto_type,
+        d.archive_auto_node_id,
         (SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_archive_tree WHERE parent_id = d.id and is_deleted = 0)
         AS "has_children"
         FROM
@@ -117,7 +151,77 @@
         is_storage_node AS "isStorageNode",
         is_upload_file_display_configuration_tree AS "isDisplayTree",
         is_built_drawing AS "isBuiltDrawing",
-        post_type AS postType
+        post_type AS postType,
+        project_type,
+        storage_type,
+        ext_type,
+        ext_id,
+        archive_auto_type,
+        archive_auto_node_id
+        FROM m_archive_tree
+        WHERE is_deleted = 0
+        <if test=" tenantId!=null and tenantId!='' ">
+            AND tenant_id = #{tenantId}
+        </if>
+        <if test=" disPlayTree!=null and disPlayTree!='' ">
+            AND is_upload_file_display_configuration_tree = 1
+        </if>
+        <if test=" nodeType !=null and nodeType !='' ">
+            /*根节点=0 关联电子原生文件=1 数字化上传文件=2*/
+            AND node_type in (0,#{nodeType})
+        </if>
+        OR parent_id = 0
+        ORDER BY sort
+    </select>
+
+    <select id="lazyTree2" resultMap="ArchiveTreeVOResultMap">
+        SELECT
+        d.id,
+        d.parent_id,
+        d.node_name AS title,
+        d.id AS "value",
+        d.id AS "key",
+        d.major_data_type AS "majorDataType",
+        d.display_hierarchy AS "displayHierarchy",
+        d.is_storage_node AS "isStorageNode",
+        d.post_type AS postType,
+        d.project_type,
+        d.storage_type,
+        d.ext_type,
+        d.ext_id,
+        d.archive_auto_type,
+        d.archive_auto_node_id,
+        (SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_archive_tree WHERE parent_id = d.id and is_deleted = 0)
+        AS "has_children"
+        FROM
+        m_archive_tree d
+        WHERE
+        d.parent_id = #{parentId} AND d.is_deleted = 0
+        <if test="tenantId!=null and tenantId!=''">
+            AND d.tenant_id = #{tenantId}
+        </if>
+        ORDER BY d.sort
+    </select>
+
+    <select id="tree2" resultMap="ArchiveTreeVOResultMap">
+        SELECT
+        id,
+        parent_id,
+        node_name AS title,
+        id AS "value",
+        id AS "key",
+        major_data_type AS "majorDataType",
+        display_hierarchy AS "displayHierarchy",
+        is_storage_node AS "isStorageNode",
+        is_upload_file_display_configuration_tree AS "isDisplayTree",
+        is_built_drawing AS "isBuiltDrawing",
+        post_type AS postType,
+        project_type,
+        storage_type,
+        ext_type,
+        ext_id,
+        archive_auto_type,
+        archive_auto_node_id
         FROM m_archive_tree
         WHERE is_deleted = 0
         <if test=" tenantId!=null and tenantId!='' ">

+ 21 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeContractService.java

@@ -16,10 +16,16 @@
  */
 package org.springblade.manager.service;
 
+import feign.Param;
+import org.springblade.manager.entity.ArchiveTree;
 import org.springblade.manager.entity.ArchiveTreeContract;
 import org.springblade.manager.vo.ArchiveTreeContractVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.ArchiveTreeContractVO2;
+import org.springblade.manager.vo.ArchiveTreeVO;
+
+import java.util.List;
 
 /**
  *  服务类
@@ -38,4 +44,19 @@ public interface IArchiveTreeContractService extends BaseService<ArchiveTreeCont
 	 */
 	IPage<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage<ArchiveTreeContractVO> page, ArchiveTreeContractVO archiveTreeContract);
 
+	/**
+	 * 初始化项目级归档树
+	 * @param tenantId
+	 * @param projectId
+	 * @return
+	 */
+	boolean initTree(String tenantId, Long projectId, List<ArchiveTree> trees);
+
+	List<ArchiveTreeContractVO> lazyTree(String tenantId, Long parentId,Long projectId);
+
+	List<ArchiveTreeContractVO> tree(String tenantI,Integer disPlayTree,Integer nodeType,Long projectId);
+
+	List<ArchiveTreeContractVO2> lazyTree2(String tenantId, Long parentId, Long projectId);
+
+	List<ArchiveTreeContractVO2> tree2(String tenantI,Integer disPlayTree,Integer nodeType,Long projectId);
 }

+ 6 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeService.java

@@ -6,6 +6,7 @@ import org.springblade.manager.entity.ArchiveTree;
 import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.vo.ArchiveTreeVO2;
 
 import java.util.List;
 
@@ -16,8 +17,10 @@ public interface IArchiveTreeService extends BaseService<ArchiveTree> {
 	boolean submit(ArchiveTreeDTO archiveTreeDTO);
 
 	List<ArchiveTreeVO> lazyTree(String tenantId, Long parentId);
+	List<ArchiveTreeVO2> lazyTree2(String tenantId, Long parentId);
 
-	List<ArchiveTreeVO> tree(String tenantI,Integer disPlayTree,Integer nodeType);
+	List<ArchiveTreeVO> tree(String tenantI, Integer disPlayTree, Integer nodeType);
+	List<ArchiveTreeVO2> tree2(String tenantI, Integer disPlayTree, Integer nodeType);
 
 	List<ArchiveTree> selectByParentIdOrId(String id);
 
@@ -26,4 +29,6 @@ public interface IArchiveTreeService extends BaseService<ArchiveTree> {
     List<ArchiveTree> getSameGradeNode(String id);
 
 	boolean submitArchiveTreeSort(List<ArchiveTreeSortDTO> listSort);
+
+	List<ArchiveTree> treeList(String tenantI,Integer disPlayTree,Integer nodeType);
 }

+ 84 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractServiceImpl.java

@@ -16,14 +16,24 @@
  */
 package org.springblade.manager.service.impl;
 
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.mixsmart.utils.StringUtils;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.manager.entity.ArchiveTree;
 import org.springblade.manager.entity.ArchiveTreeContract;
 import org.springblade.manager.vo.ArchiveTreeContractVO;
 import org.springblade.manager.mapper.ArchiveTreeContractMapper;
 import org.springblade.manager.service.IArchiveTreeContractService;
 import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.manager.vo.ArchiveTreeContractVO2;
+import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.*;
+
 /**
  *  服务实现类
  *
@@ -37,5 +47,79 @@ public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeC
 	public IPage<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage<ArchiveTreeContractVO> page, ArchiveTreeContractVO archiveTreeContract) {
 		return page.setRecords(baseMapper.selectArchiveTreeContractPage(page, archiveTreeContract));
 	}
+	@Override
+	public boolean initTree(String tenantId, Long projectId, List<ArchiveTree> trees){
+		List<ArchiveTreeContract> archiveTreeContracts = new ArrayList<>();
+		Map<Long,Long> oldNewMap = new LinkedHashMap<>();
+		Map<Long,Long> idPidMap = new LinkedHashMap<>();
+		Map<Long,ArchiveTree> archiveMap = new LinkedHashMap<>();
+
+		for (ArchiveTree archiveTreeVO :trees) {
+			idPidMap.put(archiveTreeVO.getId(),archiveTreeVO.getParentId());
+			oldNewMap.put(archiveTreeVO.getId(), SnowFlakeUtil.getId());
+			archiveMap.put(archiveTreeVO.getId(), archiveTreeVO);
+		}
+		oldNewMap.put(0L,0L);
+
+		for (ArchiveTree archiveTreeVO :trees) {
+
+			ArchiveTreeContract archiveTree = new ArchiveTreeContract(archiveTreeVO);
+			archiveTree.setId(oldNewMap.get(archiveTreeVO.getId()));
+			archiveTree.setParentId(oldNewMap.get(archiveTreeVO.getParentId()));
+			archiveTree.setCreateUser(AuthUtil.getUserId());
+			archiveTree.setProjectId(projectId);
+			String anCenstors = archiveTreeVO.getAncestors();
+			if (StringUtils.isNotEmpty(anCenstors)) {
+				String newAnCenstors = "";
+				String arrAnCenstor[] = anCenstors.split(",");
+				if (arrAnCenstor.length > 0) {
+
+					for (String anCenstor: arrAnCenstor) {
+						Long anCenstorId = Long.parseLong(anCenstor);
+						Long newAnCenstorId = oldNewMap.get(anCenstorId);
+						if (newAnCenstorId!= null) {
+							if (newAnCenstors.length() == 0) {
+								newAnCenstors += newAnCenstorId;
+							}else {
+								newAnCenstors += (","+ newAnCenstorId);
+							}
+						}
+					}
+				}
+				archiveTree.setAncestors(newAnCenstors);
+			}
+
+			archiveTreeContracts.add(archiveTree);
+		}
+
+		this.saveBatch(archiveTreeContracts);
+		return true;
+	}
+
+	@Override
+	public List<ArchiveTreeContractVO> lazyTree(String tenantId, Long parentId,Long projectId) {
+		if (AuthUtil.isAdministrator()) {
+			tenantId = StringPool.EMPTY;
+		}
+		return ForestNodeMerger.merge(baseMapper.lazyTree(tenantId, parentId,projectId));
+	}
+
+	@Override
+	public List<ArchiveTreeContractVO> tree(String tenantId, Integer disPlayTree, Integer nodeType, Long projectId) {
+		return ForestNodeMerger.merge(baseMapper.tree(tenantId, disPlayTree, nodeType,projectId));
+	}
+
+	@Override
+	public List<ArchiveTreeContractVO2> lazyTree2(String tenantId, Long parentId, Long projectId) {
+		if (AuthUtil.isAdministrator()) {
+			tenantId = StringPool.EMPTY;
+		}
+		return ForestNodeMerger.merge(baseMapper.lazyTree2(tenantId, parentId,projectId));
+	}
+
+	@Override
+	public List<ArchiveTreeContractVO2> tree2(String tenantId, Integer disPlayTree, Integer nodeType, Long projectId) {
+		return ForestNodeMerger.merge(baseMapper.tree2(tenantId, disPlayTree, nodeType,projectId));
+	}
 
 }

+ 29 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeServiceImpl.java

@@ -18,6 +18,7 @@ import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springblade.manager.mapper.ArchiveTreeMapper;
 import org.springblade.manager.service.IArchiveTreeService;
 import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.manager.vo.ArchiveTreeVO2;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
@@ -60,9 +61,30 @@ public class ArchiveTreeServiceImpl extends BaseServiceImpl<ArchiveTreeMapper, A
         return ForestNodeMerger.merge(baseMapper.lazyTree(tenantId, parentId));
     }
 
+    @Override
+    public List<ArchiveTreeVO2> lazyTree2(String tenantId, Long parentId) {
+        if (AuthUtil.isAdministrator()) {
+            tenantId = StringPool.EMPTY;
+        }
+        return ForestNodeMerger.merge(baseMapper.lazyTree2(tenantId, parentId));
+    }
+
     @Override
     public List<ArchiveTreeVO> tree(String tenantId, Integer disPlayTree, Integer nodeType) {
-        return ForestNodeMerger.merge(baseMapper.tree(tenantId, disPlayTree, nodeType));
+        List<ArchiveTreeVO> archiveTreeVOList = baseMapper.tree(tenantId, disPlayTree, nodeType);
+//        for (ArchiveTreeVO vo:archiveTreeVOList) {
+//            System.out.println();
+//        }
+        return ForestNodeMerger.merge(archiveTreeVOList);
+    }
+
+    @Override
+    public List<ArchiveTreeVO2> tree2(String tenantId, Integer disPlayTree, Integer nodeType) {
+        List<ArchiveTreeVO2> archiveTreeVOList = baseMapper.tree2(tenantId, disPlayTree, nodeType);
+//        for (ArchiveTreeVO2 vo2:archiveTreeVOList) {
+//            System.out.println();
+//        }
+        return ForestNodeMerger.merge(archiveTreeVOList);
     }
 
     @Override
@@ -166,5 +188,11 @@ public class ArchiveTreeServiceImpl extends BaseServiceImpl<ArchiveTreeMapper, A
         return save(archiveTreeDTO);
     }
 
+    @Override
+    public List<ArchiveTree> treeList(String tenantId, Integer disPlayTree, Integer nodeType) {
+        return          baseMapper.selectList(Wrappers.<ArchiveTree>query().lambda()
+                .eq(ArchiveTree::getTenantId, tenantId).eq(ArchiveTree::getIsDeleted,0).orderByAsc(ArchiveTree::getSort));
+    }
+
 
 }