Browse Source

wbs树导入、系统配置

liuyc 2 years ago
parent
commit
7fb7159d31
50 changed files with 2110 additions and 201 deletions
  1. 1 1
      blade-ops/blade-flow/doc/nacos/blade-flow-dev.yaml
  2. 18 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ArchiveTreeDTO.java
  3. 3 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/FormElementDTO.java
  4. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ImageClassificationConfigDTO.java
  5. 1 1
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ProjectAssignmentWbstreeDTO.java
  6. 8 1
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/WbsTreeDTO.java
  7. 105 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTree.java
  8. 60 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ImageClassificationConfig.java
  9. 5 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsFormElement.java
  10. 28 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsFormInitEntity.java
  11. 12 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTree.java
  12. 59 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeVO.java
  13. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ImageClassificationConfigVO.java
  14. 10 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java
  15. 40 46
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java
  16. 7 1
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java
  17. 0 1
      blade-service/blade-manager/pom.xml
  18. 120 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeController.java
  19. 51 16
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ContractInfoController.java
  20. 149 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ImageClassificationConfigController.java
  21. 18 11
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ProjectInfoController.java
  22. 105 27
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeController.java
  23. 283 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/excel/WbsExcelUtil.java
  24. 61 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/excel/WbsTreeExcel.java
  25. 29 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.java
  26. 79 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.xml
  27. 7 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ContractInfoMapper.java
  28. 41 11
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ContractInfoMapper.xml
  29. 44 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ImageClassificationConfigMapper.java
  30. 27 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ImageClassificationConfigMapper.xml
  31. 2 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsFormElementMapper.java
  32. 8 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsFormElementMapper.xml
  33. 69 62
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.java
  34. 46 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.xml
  35. 26 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeService.java
  36. 6 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IContractInfoService.java
  37. 44 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IImageClassificationConfigService.java
  38. 3 10
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsFormElementService.java
  39. 10 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsTreeService.java
  40. 69 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeServiceImpl.java
  41. 19 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ContractInfoServiceImpl.java
  42. 54 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ImageClassificationConfigServiceImpl.java
  43. 90 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsFormElementServiceImpl.java
  44. 96 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeServiceImpl.java
  45. 31 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ArchiveTreeWrapper.java
  46. 49 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ImageClassificationConfigWrapper.java
  47. 3 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java
  48. 2 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java
  49. 5 4
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
  50. 39 0
      doc/nacos/blade-flow-dev.yaml

+ 1 - 1
blade-ops/blade-flow/doc/nacos/blade-flow-dev.yaml

@@ -20,7 +20,7 @@ blade:
         # MySql
         url: jdbc:mysql://localhost:3306/bladex_flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
         username: root
-        password: root
+        password: 123456
         # PostgreSQL
         #url: jdbc:postgresql://127.0.0.1:5432/bladex_flow
         #username: postgres

+ 18 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ArchiveTreeDTO.java

@@ -0,0 +1,18 @@
+package org.springblade.manager.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.manager.entity.ArchiveTree;
+
+/**
+ * 归档树节点表数据传输对象实体类
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTreeDTO extends ArchiveTree {
+    private static final long serialVersionUID = 1L;
+
+}

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/FormElementDTO.java

@@ -8,6 +8,8 @@ import lombok.NoArgsConstructor;
 import org.springblade.manager.entity.WbsFormElement;
 import org.springblade.manager.entity.WbsTree;
 
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.util.List;
 
@@ -65,5 +67,6 @@ public class FormElementDTO extends WbsTree {
     /**
      * 元素集合
      */
+    @ApiModelProperty(value = "元素集合")
     private List<WbsFormElement> elementList;
 }

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ImageClassificationConfigDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.dto;
+
+import org.springblade.manager.entity.ImageClassificationConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 影像分类配置表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ImageClassificationConfigDTO extends ImageClassificationConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ProjectAssignmentWbstreeDTO.java

@@ -46,7 +46,7 @@ public class ProjectAssignmentWbstreeDTO extends ProjectAssignmentWbstree {
      */
     @JsonProperty(value = "wbsTreeId")
     @ApiModelProperty(name = "wbsTreeIds", value = "字符串拼接wbsTreeIds", required = true)
-    private String wbsTreeId;
+    private String wbsTreeIds;
 
 
 }

+ 8 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/WbsTreeDTO.java

@@ -21,6 +21,9 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.manager.entity.WbsTree;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
 
 /**
  * 数据传输对象实体类
@@ -36,17 +39,20 @@ public class WbsTreeDTO extends WbsTree {
 	/**
 	 * wbs库id
 	 */
+	@NotBlank(message = "wbs库id不能为空")
 	@ApiModelProperty(value = "wbs库id",required = true)
 	private String wbsId;
 	/**
 	 * 租户id
 	 */
+	@NotBlank(message = "租户id不能为空")
 	@ApiModelProperty(value = "租户id",required = true)
 	private String tenantId;
 
 	/**
 	 * 父主键
 	 */
+	@NotNull(message = "父主键id不能为空")
 	@ApiModelProperty(value = "父主键id",required = true)
 	private Long parentId;
 
@@ -65,6 +71,7 @@ public class WbsTreeDTO extends WbsTree {
 	/**
 	 * 部门名
 	 */
+	@NotBlank(message = "名称不能为空")
 	@ApiModelProperty(value = "节点名称",required = true)
 	private String deptName;
 	/**
@@ -82,7 +89,7 @@ public class WbsTreeDTO extends WbsTree {
 	/**
 	 * 排序
 	 */
-	@ApiModelProperty(value = "排序",required = true)
+	@ApiModelProperty(value = "排序",required = false)
 	private Integer sort;
 
 	/**

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

@@ -0,0 +1,105 @@
+package org.springblade.manager.entity;
+
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * 归档树节点表实体类
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+@Data
+@TableName("m_archive_tree")
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTree extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 租户id
+     */
+    @ApiModelProperty(value = "租户id")
+    private String tenantId;
+
+    /**
+     * 父主键
+     */
+    @ApiModelProperty(value = "父主键id")
+    private Long parentId;
+
+
+    /**
+     * 祖级列表
+     */
+    @ApiModelProperty(value = "祖级id列表")
+    private String ancestors;
+
+
+    /**
+     * 节点名称
+     */
+    @ApiModelProperty(value = "nodeName")
+    private String nodeName;
+
+    /**
+     * 节点全称
+     */
+    @ApiModelProperty(value = "节点全称")
+    private String fullName;
+
+    /**
+     * 角色类型
+     */
+    @ApiModelProperty(value = "角色类型")
+    private Integer roleType;
+
+    /**
+     * 节点类型
+     */
+    @ApiModelProperty(value = "节点类型")
+    private Integer nodeType;
+
+    /**
+     * 是否为存储节点 '0'否 '1'是
+     */
+    @ApiModelProperty(value = "是否为存储节点 '0'否 '1'是")
+    private Integer isStorageNode;
+
+    /**
+     * 是否为竣工图 '0'否 '1'是
+     */
+    @ApiModelProperty(value = "是否为竣工图 '0'否 '1'是")
+    private Integer isBuiltDrawing;
+
+    /**
+     * 是否为接口节点 '0'否 '1'是
+     */
+    @ApiModelProperty(value = "是否为接口节点 '0'否 '1'是")
+    private Integer isInterfaceNode;
+
+    /**
+     * 接口类型
+     */
+    @ApiModelProperty(value = "接口类型")
+    private Integer interfaceType;
+
+
+    /**
+     * 排序
+     */
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+
+
+}

+ 60 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ImageClassificationConfig.java

@@ -0,0 +1,60 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+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;
+
+/**
+ * 影像分类配置表实体类
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+@Data
+@TableName("m_image_classification_config")
+@EqualsAndHashCode(callSuper = true)
+public class ImageClassificationConfig extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 分类名称
+	*/
+		private String classfName;
+	/**
+	* 所属项目阶段
+	*/
+		private String projectStage;
+	/**
+	* 所属方
+	*/
+		private String affiliatedParty;
+	/**
+	* 文件类型
+	*/
+		private Integer fileType;
+	/**
+	* 存储目录格式
+	*/
+		private Integer storageDirectoryFormat;
+
+
+}

+ 5 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsFormElement.java

@@ -10,6 +10,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.core.mp.base.BaseEntity;
 
+import javax.validation.constraints.NotEmpty;
+
 /**
  * wbs动态库表单元素实体类
  *
@@ -31,6 +33,7 @@ public class WbsFormElement extends BaseEntity {
 	/**
 	 * 元素名称
 	 */
+//	@NotEmpty(message = "元素名称不能为空")
 	@ApiModelProperty(value = "元素名称",required = true)
 	@JsonProperty(value = "eName")
 	private String eName;
@@ -38,6 +41,7 @@ public class WbsFormElement extends BaseEntity {
 	/**
 	 * 元素类型
 	 */
+//	@NotEmpty(message = "元素类型不能为空")
 	@ApiModelProperty(value = "元素类型",required = true)
 	@JsonProperty(value = "eType")
 	private Integer eType;
@@ -45,6 +49,7 @@ public class WbsFormElement extends BaseEntity {
 	/**
 	 * 元素长度
 	 */
+//	@NotEmpty(message = "元素长度不能为空")
 	@ApiModelProperty(value = "元素长度",required = true)
 	@JsonProperty(value = "eLength")
 	private Integer eLength;

+ 28 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsFormInitEntity.java

@@ -0,0 +1,28 @@
+package org.springblade.manager.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * wbs表单初始化实体
+ */
+@Data
+public class WbsFormInitEntity implements Serializable {
+
+    /**
+     * 字段名
+     */
+    private String fieldName;
+
+    /**
+     * 字段类型
+     */
+    private String fieldType;
+
+    /**
+     * 字段长度
+     */
+    private String fieldLength;
+
+}

+ 12 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTree.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.manager.entity;
 
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.Api;
@@ -38,6 +39,12 @@ public class WbsTree extends BaseEntity {
 
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 主键id
+	 */
+	@TableId(value = "id")
+	private Long id;
+
 	/**
 	 * wbs库id
 	 */
@@ -138,5 +145,10 @@ public class WbsTree extends BaseEntity {
 	@ApiModelProperty(value = "内业资料类型")
 	private Integer majorDataType;
 
+	/**
+	 * 初始化实体表名
+	 */
+	@ApiModelProperty(value = "初始化实体表名")
+	private String initTableName;
 
 }

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

@@ -0,0 +1,59 @@
+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 lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tool.node.INode;
+import org.springblade.manager.entity.ArchiveTree;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 归档树节点表视图实体类
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTreeVO extends ArchiveTree  implements INode<ArchiveTreeVO> {
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 主键ID
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /**
+     * 父节点ID
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long parentId;
+
+    /**
+     * 子孙节点
+     */
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    private List<ArchiveTreeVO> children;
+
+    /**
+     * 是否有子孙节点
+     */
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    private Boolean hasChildren;
+
+    @Override
+    public List<ArchiveTreeVO> getChildren() {
+        if (this.children == null) {
+            this.children = new ArrayList<>();
+        }
+        return this.children;
+    }
+
+}

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ImageClassificationConfigVO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.vo;
+
+import org.springblade.manager.entity.ImageClassificationConfig;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 影像分类配置表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ImageClassificationConfigVO extends ImageClassificationConfig {
+	private static final long serialVersionUID = 1L;
+
+}

+ 10 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java

@@ -16,6 +16,8 @@
  */
 package org.springblade.system.dto;
 
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.system.entity.Role;
@@ -30,4 +32,12 @@ import org.springblade.system.entity.Role;
 public class RoleDTO extends Role {
 	private static final long serialVersionUID = 1L;
 
+
+	/**
+	 * 岗位id
+	 */
+	@ApiModelProperty(value = "岗位id")
+	@JsonProperty(value = "pId")
+	private String pId;
+
 }

+ 40 - 46
blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java

@@ -39,60 +39,54 @@ import java.io.Serializable;
 @ApiModel(value = "Role对象", description = "Role对象")
 public class Role implements Serializable {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	/**
-	 * 主键
-	 */
-	@JsonSerialize(using = ToStringSerializer.class)
-	@ApiModelProperty(value = "主键")
-	@TableId(value = "id", type = IdType.ASSIGN_ID)
-	private Long id;
+    /**
+     * 主键
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.ASSIGN_ID)
+    private Long id;
 
-	/**
-	 * 租户ID
-	 */
-	@ApiModelProperty(value = "租户ID")
-	private String tenantId;
+    /**
+     * 租户ID
+     */
+    @ApiModelProperty(value = "租户ID")
+    private String tenantId;
 
-	/**
-	 * 父主键
-	 */
-	@JsonSerialize(using = ToStringSerializer.class)
-	@ApiModelProperty(value = "父主键")
-	private Long parentId;
+    /**
+     * 父主键
+     */
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "父主键")
+    private Long parentId;
 
-	/**
-	 * 角色名
-	 */
-	@ApiModelProperty(value = "角色名")
-	private String roleName;
+    /**
+     * 角色名
+     */
+    @ApiModelProperty(value = "角色名")
+    private String roleName;
 
-	/**
-	 * 排序
-	 */
-	@ApiModelProperty(value = "排序")
-	private Integer sort;
+    /**
+     * 排序
+     */
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
 
-	/**
-	 * 角色别名
-	 */
-	@ApiModelProperty(value = "角色别名")
-	private String roleAlias;
+    /**
+     * 角色别名
+     */
+    @ApiModelProperty(value = "角色别名")
+    private String roleAlias;
 
-	/**
-	 * 是否已删除
-	 */
-	@TableLogic
-	@ApiModelProperty(value = "是否已删除")
-	private Integer isDeleted;
+    /**
+     * 是否已删除
+     */
+    @TableLogic
+    @ApiModelProperty(value = "是否已删除")
+    private Integer isDeleted;
 
 
-	/*//**
-	 * 岗位id
-	 *//*
-	@ApiModelProperty(value = "岗位id")
-	@JsonProperty(value = "pId")
-	private String pId;*/
 
 }

+ 7 - 1
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java

@@ -17,6 +17,7 @@
 package org.springblade.system.user.vo;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
@@ -41,10 +42,15 @@ public class UserVO extends User {
 	@JsonSerialize(using = ToStringSerializer.class)
 	private Long id;
 
+	/**
+	 * uId
+	 */
+	@JsonProperty(value = "uId")
+	private Long uId;
+
 	/**
 	 * 密码
 	 */
-	@JsonIgnore
 	private String password;
 
 	/**

+ 0 - 1
blade-service/blade-manager/pom.xml

@@ -46,7 +46,6 @@
         </dependency>
 
 
-
     </dependencies>
 
 </project>

+ 120 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeController.java

@@ -0,0 +1,120 @@
+package org.springblade.manager.controller;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.cache.utils.CacheUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.support.Kv;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.manager.dto.ArchiveTreeDTO;
+import org.springblade.manager.dto.WbsTreeDTO;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.entity.WbsTree;
+import org.springblade.manager.service.IArchiveTreeService;
+import org.springblade.manager.vo.ArchiveTreeVO;
+import org.springblade.manager.vo.WbsTreeVO;
+import org.springblade.manager.wrapper.ArchiveTreeWrapper;
+import org.springblade.manager.wrapper.WbsTreeWrapper;
+import org.springblade.system.cache.DictCache;
+import org.springblade.system.enums.DictEnum;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
+
+/**
+ * 归档树节点控制层
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+
+@RestController
+@AllArgsConstructor
+@RequestMapping("/archiveTree")
+@Api(value = "归档树配置", tags = "归档树配置接口")
+public class ArchiveTreeController extends BladeController {
+
+    private final IArchiveTreeService archiveTreeService;
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入ArchiveTree,请求头token")
+    @ApiImplicitParam(name = "id", value = "id", required = true)
+    public R<ArchiveTreeVO> detail(ArchiveTree archiveTree) {
+        ArchiveTree detail = archiveTreeService.getOne(Condition.getQueryWrapper(archiveTree));
+        if (detail != null) {
+            return R.data(ArchiveTreeWrapper.build().entityVO(detail));
+        }
+        return R.fail(200, "未查询到信息");
+    }
+
+    /**
+     * 懒加载获取项目节点树形结构
+     */
+    @GetMapping("/lazy-tree")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "懒加载归档节点树形结构", notes = "传入角色类型roleTypeNum,父级parentId,请求头token")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "roleTypeNum", value = "角色类型", required = true),
+            @ApiImplicitParam(name = "parentId", value = "父级id", required = true),
+            @ApiImplicitParam(name = "tenantId", value = "租户id", required = true),
+    })
+    public R<List<ArchiveTreeVO>> lazyTree(String roleTypeNum, Long parentId, BladeUser bladeUser, String tenantId) {
+        List<ArchiveTreeVO> tree = archiveTreeService.lazyTree(roleTypeNum, Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId);
+        if (tree != null && tree.size() > 0) {
+            return R.data(tree);
+        }
+        return R.fail(200, "未查询到信息");
+    }
+
+    /**
+     * 获取项目节点树形结构 (新增、修改加载、分配合同wbs树加载type=1)
+     *
+     * @return
+     */
+    @GetMapping("/tree")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "归档节点树形结构", notes = "传入租户Id、roleTypeNum、请求头token")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "tenantId", value = "租户id", required = true),
+            @ApiImplicitParam(name = "roleTypeNum", value = "角色类型", required = true)
+    })
+    public R<List<ArchiveTreeVO>> tree(String roleTypeNum, String tenantId, BladeUser bladeUser) {
+        List<ArchiveTreeVO> tree = archiveTreeService.tree(roleTypeNum , Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()));
+        if (tree != null && tree.size() > 0) {
+            return R.data(tree);
+        }
+        return R.fail(200, "未查询到信息");
+    }
+
+    /**
+     * 新增或修改
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "归档树新增或修改", notes = "WbsTreeDTO")
+    public R submit(@Valid @RequestBody ArchiveTreeDTO archiveTreeDTO) {
+        if (archiveTreeService.submit(archiveTreeDTO)) {
+            CacheUtil.clear(SYS_CACHE);
+            // 返回懒加载树更新节点所需字段
+            Kv kv = Kv.create().set("id", String.valueOf(archiveTreeDTO.getId())).set("tenantId", archiveTreeDTO.getTenantId());
+            return R.data(kv);
+        }
+        return R.fail("操作失败");
+    }
+
+
+}

+ 51 - 16
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ContractInfoController.java

@@ -16,10 +16,9 @@
  */
 package org.springblade.manager.controller;
 
+import com.alibaba.nacos.common.utils.MD5Utils;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.*;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 
@@ -36,6 +35,7 @@ import org.springblade.manager.service.SaveUserInfoByProjectService;
 import org.springblade.manager.vo.CRolePostVO;
 import org.springblade.system.user.entity.User;
 import org.springblade.system.user.feign.IUserClient;
+import org.springframework.util.DigestUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 
@@ -44,6 +44,8 @@ import org.springblade.manager.vo.ContractInfoVO;
 import org.springblade.manager.wrapper.ContractInfoWrapper;
 import org.springblade.manager.service.IContractInfoService;
 import org.springblade.core.boot.ctrl.BladeController;
+import sun.security.provider.MD5;
+import sun.security.provider.SHA;
 
 import java.util.*;
 
@@ -136,14 +138,30 @@ public class ContractInfoController extends BladeController {
         return R.status(contractInfoService.updateById(contractInfo));
     }
 
+    /**
+     * 删除文件
+     */
+    @GetMapping("/deleteFile")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "删除文件", notes = "传入文件url")
+    public R deleteFile(@Valid @RequestParam("url") String url) {
+        return R.status(contractInfoService.deleteFile(url));
+    }
+
+
     /**
      * 新增或修改 合同段信息表
      */
     @PostMapping("/submit")
     @ApiOperationSupport(order = 6)
     @ApiOperation(value = "新增或修改", notes = "传入contractInfo")
-    public R submit(@Valid @RequestBody ContractInfo contractInfo) {
-        return R.status(contractInfoService.saveOrUpdate(contractInfo));
+    public R submit(@Valid @RequestBody ContractInfoVO contractInfo) {
+        //新增
+        boolean b = contractInfoService.saveOrUpdate(contractInfo);
+        if (b) {
+            return R.data(contractInfo, "操作成功");
+        }
+        return R.fail("操作失败");
     }
 
 
@@ -181,21 +199,41 @@ public class ContractInfoController extends BladeController {
     @ApiOperation(value = "查询当前项目合同角色岗位下的用户", notes = "传入项目id、合同id、角色id、岗位id")
     public R<List<User>> findAllUserByCondition(@RequestBody FindAllUserByConditionDTO values) {
         List<User> users = contractInfoService.findAllUserByCondition(values);
+        //密码明文解码
+        /*for (User user : users) {
+            String password = user.getPassword();
+            DigestUtils.md5DigestAsHex(password.getBytes());
+        }*/
         if (users.size() > 0) {
             return R.data(users);
         }
-        return R.fail("未查询到数据");
+        return R.data(users, "未查询到数据");
+    }
+
+    /**
+     * 根据项目id、合同id、角色id查询当前运维的用户
+     */
+    @PostMapping("/findUserListByCondition")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "查询当前项目角色下的运维用户列表", notes = "传入项目id、角色id、合同id(非必传)")
+    public R<List<User>> findUserListByCondition(@RequestBody FindAllUserByConditionDTO values) {
+        List<User> users = contractInfoService.findUserListByCondition(values);
+        if (users.size() > 0) {
+            return R.data(users);
+        }
+        return R.data(users, "未查询到数据");
     }
 
+
     /**
      * 根据姓名查询用户
      */
     @GetMapping("/findUserByName")
     @ApiOperationSupport(order = 14)
     @ApiOperation(value = "根据姓名模糊查询用户", notes = "传入用户姓名")
-    public R<List<User>> findUserByName(@RequestParam("name") String name){
+    public R<List<User>> findUserByName(@RequestParam("name") String name) {
         List<User> userByName = contractInfoService.findUserByName(name);
-        if (userByName.size() >0){
+        if (userByName.size() > 0) {
             return R.data(userByName);
         }
         return R.success("未查询到信息");
@@ -225,7 +263,7 @@ public class ContractInfoController extends BladeController {
     @ApiOperation(value = "保存当前用户与合同段关联信息", notes = "传入项目id、合同id、角色id、岗位id、用户id List集合")
     public R saveUserInfoByProject(@RequestBody List<SaveUserInfoByProjectDTO> list) {
 //        list.stream().forEach(System.out::print);
-        if (list.size()>0){
+        if (list.size() > 0) {
             Boolean result = saveUserInfoByProject.saveBatch(list);
             if (result) {
                 return R.success("保存成功");
@@ -250,15 +288,12 @@ public class ContractInfoController extends BladeController {
     @PostMapping("/resetPasswordByUserId")
     @ApiOperationSupport(order = 13)
     @ApiOperation(value = "重置密码", notes = "传入当前用户的userId,默认重置密码123456")
-    public R updatePasswordByUserId(@ApiParam(value = "用户userId", required = true) @RequestParam String userId){
-        if (StringUtils.isNotEmpty(userId)){
+    public R updatePasswordByUserId(@ApiParam(value = "用户userId", required = true) @RequestParam String userId) {
+        if (StringUtils.isNotEmpty(userId)) {
             return iUserClient.resetPassword(userId);
-        }return R.fail("操作失败");
+        }
+        return R.fail("操作失败");
     }
 
 
-
-
-
-
 }

+ 149 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ImageClassificationConfigController.java

@@ -0,0 +1,149 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+
+import org.springblade.manager.entity.ImageClassificationConfig;
+import org.springblade.manager.vo.ImageClassificationConfigVO;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.wrapper.ImageClassificationConfigWrapper;
+import org.springblade.manager.service.IImageClassificationConfigService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 影像分类配置表 控制器
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/imageClassificationConfig")
+@Api(value = "影像分类配置", tags = "影像分类配置接口")
+public class ImageClassificationConfigController extends BladeController {
+
+    private final IImageClassificationConfigService imageClassificationConfigService;
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入imageClassificationConfig")
+    public R<ImageClassificationConfigVO> detail(ImageClassificationConfig imageClassificationConfig) {
+        ImageClassificationConfig detail = imageClassificationConfigService.getOne(Condition.getQueryWrapper(imageClassificationConfig));
+        return R.data(ImageClassificationConfigWrapper.build().entityVO(detail));
+    }
+
+    /**
+     * 分页 影像分类配置表
+     */
+    @GetMapping("/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页", notes = "传入imageClassificationConfig")
+    public R<IPage<ImageClassificationConfigVO>> list(ImageClassificationConfig imageClassificationConfig, Query query) {
+        IPage<ImageClassificationConfig> pages = imageClassificationConfigService.page(Condition.getPage(query), Condition.getQueryWrapper(imageClassificationConfig));
+        return R.data(ImageClassificationConfigWrapper.build().pageVO(pages));
+    }
+
+
+    /**
+     * 自定义分页 影像分类配置表
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入imageClassificationConfig")
+    public R<IPage<ImageClassificationConfigVO>> page(ImageClassificationConfigVO imageClassificationConfig, Query query) {
+        IPage<ImageClassificationConfigVO> pages = imageClassificationConfigService.selectImageClassificationConfigPage(Condition.getPage(query), imageClassificationConfig);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 影像分类配置表
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入imageClassificationConfig")
+    public R save(@Valid @RequestBody ImageClassificationConfig imageClassificationConfig) {
+        return R.status(imageClassificationConfigService.save(imageClassificationConfig));
+    }
+
+    /**
+     * 修改 影像分类配置表
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入imageClassificationConfig")
+    public R update(@Valid @RequestBody ImageClassificationConfig imageClassificationConfig) {
+        return R.status(imageClassificationConfigService.updateById(imageClassificationConfig));
+    }
+
+    /**
+     * 新增或修改 影像分类配置表
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入imageClassificationConfig")
+    public R submit(@Valid @RequestBody ImageClassificationConfig imageClassificationConfig) {
+        return R.status(imageClassificationConfigService.saveOrUpdate(imageClassificationConfig));
+    }
+
+
+    /**
+     * 删除 影像分类配置表
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return R.status(imageClassificationConfigService.deleteLogic(Func.toLongList(ids)));
+    }
+
+    /**
+     * 根据所属类型查询
+     */
+    @GetMapping("/findByType")
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "根据所属类型查询", notes = "传入type")
+    public R<List<ImageClassificationConfig>> findByType(@RequestParam("type") String type) {
+
+        List<ImageClassificationConfig> lists = imageClassificationConfigService.selectByType(type);
+
+        if (lists.size() > 0) {
+            return R.data(lists,"查询成功");
+        }
+        return R.fail("未查询到数据");
+    }
+
+
+}

+ 18 - 11
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ProjectInfoController.java

@@ -23,6 +23,7 @@ import lombok.AllArgsConstructor;
 
 import javax.validation.Valid;
 
+import org.apache.commons.lang.StringUtils;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
@@ -30,8 +31,12 @@ import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.dto.ProjectAssignmentWbstreeDTO;
 import org.springblade.manager.dto.ProjectInfoDTO;
 import org.springblade.manager.entity.ProjectAssignmentWbstree;
+import org.springblade.manager.entity.WbsTree;
 import org.springblade.manager.service.IProjectAssignmentWbstreeService;
+import org.springblade.manager.service.IWbsTreeService;
 import org.springblade.manager.vo.ContractlnfoCountVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springblade.manager.entity.ProjectInfo;
@@ -56,6 +61,7 @@ public class ProjectInfoController extends BladeController {
 
     private final IProjectInfoService projectInfoService;
     private final IProjectAssignmentWbstreeService projectAssignmentWbstreeService;
+    private final IWbsTreeService wbsTreeService;
 
     /**
      * 详情
@@ -128,8 +134,8 @@ public class ProjectInfoController extends BladeController {
     @ApiImplicitParam(value = "id", name = "id", required = true)
     public R submit(@Valid @RequestBody ProjectInfo projectInfo) {
         boolean b = projectInfoService.saveOrUpdate(projectInfo);
-        if (b){
-            return R.data(projectInfo,"操作成功");
+        if (b) {
+            return R.data(projectInfo, "操作成功");
         }
         return R.fail("操作失败");
     }
@@ -163,14 +169,14 @@ public class ProjectInfoController extends BladeController {
      */
     @PostMapping("/saveWbsTreeInProject")
     @ApiOperationSupport(order = 9)
-    @ApiOperation(value = "保存项目合同分配wbs树", notes = "ProjectAssignmentWbstreeDTO")
-    public R saveWbsTreeInProject(@RequestBody ProjectAssignmentWbstreeDTO projectAssignmentWbstreeDTO) {
-
-        Boolean b = projectAssignmentWbstreeService.saveWbsTreeInProject(projectAssignmentWbstreeDTO);
-        if (b){
-            return R.data(projectAssignmentWbstreeDTO,"操作成功");
+    @ApiOperation(value = "保存项目合同分配wbs树", notes = "ProjectAssignmentWbsTreeDTO")
+    public R saveWbsTreeInProject(@RequestBody ProjectAssignmentWbstreeDTO pawDTO) {
+        Boolean b = wbsTreeService.saveWbsTreeInProject(pawDTO);
+        if (b) {
+            return R.data(pawDTO, "操作成功");
         }
         return R.fail("操作失败");
+
     }
 
     /**
@@ -178,14 +184,15 @@ public class ProjectInfoController extends BladeController {
      */
     @PostMapping("/updateWbsTreeInProject")
     @ApiOperationSupport(order = 10)
-    @ApiOperation(value = "修改项目合同分配wbs树", notes = "ProjectAssignmentWbstreeDTO")
-    @ApiImplicitParam(name = "id",value = "主键id",required = true)
+    @ApiOperation(value = "修改项目合同分配wbs树", notes = "ProjectAssignmentWbsTreeDTO")
+    @ApiImplicitParam(name = "id", value = "主键id", required = true)
     public R updateWbsTreeInProject(@RequestBody ProjectAssignmentWbstreeDTO projectAssignmentWbstreeDTO) {
         Boolean b = projectAssignmentWbstreeService.updateWbsTreeInProject(projectAssignmentWbstreeDTO);
-        if (b){
+        if (b) {
             return R.success("操作成功");
         }
         return R.fail("操作失败");
     }
 
+
 }

+ 105 - 27
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeController.java

@@ -20,26 +20,26 @@ package org.springblade.manager.controller;
 import io.swagger.annotations.*;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import oracle.jdbc.proxy.annotation.Post;
 import org.apache.commons.lang.StringUtils;
-import org.bouncycastle.crypto.tls.MACAlgorithm;
 import org.springblade.core.cache.utils.CacheUtil;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.BladeUser;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.support.Kv;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.manager.dto.FormElementDTO;
-import org.springblade.manager.dto.WbsFormElementDTO;
 import org.springblade.manager.dto.WbsTreeDTO;
 import org.springblade.manager.entity.WbsFormElement;
 import org.springblade.manager.entity.WbsTree;
+import org.springblade.manager.excel.WbsExcelUtil;
+import org.springblade.manager.excel.WbsTreeExcel;
 import org.springblade.manager.service.IWbsFormElementService;
 import org.springblade.manager.vo.WbsNodeTableVO;
 import org.springblade.manager.vo.WbsTreeVO;
 import org.springblade.system.cache.DictCache;
-import org.springblade.system.entity.DictBiz;
 import org.springblade.system.enums.DictEnum;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -47,11 +47,13 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springblade.manager.wrapper.WbsTreeWrapper;
 import org.springblade.manager.service.IWbsTreeService;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springframework.web.multipart.MultipartFile;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
 
 import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 
@@ -130,7 +132,7 @@ public class WbsTreeController extends BladeController {
     @PostMapping("/submit")
     @ApiOperationSupport(order = 4)
     @ApiOperation(value = "新增或修改", notes = "WbsTreeDTO")
-    public R submit(@RequestBody WbsTreeDTO WbsTreeDTO) {
+    public R submit(@Valid @RequestBody WbsTreeDTO WbsTreeDTO) {
         if (wbsTreeService.submit(WbsTreeDTO)) {
             CacheUtil.clear(SYS_CACHE);
             // 返回懒加载树更新节点所需字段
@@ -154,11 +156,11 @@ public class WbsTreeController extends BladeController {
 
 
     /**
-     * 表单查询(根据节点ID查询当前表单)
+     * 查询当前节点下所有表单(根据节点ID查询当前表单)
      */
     @GetMapping("/selectByNodeTable")
     @ApiOperationSupport(order = 6)
-    @ApiOperation(value = "表单查询", notes = "传入父节点id")
+    @ApiOperation(value = "查询当前节点下所有表单", notes = "传入父节点id")
     public R<List<WbsNodeTableVO>> selectByNodeTable(@ApiParam(value = "父节点id", required = true) @RequestParam String id) {
         List<WbsNodeTableVO> rs = wbsTreeService.selectByNodeTable(id);
         if (!("").equals(rs) && rs.size() > 0) {
@@ -181,7 +183,7 @@ public class WbsTreeController extends BladeController {
             if (wbsFormElements.size() > 0) {
                 return R.fail("删除失败,请先移除表单中的元素!");
             }
-            // 删除表单
+            //删除表单
             boolean restul = wbsTreeService.removeTableById(id);
             if (restul) {
                 return R.success("删除成功");
@@ -191,11 +193,11 @@ public class WbsTreeController extends BladeController {
     }
 
     /**
-     * 表单元素列表
+     * 根据表单id查询所有元素
      */
     @GetMapping("/selectFormElements")
     @ApiOperationSupport(order = 7)
-    @ApiOperation(value = "表单元素列表", notes = "传入表单id")
+    @ApiOperation(value = "根据表单id查询所有元素", notes = "传入表单id")
     @ApiImplicitParam(name = "id", value = "表单id", required = true)
     public R<List<WbsFormElement>> selectFormElements(@RequestParam("id") String id) {
         List<WbsFormElement> wbsFormElements = null;
@@ -217,30 +219,46 @@ public class WbsTreeController extends BladeController {
     @ApiOperation(value = "表单与元素新增", notes = "传入FormElementDTO")
     @Transactional(rollbackFor = Exception.class)
     public R saveFormElement(@RequestBody FormElementDTO formElementDTO) {
+        if (formElementDTO.getElementList().size() <= 0) {
+            return R.fail("操作失败,请先添加表单元素");
+        }
+        String filedName = "";
+        String filedType = "";
+        String filedLength = "";
+        for (WbsFormElement wbsFormElement : formElementDTO.getElementList()) {
+            filedName = wbsFormElement.getEName();
+            filedType = String.valueOf(wbsFormElement.getEType());
+            filedLength = String.valueOf(wbsFormElement.getELength());
+        }
+        if (StringUtils.isEmpty(filedName) || StringUtils.isEmpty(filedType) || StringUtils.isEmpty(filedLength)) {
+            return R.fail("操作失败,请完整填写元素参数");
+        }
+        //初始化表名
+        String newTableName = "m_wbs_form_" + DateUtil.time() + "_" + formElementDTO.getDeptName();
+        formElementDTO.setInitTableName(newTableName);
         //创建表单
         boolean b1 = wbsTreeService.submit2(formElementDTO);
-        //查询当前新建表单的id //todo 通过表单名字查询 表单名不是唯一 待商榷
+        //查询当前新建表单的id //todo 通过表单名字查询 表单名必须唯一
         String tableId = wbsTreeService.selectTableIdByTableName(formElementDTO.getDeptName());
-
-        if (tableId.equals("-1")) {
+        if (("-1").equals(tableId)) {
             return R.fail("表单名已经存在,请重新填写表单名");
         }
-
+        //赋值fid
         List<WbsFormElement> elementList = formElementDTO.getElementList();
-
         for (WbsFormElement wbsFormElement : elementList) {
             wbsFormElement.setFId(tableId);
         }
-
         //批量新增元素
         boolean b2 = wbsFormElementService.saveBatch(elementList);
-        if (b1) {
-            if (b2) {
-                return R.success("新增表单,元素成功");
-            }
-            return R.success("新增表单成功");
+        //通过fId查找当前表下的所有元素
+        List<WbsFormElement> list = wbsFormElementService.selectElementListByFid(tableId);
+        //初始化实体表单
+        Boolean b3 = wbsFormElementService.initTable(list, newTableName);
+        if (b1 && b2 && b3) {
+            return R.data(formElementDTO, "新增表单,元素,初始化实体表成功");
+        } else {
+            throw new RuntimeException("操作失败");
         }
-        return R.fail("新增失败");
     }
 
     /**
@@ -259,6 +277,66 @@ public class WbsTreeController extends BladeController {
     }
 
 
+    /**
+     * 导出Wbs树模板
+     */
+    @GetMapping("/export-template")
+    @ApiOperationSupport(order = 10)
+    @ApiOperation(value = "导出WBS树节点模板")
+    public void exportWbsTree(HttpServletResponse response) {
+        List<WbsTreeExcel> list = new ArrayList<>();
+        ExcelUtil.export(response, "WBS树节点模板", "WBS树节点表", list, WbsTreeExcel.class);
+    }
+
+
+    /**
+     * 导入Wbs模板树
+     */
+    @ApiOperationSupport(order = 11)
+    @ApiOperation(value = "导入WBS树节点", notes = "传入excel文件")
+    @RequestMapping(value = "/import-wbsTree", method = RequestMethod.POST)
+    public R importWbsTree(@RequestPart("excelFile") MultipartFile excelFile,
+                           @RequestPart("wbsTreeFu") WbsTree wbsTreeFu) throws IOException {
+        //获取文件路径
+        File file = WbsExcelUtil.convert(excelFile);
+        String canonicalPath = file.getCanonicalPath();
+        //解析excel
+        WbsExcelUtil excelUtil = new WbsExcelUtil();
+        ArrayList<Map<String, String>> result = excelUtil.readExcelToObj(canonicalPath);
+        for (Map<String, String> map : result) {
+            map.forEach((nodeType, nodeName) -> {
+                WbsTree wbsTreeZi = new WbsTree();
+                if (StringUtils.isNotEmpty(nodeName)) {
+                    //初始化默认值
+                    wbsTreeZi.setTenantId(AuthUtil.getTenantId());
+                    wbsTreeZi.setDeptName(nodeName);
+                    wbsTreeZi.setDeptCategory(Integer.valueOf(nodeType));
+                    wbsTreeZi.setWbsId(wbsTreeFu.getWbsId());
+                    wbsTreeZi.setParentId(wbsTreeFu.getParentId());
+                    //新增节点返回未创建成功查询出来的wbsTree对象、创建成功后的wbsTreeZi对象
+                    WbsTree wbsTree = wbsTreeService.importTree(wbsTreeZi);
+                    //后置初始化默认值
+                    if (wbsTree == null) {
+                        Long id = wbsTreeZi.getId();
+                        //设置ancestors祖级id集合
+                        StringBuilder stringBuffer = new StringBuilder();
+                        StringBuilder appendStr = stringBuffer.append(",").append(wbsTreeZi.getParentId());
+                        String ancestors = wbsTreeFu.getAncestors() + appendStr;
+                        //修改ancestors的值
+                        wbsTreeService.updateDate(ancestors, id);
+                        wbsTreeFu.setParentId(id);
+                        wbsTreeFu.setAncestors(ancestors);
+                    } else {
+                        wbsTreeFu.setParentId(wbsTree.getId());
+                        wbsTreeFu.setAncestors(wbsTree.getAncestors());
+                    }
+                }
+            });
+        }
+        return R.success("导入成功");
+    }
+
+
 }
 
 

+ 283 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/excel/WbsExcelUtil.java

@@ -0,0 +1,283 @@
+package org.springblade.manager.excel;
+
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.util.*;
+
+public class WbsExcelUtil {
+//    public static void main(String[] args) {
+//        WbsExcelUtil excelUtil = new WbsExcelUtil();
+//        //读取excel数据
+//        ArrayList<Map<String, String>> result = excelUtil.readExcelToObj("D:\\Download\\WBS划分模板1.xls");
+//        for (Map<String, String> map : result) {
+//            System.out.println("输出:" + map);
+//        }
+//    }
+
+    /**
+     * 读取excel数据
+     *
+     * @param path
+     */
+    public ArrayList<Map<String, String>> readExcelToObj(String path) {
+
+        Workbook wb = null;
+        ArrayList<Map<String, String>> result = null;
+        try {
+            wb = WorkbookFactory.create(new File(path));
+            result = readExcel(wb, 0, 1, 0);
+        } catch (InvalidFormatException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+    /**
+     * 读取excel文件
+     *
+     * @param wb
+     * @param sheetIndex    sheet页下标:从0开始
+     * @param startReadLine 开始读取的行:从0开始
+     * @param tailLine      去除最后读取的行
+     */
+    private ArrayList<Map<String, String>> readExcel(Workbook wb, int sheetIndex, int startReadLine, int tailLine) {
+        Sheet sheet = wb.getSheetAt(sheetIndex);
+        Row row = null;
+        ArrayList<Map<String, String>> result = new ArrayList<Map<String, String>>();
+        for (int i = startReadLine; i < sheet.getLastRowNum() - tailLine + 1; i++) {
+
+            row = sheet.getRow(i);
+            Map<String, String> map = new HashMap<String, String>();
+            for (Cell c : row) {
+                String returnStr = "";
+                boolean isMerge = isMergedRegion(sheet, i, c.getColumnIndex());
+                //判断是否具有合并单元格
+                if (isMerge) {
+                    String rs = getMergedRegionValue(sheet, row.getRowNum(), c.getColumnIndex());
+                    returnStr = rs;
+                } else {
+                    returnStr = c.getRichStringCellValue().getString();
+                }
+                if (c.getColumnIndex() == 0) {
+                    map.put("1", returnStr);
+                } else if (c.getColumnIndex() == 1) {
+                    map.put("2", returnStr);
+                } else if (c.getColumnIndex() == 2) {
+                    map.put("3", returnStr);
+                } else if (c.getColumnIndex() == 3) {
+                    map.put("4", returnStr);
+                } else if (c.getColumnIndex() == 4) {
+                    map.put("5", returnStr);
+                } else if (c.getColumnIndex() == 5) {
+                    map.put("6", returnStr);
+                }
+            }
+            result.add(map);
+        }
+        return result;
+    }
+
+    /**
+     * 获取合并单元格的值
+     *
+     * @param sheet
+     * @param row
+     * @param column
+     * @return
+     */
+    private String getMergedRegionValue(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress ca = sheet.getMergedRegion(i);
+            int firstColumn = ca.getFirstColumn();
+            int lastColumn = ca.getLastColumn();
+            int firstRow = ca.getFirstRow();
+            int lastRow = ca.getLastRow();
+            if (row >= firstRow && row <= lastRow) {
+                if (column >= firstColumn && column <= lastColumn) {
+                    Row fRow = sheet.getRow(firstRow);
+                    Cell fCell = fRow.getCell(firstColumn);
+                    return getCellValue(fCell);
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 判断合并了行
+     *
+     * @param sheet
+     * @param row
+     * @param column
+     * @return
+     */
+    private boolean isMergedRow(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress range = sheet.getMergedRegion(i);
+            int firstColumn = range.getFirstColumn();
+            int lastColumn = range.getLastColumn();
+            int firstRow = range.getFirstRow();
+            int lastRow = range.getLastRow();
+            if (row == firstRow && row == lastRow) {
+                if (column >= firstColumn && column <= lastColumn) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 判断指定的单元格是否是合并单元格
+     *
+     * @param sheet
+     * @param row    行下标
+     * @param column 列下标
+     * @return
+     */
+    private boolean isMergedRegion(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress range = sheet.getMergedRegion(i);
+            int firstColumn = range.getFirstColumn();
+            int lastColumn = range.getLastColumn();
+            int firstRow = range.getFirstRow();
+            int lastRow = range.getLastRow();
+            if (row >= firstRow && row <= lastRow) {
+                if (column >= firstColumn && column <= lastColumn) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 判断sheet页中是否含有合并单元格
+     *
+     * @param sheet
+     * @return
+     */
+    private boolean hasMerged(Sheet sheet) {
+        return sheet.getNumMergedRegions() > 0 ? true : false;
+    }
+
+    /**
+     * 合并单元格
+     *
+     * @param sheet
+     * @param firstRow 开始行
+     * @param lastRow  结束行
+     * @param firstCol 开始列
+     * @param lastCol  结束列
+     */
+    private void mergeRegion(Sheet sheet, int firstRow, int lastRow, int firstCol, int lastCol) {
+        sheet.addMergedRegion(new CellRangeAddress(firstRow, lastRow, firstCol, lastCol));
+    }
+
+    /**
+     * 获取单元格的值
+     *
+     * @param cell
+     * @return
+     */
+    private String getCellValue(Cell cell) {
+
+        if (cell == null) return "";
+
+        if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
+
+            return cell.getStringCellValue();
+
+        } else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
+
+            return String.valueOf(cell.getBooleanCellValue());
+
+        } else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+
+            return cell.getCellFormula();
+
+        } else if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
+
+            return String.valueOf(cell.getNumericCellValue());
+
+        }
+        return "";
+    }
+
+    /**
+     * 从excel读取内容
+     */
+    private static void readContent(String fileName) {
+        boolean isE2007 = false;    //判断是否是excel2007格式
+        if (fileName.endsWith("xlsx"))
+            isE2007 = true;
+        try {
+            InputStream input = new FileInputStream(fileName);  //建立输入流
+            Workbook wb = null;
+            //根据文件格式(2003或者2007)来初始化
+            if (isE2007) {
+                wb = new XSSFWorkbook(input);
+            } else {
+                wb = new HSSFWorkbook(input);
+            }
+            Sheet sheet = wb.getSheetAt(0);     //获得第一个表单
+            Iterator<Row> rows = sheet.rowIterator(); //获得第一个表单的迭代器
+            while (rows.hasNext()) {
+                Row row = rows.next();  //获得行数据
+                System.out.println("Row #" + row.getRowNum());  //获得行号从0开始
+                Iterator<Cell> cells = row.cellIterator();    //获得第一行的迭代器
+                while (cells.hasNext()) {
+                    Cell cell = cells.next();
+                    System.out.println("Cell #" + cell.getColumnIndex());
+                    switch (cell.getCellType()) {   //根据cell中的类型来输出数据
+                        case HSSFCell.CELL_TYPE_NUMERIC:
+                            System.out.println(cell.getNumericCellValue());
+                            break;
+                        case HSSFCell.CELL_TYPE_STRING:
+                            System.out.println(cell.getStringCellValue());
+                            break;
+                        case HSSFCell.CELL_TYPE_BOOLEAN:
+                            System.out.println(cell.getBooleanCellValue());
+                            break;
+                        case HSSFCell.CELL_TYPE_FORMULA:
+                            System.out.println(cell.getCellFormula());
+                            break;
+                        default:
+                            System.out.println("unsuported sell type=======" + cell.getCellType());
+                            break;
+                    }
+                }
+            }
+        } catch (IOException ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取path路径
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    public static File convert(MultipartFile file) throws IOException {
+        File convFile = new File(Objects.requireNonNull(Objects.requireNonNull(file.getOriginalFilename())));
+        convFile.createNewFile();
+        FileOutputStream fos = new FileOutputStream(convFile);
+        fos.write(file.getBytes());
+        fos.close();
+        return convFile;
+
+    }
+}

+ 61 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/excel/WbsTreeExcel.java

@@ -0,0 +1,61 @@
+package org.springblade.manager.excel;
+
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * WbsTreeExcel
+ *
+ * @author liuyc
+ */
+@Data
+@ColumnWidth(16)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class WbsTreeExcel implements Serializable {
+    private static final long serialVersionUID = 1L;
+    /**
+     * wbs库id
+     */
+    @ExcelProperty(value = "单位工程")
+    private String deptCategory1;
+    /**
+     * 租户id
+     */
+    @ExcelProperty(value = "分部工程")
+    private String deptCategory2;
+
+    /**
+     * 父主键
+     */
+    @ExcelProperty(value = "子分部工程")
+    private String deptCategory3;
+
+    /**
+     * '1'节点 '2'表单
+     */
+    @ExcelProperty(value = "分项工程")
+    @ExcelIgnore
+    private String deptCategory4;
+
+    /**
+     * 部门名
+     */
+    @ExcelProperty(value = "子分项工程")
+    private String deptCategory5;
+    /**
+     * 部门全称
+     */
+    @ExcelProperty(value = "工序")
+    private String deptCategory6;
+
+
+}

+ 29 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.java

@@ -0,0 +1,29 @@
+package org.springblade.manager.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.vo.ArchiveTreeVO;
+import org.springblade.manager.vo.WbsTreeVO;
+
+import java.util.List;
+
+
+/**
+ * Mapper 接口
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+public interface ArchiveTreeMapper extends BaseMapper<ArchiveTree> {
+
+
+    List<ArchiveTreeVO> lazyTree(@Param("roleTypeNum") String wbsId,
+                                 @Param("tenantId") String tenantId,
+                                 @Param("parentId") Long parentId);
+
+    List<ArchiveTreeVO> tree(@Param("roleTypeNum") String roleTypeNum,
+                             @Param("tenantId") String tenantId);
+
+
+}

+ 79 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.manager.mapper.ArchiveTreeMapper">
+
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="contractInfoResultMap" type="org.springblade.manager.entity.ArchiveTree">
+        <result column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="status" property="status"/>
+        <result column="create_time" property="createTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="tenant_id" property="tenantId"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="ancestors" property="ancestors"/>
+        <result column="node_name" property="nodeName"/>
+        <result column="full_name" property="fullName"/>
+        <result column="role_type" property="roleType"/>
+        <result column="node_type" property="nodeType"/>
+        <result column="is_storage_node" property="isStorageNode"/>
+        <result column="is_built_drawing" property="isBuiltDrawing"/>
+        <result column="is_interface_node" property="isInterfaceNode"/>
+        <result column="interface_type" property="interfaceType"/>
+        <result column="sort" property="sort"/>
+        <result column="remark" property="remark"/>
+    </resultMap>
+
+    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
+        <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"/>
+    </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",
+        (
+        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>
+        <if test="roleTypeNum!=null and roleTypeNum!=''">
+            AND d.role_type = #{roleTypeNum}
+        </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" from m_archive_tree where is_deleted = 0
+        <if test="tenantId!=null and tenantId!=''">
+            and tenant_id = #{tenantId}
+        </if>
+        <if test="roleTypeNum!=null and roleTypeNum!=''">
+            and `role_type` = #{roleTypeNum}
+        </if>
+        ORDER BY sort
+    </select>
+
+
+</mapper>

+ 7 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ContractInfoMapper.java

@@ -54,6 +54,8 @@ public interface ContractInfoMapper extends BaseMapper<ContractInfo> {
 
     List<User> findAllUserByCondition(@Param("Values") FindAllUserByConditionDTO values);
 
+    List<User> findUserListByCondition(@Param("Values") FindAllUserByConditionDTO values);
+
     List<User> findUserInfoByCondition(@Param("rId") String rId,
                                        @Param("pId") String pId,
                                        @Param("userName") String userName);
@@ -61,4 +63,9 @@ public interface ContractInfoMapper extends BaseMapper<ContractInfo> {
     List<User> findUserByName(@Param("name") String name);
 
     Integer updatePasswordByUserId(@Param("userId") String userId, @Param("password") String password);
+
+    Boolean deleteFile(@Param("url") String url);
+
+//    String selectStartFileId(@Param("id") String id);
+
 }

+ 41 - 11
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ContractInfoMapper.xml

@@ -39,12 +39,14 @@
         <result column="contract_name" property="contractName"/>
         <result column="contract_counts" property="contractCounts"/>
     </resultMap>
-    <update id="updatePasswordByUserId">
 
-        update blade_user set password = #{password} where id = #{userId}
 
+    <update id="updatePasswordByUserId">
+        update blade_user set password = #{password} where id = #{userId}
+    </update>
+    <update id="deleteFile">
+        update blade_attach set is_deleted = 1 where link = #{url} and `status`= 1
     </update>
-
 
     <select id="selectContractInfoPage" resultMap="contractInfoResultMap">
         select c.* ,p.project_name as project_name from m_contract_info c INNER JOIN m_project_info p on c.p_id=p.id where c.is_deleted = 0
@@ -64,27 +66,54 @@
         and r.id = #{id}
     </select>
 
-    <select id="findAllUserByCondition" resultType="org.springblade.system.user.entity.User">
+    <select id="findAllUserByCondition" resultType="org.springblade.system.user.vo.UserVO">
         SELECT
-        mpau.id,pi.project_name,ci.contract_name,u.id as uid,u.`name`,u.account,u.`password`,u.`phone`
+            u.id as uId,mpau.id,pi.project_name,ci.contract_name,u.id as uid,u.`name`,u.account,u.`password`,u.`phone`
         FROM
-        blade_user u
+            blade_user u
         INNER JOIN m_project_assignment_user mpau ON u.id = mpau.user_id
         INNER JOIN blade_post p ON p.id = mpau.post_id
         INNER JOIN blade_role r ON r.id = mpau.role_id
         INNER JOIN m_contract_info ci ON ci.id = mpau.contract_id
         INNER JOIN m_project_info pi ON pi.id = mpau.project_id
-        WHERE mpau.is_deleted = '0' AND mpau.`status` = '1'
+        WHERE mpau.is_deleted = 0 AND mpau.`status` = 1
         AND pi.id = #{Values.pId}
         <if test="Values.cId != null and Values.cId != '' ">
             AND ci.id = #{Values.cId}
         </if>
-        AND r.id = #{Values.rId}
-        AND p.id = #{Values.postId}
+        <if test="Values.rId != null and Values.rId !='' ">
+            AND r.id = #{Values.rId}
+        </if>
+        <if test="Values.postId !=null and Values.postId !='' ">
+            AND p.id = #{Values.postId}
+        </if>
+    </select>
+
+    <select id="findUserListByCondition" resultType="org.springblade.system.user.vo.UserVO">
+        SELECT
+            mpau.id,
+            u.`name`,
+            u.account,
+            (select post_name from blade_post where id = u.post_id) as postName,
+            u.`password`,
+            u.`phone`
+        FROM
+            blade_user u
+        INNER JOIN m_project_assignment_user mpau ON u.id = mpau.user_id
+        INNER JOIN blade_role r ON r.id = mpau.role_id
+        INNER JOIN m_project_info pi ON pi.id = mpau.project_id
+        WHERE
+            mpau.is_deleted = 0
+        AND mpau.`status` = 1
+        AND mpau.project_id = #{Values.pId}
+        AND mpau.role_id = #{Values.rId}
+        <if test="Values.cId != null and Values.cId != '' ">
+            AND mpau.contract_id = #{Values.cId}
+        </if>
     </select>
 
-    <select id="findUserInfoByCondition" resultType="org.springblade.system.user.entity.User">
 
+    <select id="findUserInfoByCondition" resultType="org.springblade.system.user.entity.User">
         SELECT `name`,`account`,`password` FROM blade_user
         WHERE is_deleted = 0 AND `status` = 1
         AND role_id = #{rId}
@@ -95,9 +124,10 @@
     </select>
 
     <select id="findUserByName" resultType="org.springblade.system.user.entity.User">
-        select `name`,account,`password` from blade_user WHERE `name` like concat('%',#{name},'%')
+        select `id`,`name`,account,`password` from blade_user WHERE `name` like concat('%',#{name},'%')
         and is_deleted = 0 and `status`	= 1
     </select>
 
 
+
 </mapper>

+ 44 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ImageClassificationConfigMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.entity.ImageClassificationConfig;
+import org.springblade.manager.vo.ImageClassificationConfigVO;
+
+import java.util.List;
+
+/**
+ * 影像分类配置表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+public interface ImageClassificationConfigMapper extends BaseMapper<ImageClassificationConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param imageClassificationConfig
+	 * @return
+	 */
+	List<ImageClassificationConfigVO> selectImageClassificationConfigPage(IPage page, ImageClassificationConfigVO imageClassificationConfig);
+
+}

+ 27 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ImageClassificationConfigMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.manager.mapper.ImageClassificationConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="imageClassificationConfigResultMap" type="org.springblade.manager.entity.ImageClassificationConfig">
+        <result column="id" property="id"/>
+        <result column="create_time" property="createTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="classf_name" property="classfName"/>
+        <result column="project_stage" property="projectStage"/>
+        <result column="affiliated_party" property="affiliatedParty"/>
+        <result column="file_type" property="fileType"/>
+        <result column="storage_directory_format" property="storageDirectoryFormat"/>
+    </resultMap>
+
+
+    <select id="selectImageClassificationConfigPage" resultMap="imageClassificationConfigResultMap">
+        select * from m_image_classification_config where is_deleted = 0
+    </select>
+
+</mapper>

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsFormElementMapper.java

@@ -19,6 +19,7 @@ package org.springblade.manager.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
 import org.springblade.manager.dto.WbsFormElementDTO;
 import org.springblade.manager.entity.WbsFormElement;
 import org.springblade.manager.vo.WbsFormElementVO;
@@ -43,4 +44,5 @@ public interface WbsFormElementMapper extends BaseMapper<WbsFormElement> {
 	List<WbsFormElementVO> selectWbsFormElementPage(IPage page, WbsFormElementVO wbsFormElement);
 
 
+    Integer createTable(@Param("sqlStr") String sqlStr,@Param("newTableName")String newTableName);
 }

+ 8 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsFormElementMapper.xml

@@ -20,6 +20,14 @@
         <result column="e_inspection_method" property="eInspectionMethod"/>
     </resultMap>
 
+    <update id="createTable">
+        create table ${newTableName} (
+        `id` bigint(20) NOT NULL,
+         ${sqlStr}
+         PRIMARY KEY (`id`) USING BTREE
+        ) ENGINE=InnoDB DEFAULT CHARSET=utf8
+    </update>
+
 
     <select id="selectWbsFormElementPage" resultMap="wbsFormElementResultMap">
         select * from m_wbs_form_element where is_deleted = 0

+ 69 - 62
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.java

@@ -28,72 +28,79 @@ import org.springframework.web.bind.annotation.PostMapping;
 import java.util.List;
 
 /**
- *  Mapper 接口
+ * Mapper 接口
  *
  * @author liuyc
  * @since 2022-04-25
  */
 public interface WbsTreeMapper extends BaseMapper<WbsTree> {
 
-	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param wbsTree
-	 * @return
-	 */
-	List<WbsTreeVO> selectWbsTreePage(IPage page, WbsTreeVO wbsTree);
-
-
-	/**
-	 * 懒加载获取树形节点
-	 *
-	 * @param tenantId
-	 * @param parentId
-	 * @return
-	 */
-	List<WbsTreeVO> lazyTree(@Param("wbsId") String wbsId,
-							 @Param("tenantId") String tenantId,
-							 @Param("parentId") Long parentId);
-
-	/**
-	 * 获取树形节点
-	 *
-	 * @param tenantId
-	 * @return
-	 */
-	List<WbsTreeVO> tree(@Param("wbsId") String wbsId,@Param("tenantId") String tenantId,@Param("type") String type);
-
-
-	/**
-	 *表单查询(根据节点ID查询当前表单)
-	 */
-	List<WbsNodeTableVO> selectByNodeTable(@Param("id") String id);
-
-	/**
-	 * 根据Ids查询元素
-	 */
-	List<String> selectByElementsTotal(@Param("ids") List<String> ids);
-
-	/**
-	 * 表单删除
-	 */
-	Integer removeTableById(@Param("id") String id);
-
-	/**
-	 * 表单元素
-	 */
-	List<WbsFormElement> selectFormElements(@Param("id") String id);
-
-
-	/**
-	 * 新增表单
-	 */
-	Integer insertForm(WbsTree wbsTree);
-
-	/**
-	 * 新增元素
-	 */
-	Integer addFormElement(WbsFormElement wbsFormElement);
-
+    /**
+     * 自定义分页
+     *
+     * @param page
+     * @param wbsTree
+     * @return
+     */
+    List<WbsTreeVO> selectWbsTreePage(IPage page, WbsTreeVO wbsTree);
+
+
+    /**
+     * 懒加载获取树形节点
+     *
+     * @param tenantId
+     * @param parentId
+     * @return
+     */
+    List<WbsTreeVO> lazyTree(@Param("wbsId") String wbsId,
+                             @Param("tenantId") String tenantId,
+                             @Param("parentId") Long parentId);
+
+    /**
+     * 获取树形节点
+     *
+     * @param tenantId
+     * @return
+     */
+    List<WbsTreeVO> tree(@Param("wbsId") String wbsId, @Param("tenantId") String tenantId, @Param("type") String type);
+
+
+    /**
+     * 表单查询(根据节点ID查询当前表单)
+     */
+    List<WbsNodeTableVO> selectByNodeTable(@Param("id") String id);
+
+    /**
+     * 根据Ids查询元素
+     */
+    List<String> selectByElementsTotal(@Param("ids") List<String> ids);
+
+    /**
+     * 表单删除
+     */
+    Integer removeTableById(@Param("id") String id);
+
+    /**
+     * 表单元素
+     */
+    List<WbsFormElement> selectFormElements(@Param("id") String id);
+
+
+    /**
+     * 新增表单
+     */
+    Integer insertForm(WbsTree wbsTree);
+
+    /**
+     * 新增元素
+     */
+    Integer addFormElement(WbsFormElement wbsFormElement);
+
+    Integer updateById2(@Param("ancestors") String ancestors, @Param("id") Long id);
+
+    Integer updateById3(@Param("id") Long id, @Param("parentId") Long parentId);
+
+    void createWbsTreeTable(@Param("tableName") String tableName);
+
+    Integer insertToNewWbsTreeTable(@Param("tableName") String tableName, @Param("wbsTree") WbsTree wbsTree);
 }

+ 46 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeMapper.xml

@@ -68,18 +68,62 @@
         insert into m_wbs_tree
     </insert>
 
+    <insert id="insertToNewWbsTreeTable">
+        INSERT INTO #{tableName}(
+        id,wbs_id,tenant_id,parent_id,ancestors,dept_category,dept_name,full_name,sort,remark,`type`,
+        table_type,create_time,create_user,create_dept,update_user,update_time,`STATUS`,is_deleted,
+        unique_code,partition_code,is_expernode,is_concrete,table_owner,major_data_type,init_table_name)
+        VALUES(
+        #{wbsTree.id},
+        #{wbsTree.wbsId},
+        #{wbsTree.tenantId},
+        #{wbsTree.parentId},
+        #{wbsTree.ancestors},
+        #{wbsTree.deptCategory},
+        #{wbsTree.deptName},
+        #{wbsTree.fullName},
+        #{wbsTree.sort},
+        #{wbsTree.remark},
+        #{wbsTree.type},
+        #{wbsTree.tableType},
+        #{wbsTree.createTime},
+        #{wbsTree.createUser},
+        #{wbsTree.createDept},
+        #{wbsTree.updateUser},
+        #{wbsTree.updateTime},
+        #{wbsTree.status},
+        #{wbsTree.isDeleted},
+        #{wbsTree.uniqueCode},
+        #{wbsTree.partitionCode},
+        #{wbsTree.isExpernode},
+        #{wbsTree.isConcrete},
+        #{wbsTree.tableOwner},
+        #{wbsTree.majorDataType},
+        #{wbsTree.initTableName})
+    </insert>
+
 
     <update id="removeTableById">
         UPDATE m_wbs_tree AS wt SET is_deleted = 1 WHERE wt.type = 2 AND wt.id = #{id}
     </update>
+    <update id="updateById2">
+        UPDATE m_wbs_tree AS wt SET wt.ancestors = #{ancestors} WHERE is_deleted = 0 AND wt.id = #{id}
+    </update>
+    <update id="updateById3">
+        UPDATE m_wbs_tree AS wt SET wt.parent_id = #{parentId} WHERE is_deleted = 0 AND wt.id = #{id}
+    </update>
 
+    <update id="createWbsTreeTable">
+        create table ${tableName} as select * from m_wbs_tree WHERE 1=2
+    </update>
 
     <select id="selectWbsTreePage" resultMap="wbsTreeResultMap">
         select * from m_wbs_tree where is_deleted = 0
     </select>
 
     <select id="tree" resultMap="treeNodeResultMap">
-        select id, parent_id, dept_name as title,type as "type", id as "value", id as "key" from m_wbs_tree where is_deleted = 0
+        select id, parent_id, dept_name as title,type as "type", id as "value", id as "key" from m_wbs_tree where
+        is_deleted = 0
         <if test="wbsId!=null and wbsId!=''">
             and wbs_id = #{wbsId}
         </if>
@@ -118,6 +162,7 @@
             and dept.tenant_id = #{tenantId}
         </if>
         AND dept.wbs_id = #{wbsId}
+        AND dept.type = 1
         ORDER BY dept.sort
     </select>
 

+ 26 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeService.java

@@ -0,0 +1,26 @@
+package org.springblade.manager.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.manager.dto.ArchiveTreeDTO;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.vo.ArchiveTreeVO;
+import org.springblade.manager.vo.WbsTreeVO;
+
+import java.util.List;
+
+
+/**
+ * ArchiveTree服务类
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+public interface IArchiveTreeService extends BaseService<ArchiveTree> {
+
+    List<ArchiveTreeVO> lazyTree(String roleTypeNum, String tenantId, Long parentId);
+
+    List<ArchiveTreeVO> tree(String roleTypeNum, String tenantI);
+
+    boolean submit(ArchiveTreeDTO archiveTreeDTO);
+
+}

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IContractInfoService.java

@@ -43,9 +43,15 @@ public interface IContractInfoService extends BaseService<ContractInfo> {
 
 	List<User> findAllUserByCondition(FindAllUserByConditionDTO values);
 
+	List<User> findUserListByCondition(FindAllUserByConditionDTO values);
+
 	List<User> findUserInfoByCondition(String rId ,String pId,String userName);
 
 	List<User> findUserByName(String name);
 
     Boolean updatePasswordByUserId(String userId,String password);
+
+    String selectStartFileId(String startFileUrl);
+
+    Boolean deleteFile(String url);
 }

+ 44 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IImageClassificationConfigService.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service;
+
+import org.springblade.manager.entity.ImageClassificationConfig;
+import org.springblade.manager.vo.ImageClassificationConfigVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 影像分类配置表 服务类
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+public interface IImageClassificationConfigService extends BaseService<ImageClassificationConfig> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param imageClassificationConfig
+	 * @return
+	 */
+	IPage<ImageClassificationConfigVO> selectImageClassificationConfigPage(IPage<ImageClassificationConfigVO> page, ImageClassificationConfigVO imageClassificationConfig);
+
+    List<ImageClassificationConfig> selectByType(String type);
+}

+ 3 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsFormElementService.java

@@ -33,20 +33,13 @@ import java.util.List;
  */
 public interface IWbsFormElementService extends BaseService<WbsFormElement> {
 
-	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param wbsFormElement
-	 * @return
-	 */
 	IPage<WbsFormElementVO> selectWbsFormElementPage(IPage<WbsFormElementVO> page, WbsFormElementVO wbsFormElement);
 
-	/**
-	 * 元素新增
-	 */
 	boolean addFormElement (WbsFormElement wbsFormElement);
 
 	Boolean selectElementsById(List<WbsFormElement> wbsFormElementList);
 
+    Boolean initTable(List<WbsFormElement> elementList,String tableName);
+
+	List<WbsFormElement> selectElementListByFid(String tableId);
 }

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

@@ -19,8 +19,10 @@ package org.springblade.manager.service;
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.manager.dto.FormElementDTO;
+import org.springblade.manager.dto.ProjectAssignmentWbstreeDTO;
 import org.springblade.manager.entity.WbsFormElement;
 import org.springblade.manager.entity.WbsTree;
+import org.springblade.manager.excel.WbsTreeExcel;
 import org.springblade.manager.vo.WbsNodeTableVO;
 import org.springblade.manager.vo.WbsTreeVO;
 
@@ -90,4 +92,12 @@ public interface IWbsTreeService extends BaseService<WbsTree> {
     Boolean saveFormElement(WbsTree wbsTree);
 
 	String selectTableIdByTableName(String deptName);
+
+    void importRegion(List<WbsTreeExcel> data, Boolean isCovered);
+
+	WbsTree importTree(WbsTree wbsTreeZi);
+
+	boolean updateDate(String ancestors, Long id);
+
+	Boolean saveWbsTreeInProject(ProjectAssignmentWbstreeDTO pawDTO);
 }

+ 69 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeServiceImpl.java

@@ -0,0 +1,69 @@
+package org.springblade.manager.service.impl;
+
+
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.StringPool;
+import org.springblade.manager.dto.ArchiveTreeDTO;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.entity.WbsTree;
+import org.springblade.manager.mapper.ArchiveTreeMapper;
+import org.springblade.manager.service.IArchiveTreeService;
+import org.springblade.manager.vo.ArchiveTreeVO;
+import org.springblade.manager.vo.WbsTreeVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 服务实现类
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+@Service
+public class ArchiveTreeServiceImpl
+        extends BaseServiceImpl<ArchiveTreeMapper, ArchiveTree>
+        implements IArchiveTreeService {
+
+
+    @Override
+    public List<ArchiveTreeVO> lazyTree(String roleTypeNum, String tenantId, Long parentId) {
+        if (AuthUtil.isAdministrator()) {
+            tenantId = StringPool.EMPTY;
+        }
+        return ForestNodeMerger.merge(baseMapper.lazyTree(roleTypeNum, tenantId, parentId));
+    }
+
+    @Override
+    public List<ArchiveTreeVO> tree(String roleTypeNum, String tenantId) {
+        return ForestNodeMerger.merge(baseMapper.tree(roleTypeNum, tenantId));
+    }
+
+    @Override
+    public boolean submit(ArchiveTreeDTO archiveTreeDTO) {
+        //todo 条件判断有误,当parentid=0时,Ancestors会为null
+        if (Func.isEmpty(archiveTreeDTO.getParentId())) {
+            archiveTreeDTO.setTenantId(AuthUtil.getTenantId());
+            archiveTreeDTO.setParentId(BladeConstant.TOP_PARENT_ID);
+            archiveTreeDTO.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
+        }
+        if (archiveTreeDTO.getParentId() > 0) {
+            ArchiveTree parent = getById(archiveTreeDTO.getParentId());
+            if (Func.toLong(archiveTreeDTO.getParentId()) == Func.toLong(archiveTreeDTO.getId())) {
+                throw new ServiceException("父节点不可选择自身!");
+            }
+            archiveTreeDTO.setTenantId(parent.getTenantId());
+            String ancestors = parent.getAncestors() + StringPool.COMMA + archiveTreeDTO.getParentId();
+            archiveTreeDTO.setAncestors(ancestors);
+        }
+        archiveTreeDTO.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+        return saveOrUpdate(archiveTreeDTO);
+    }
+
+
+}

+ 19 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ContractInfoServiceImpl.java

@@ -38,7 +38,9 @@ import java.util.List;
  * @since 2022-04-14
  */
 @Service
-public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper, ContractInfo> implements IContractInfoService {
+public class ContractInfoServiceImpl
+        extends BaseServiceImpl<ContractInfoMapper, ContractInfo>
+        implements IContractInfoService {
 
     @Resource
     private ContractInfoMapper contractInfoMapper;
@@ -64,6 +66,11 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
         return contractInfoMapper.findAllUserByCondition(values);
     }
 
+    @Override
+    public List<User> findUserListByCondition(FindAllUserByConditionDTO values) {
+        return contractInfoMapper.findUserListByCondition(values);
+    }
+
     @Override
     public List<User> findUserInfoByCondition(String rId, String pId, String userName) {
         if (userName == null || ("").equals(userName)) {
@@ -87,4 +94,15 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
         }
         return false;
     }
+
+    @Override
+    public String selectStartFileId(String startFileUrl) {
+//        return contractInfoMapper.selectStartFileId(startFileUrl);
+        return null;
+    }
+
+    @Override
+    public Boolean deleteFile(String url) {
+        return contractInfoMapper.deleteFile(url);
+    }
 }

+ 54 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ImageClassificationConfigServiceImpl.java

@@ -0,0 +1,54 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springblade.manager.entity.ImageClassificationConfig;
+import org.springblade.manager.vo.ImageClassificationConfigVO;
+import org.springblade.manager.mapper.ImageClassificationConfigMapper;
+import org.springblade.manager.service.IImageClassificationConfigService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ * 影像分类配置表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+@Service
+public class ImageClassificationConfigServiceImpl extends BaseServiceImpl<ImageClassificationConfigMapper, ImageClassificationConfig> implements IImageClassificationConfigService {
+
+	@Override
+	public IPage<ImageClassificationConfigVO> selectImageClassificationConfigPage(IPage<ImageClassificationConfigVO> page, ImageClassificationConfigVO imageClassificationConfig) {
+		return page.setRecords(baseMapper.selectImageClassificationConfigPage(page, imageClassificationConfig));
+	}
+
+	@Override
+	public List<ImageClassificationConfig> selectByType(String type) {
+
+		QueryWrapper<ImageClassificationConfig> queryWrapper = new QueryWrapper<>();
+		queryWrapper.eq("affiliated_party",type);
+
+		List<ImageClassificationConfig> list = baseMapper.selectList(queryWrapper);
+		return list;
+	}
+
+}

+ 90 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsFormElementServiceImpl.java

@@ -16,16 +16,22 @@
  */
 package org.springblade.manager.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.manager.dto.WbsFormElementDTO;
+import org.springblade.manager.entity.WbsFormInitEntity;
 import org.springblade.manager.mapper.WbsFormElementMapper;
 import org.springblade.manager.service.IWbsFormElementService;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.manager.entity.WbsFormElement;
 import org.springblade.manager.vo.WbsFormElementVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -37,6 +43,10 @@ import java.util.List;
 @Service
 public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMapper, WbsFormElement> implements IWbsFormElementService {
 
+    @Resource
+    private WbsFormElementMapper wbsFormElementMapper;
+
+
     @Override
     public IPage<WbsFormElementVO> selectWbsFormElementPage(IPage<WbsFormElementVO> page, WbsFormElementVO wbsFormElement) {
         return page.setRecords(baseMapper.selectWbsFormElementPage(page, wbsFormElement));
@@ -53,7 +63,6 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
 
     @Override
     public Boolean selectElementsById(List<WbsFormElement> wbsFormElementList) {
-
         List<Long> ids = new ArrayList<>();
         for (WbsFormElement wbsFormElement : wbsFormElementList) {
             Long id = wbsFormElement.getId();
@@ -64,9 +73,88 @@ public class WbsFormElementServiceImpl extends BaseServiceImpl<WbsFormElementMap
         if ((wbsFormElements).equals(wbsFormElementList)) {
             return false;
         }
-
         return true;
     }
 
+    @Override
+    public Boolean initTable(List<WbsFormElement> elementList, String tableName) {
+       /* List<WbsFormInitEntity> listDTO = new ArrayList<>();
+        for (WbsFormElement wbsFormElement : elementList) {
+            WbsFormInitEntity w = new WbsFormInitEntity();
+            String eName = wbsFormElement.getEName();
+            Integer eType = wbsFormElement.getEType();
+            Integer eLength = wbsFormElement.getELength();
+            w.setFieldName(eName);
+            w.setFieldLength(String.valueOf(eType));
+            w.setFieldLength(String.valueOf(eLength));
+            listDTO.add(w);
+        }*/
+        //定义建表SQL
+        String sql = createSQL(elementList);
+        //建表
+        Integer row = wbsFormElementMapper.createTable(sql, tableName);
+//        System.out.println("row:///////////////////////////" + row);
+        if (row >= 0) {
+            return true;
+        }
+        return false;
+    }
+
+    private String createSQL(List<WbsFormElement> elementList) {
+        // 创建 StringBuffer 拼接sql
+        StringBuffer sbr = new StringBuffer();
+        /*sbr.append("CREATE TABLE `m_wbs_form_" + tableName + DateUtil.time() + "` (\n");
+        //判断类型
+        sbr.append("`id` bigint(20) NOT NULL, \n");
+        */
+        for (WbsFormElement wbsFormElement : elementList) {
+            //获取字段名、类型、长度
+            String fieldName = wbsFormElement.getEName();
+            String fieldType = judgeDataType(wbsFormElement.getEType());
+            String fieldLength = String.valueOf(wbsFormElement.getELength());
+            sbr.append("" + fieldName + "");
+            if ("varchar".equals(fieldType)) {
+                sbr.append(" " + fieldType + "(" + fieldLength + ") ,\n");
+            } else if ("bigint".equals(fieldType)) {
+                sbr.append(" " + fieldType + "(" + fieldLength + ") ,\n");
+            } else if ("decimal".equals(fieldType)) {
+                sbr.append(" " + fieldType + "(" + fieldLength + ") ,\n");
+            } else if ("datetime".equals(fieldType)) {
+                sbr.append(" " + fieldType + "(" + fieldLength + ") ,\n");
+            }
+        }
+        /*sbr.append(" PRIMARY KEY (`id`) USING BTREE )\n");
+        sbr.append(" ENGINE=InnoDB DEFAULT CHARSET=utf8 \n");*/
+        /*System.out.println("SQL:******* " + sbr);*/
+        return String.valueOf(sbr);
+    }
+
+    /**
+     * 判断类型
+     */
+    private String judgeDataType(Integer type) {
+        switch (type) {
+            case 1:
+                return "varchar";
+            case 2:
+                return "bigint";
+            case 3:
+                return "decimal";
+            case 4:
+                return "datetime";
+            default:
+                return "varchar";
+        }
+    }
+
+
+    @Override
+    public List<WbsFormElement> selectElementListByFid(String tableId) {
+        QueryWrapper<WbsFormElement> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("f_id", tableId);
+        List<WbsFormElement> wbsFormElements = baseMapper.selectList(queryWrapper);
+        return wbsFormElements;
+    }
+
 
 }

+ 96 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeServiceImpl.java

@@ -17,13 +17,20 @@
 package org.springblade.manager.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.apache.commons.lang.StringUtils;
+import org.checkerframework.checker.units.qual.A;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.StringPool;
 import org.springblade.manager.dto.FormElementDTO;
+import org.springblade.manager.dto.ProjectAssignmentWbstreeDTO;
+import org.springblade.manager.excel.WbsTreeExcel;
 import org.springblade.manager.mapper.WbsTreeMapper;
 import org.springblade.manager.service.IWbsTreeService;
 import org.springblade.core.mp.base.BaseServiceImpl;
@@ -33,6 +40,7 @@ import org.springblade.manager.vo.WbsNodeTableVO;
 import org.springblade.manager.vo.WbsTreeVO;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.*;
@@ -63,8 +71,8 @@ public class WbsTreeServiceImpl extends BaseServiceImpl<WbsTreeMapper, WbsTree>
     }
 
     @Override
-    public List<WbsTreeVO> tree(String wbsId,String tenantId,String type) {
-        return ForestNodeMerger.merge(baseMapper.tree(wbsId,tenantId,type));
+    public List<WbsTreeVO> tree(String wbsId, String tenantId, String type) {
+        return ForestNodeMerger.merge(baseMapper.tree(wbsId, tenantId, type));
     }
 
     @Override
@@ -163,5 +171,91 @@ public class WbsTreeServiceImpl extends BaseServiceImpl<WbsTreeMapper, WbsTree>
         return String.valueOf(wbsTree.getId());
     }
 
+    @Override
+    public void importRegion(List<WbsTreeExcel> data, Boolean isCovered) {
+        List<WbsTree> list = new ArrayList<>();
+        data.forEach(wbsTreeExcel -> {
+            WbsTree wbsTree = BeanUtil.copy(wbsTreeExcel, WbsTree.class);
+            list.add(wbsTree);
+        });
+        if (isCovered) {
+            this.saveOrUpdateBatch(list);
+        } else {
+            this.saveBatch(list);
+        }
+
+    }
 
+    @Override
+    public WbsTree importTree(WbsTree wbsTreeZi) {
+        //查重
+        QueryWrapper<WbsTree> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("wbs_id", wbsTreeZi.getWbsId());
+        queryWrapper.eq("dept_name", wbsTreeZi.getDeptName());
+        queryWrapper.eq("dept_category", wbsTreeZi.getDeptCategory());
+        WbsTree wbsTree = baseMapper.selectOne(queryWrapper);
+        if (wbsTree == null) {
+            //初始化默认值
+            wbsTreeZi.setStatus(1);
+            wbsTreeZi.setType(1);
+            wbsTreeZi.setMajorDataType(1);
+            if (wbsTreeZi.getDeptCategory() == 6) {
+                wbsTreeZi.setIsConcrete(0);
+                wbsTreeZi.setIsExpernode(0);
+            }
+            int row = baseMapper.insert(wbsTreeZi);
+            if (row > 0) {
+                return null;
+            }
+        }
+        return wbsTree;
+    }
+
+
+    @Override
+    public boolean updateDate(String ancestors, Long id) {
+        Integer row = baseMapper.updateById2(ancestors, id);
+        if (row > 0) {
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean saveWbsTreeInProject(ProjectAssignmentWbstreeDTO pawDTO) {
+        String wbsTreeIds = pawDTO.getWbsTreeIds();
+        if (StringUtils.isEmpty(wbsTreeIds)) {
+            return false;
+        }
+        String tableName = "m_wbs_tree_" + pawDTO.getProjectId() + "_" + DateUtil.time();
+        //初始化创建wbs项目级私有节点表
+        wbsTreeMapper.createWbsTreeTable(tableName);
+        //获取节点ids,查询出所有节点树
+        List<WbsTree> list = findAllNodeList(wbsTreeIds);
+
+        if (list != null) {
+            list.forEach(System.out::print);
+            //新增节点
+            for (WbsTree wbsTree : list) {
+                Integer row = baseMapper.insertToNewWbsTreeTable(tableName, wbsTree);
+                if (row > 0) {
+                    System.out.println("新增节点成功,节点id: ----- " + wbsTree.getId());
+                }
+            }
+
+        }
+        //初始化创建合同段私有wbs树
+
+        return true;
+    }
+
+    private List<WbsTree> findAllNodeList(String wbsTreeIds) {
+        String[] ids = wbsTreeIds.split(",");
+        List<Long> idList = new ArrayList<>();
+        for (String id : ids) {
+            idList.add(Long.valueOf(id));
+        }
+        return baseMapper.selectBatchIds(idList);
+    }
 }

+ 31 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ArchiveTreeWrapper.java

@@ -0,0 +1,31 @@
+package org.springblade.manager.wrapper;
+
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.manager.entity.ArchiveTree;
+import org.springblade.manager.vo.ArchiveTreeVO;
+
+
+
+import java.util.Objects;
+
+/**
+ * Warpper
+ *
+ * @author liuyc
+ * @since 2022-05-16
+ */
+public class ArchiveTreeWrapper extends BaseEntityWrapper<ArchiveTree, ArchiveTreeVO> {
+
+    public static ArchiveTreeWrapper build() {
+        return new ArchiveTreeWrapper();
+    }
+
+    @Override
+    public ArchiveTreeVO entityVO(ArchiveTree archiveTree) {
+        ArchiveTreeVO archiveTreeVO = Objects.requireNonNull(BeanUtil.copy(archiveTree, ArchiveTreeVO.class));
+
+        return archiveTreeVO;
+    }
+}

+ 49 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ImageClassificationConfigWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.manager.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.manager.entity.ImageClassificationConfig;
+import org.springblade.manager.vo.ImageClassificationConfigVO;
+import java.util.Objects;
+
+/**
+ * 影像分类配置表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2022-05-16
+ */
+public class ImageClassificationConfigWrapper extends BaseEntityWrapper<ImageClassificationConfig, ImageClassificationConfigVO>  {
+
+	public static ImageClassificationConfigWrapper build() {
+		return new ImageClassificationConfigWrapper();
+ 	}
+
+	@Override
+	public ImageClassificationConfigVO entityVO(ImageClassificationConfig imageClassificationConfig) {
+		ImageClassificationConfigVO imageClassificationConfigVO = Objects.requireNonNull(BeanUtil.copy(imageClassificationConfig, ImageClassificationConfigVO.class));
+
+		//User createUser = UserCache.getUser(imageClassificationConfig.getCreateUser());
+		//User updateUser = UserCache.getUser(imageClassificationConfig.getUpdateUser());
+		//imageClassificationConfigVO.setCreateUserName(createUser.getName());
+		//imageClassificationConfigVO.setUpdateUserName(updateUser.getName());
+
+		return imageClassificationConfigVO;
+	}
+
+}

+ 3 - 2
blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java

@@ -34,6 +34,7 @@ import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.system.cache.SysCache;
+import org.springblade.system.dto.RoleDTO;
 import org.springblade.system.entity.Role;
 import org.springblade.system.service.IRoleService;
 import org.springblade.system.user.cache.UserCache;
@@ -123,10 +124,10 @@ public class RoleController extends BladeController {
     @PostMapping("/submit")
     @ApiOperationSupport(order = 5)
     @ApiOperation(value = "新增或修改", notes = "传入role,角色pid")
-    public R submit(@Valid @RequestBody Role role, @RequestParam("pId") String pId) {
+    public R submit(@Valid @RequestBody RoleDTO role) {
         CacheUtil.clear(SYS_CACHE);
         CacheUtil.clear(SYS_CACHE, Boolean.FALSE);
-        return R.status(roleService.submit(role, pId));
+        return R.status(roleService.submit(role));
     }
 
     /**

+ 2 - 1
blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java

@@ -18,6 +18,7 @@ package org.springblade.system.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.system.dto.RoleDTO;
 import org.springblade.system.entity.Role;
 import org.springblade.system.vo.RoleVO;
 
@@ -90,7 +91,7 @@ public interface IRoleService extends IService<Role> {
 	 * @param role
 	 * @return
 	 */
-	boolean submit(Role role,String pId);
+	boolean submit(RoleDTO role);
 
 	/**
 	 * 角色信息查询

+ 5 - 4
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java

@@ -31,6 +31,7 @@ import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.node.ForestNodeMerger;
 import org.springblade.core.tool.utils.CollectionUtil;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.system.dto.RoleDTO;
 import org.springblade.system.entity.Role;
 import org.springblade.system.entity.RoleMenu;
 import org.springblade.system.entity.RoleScope;
@@ -185,7 +186,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean submit(Role role, String pId) {
+    public boolean submit(RoleDTO role) {
         if (!AuthUtil.isAdministrator()) {
             if (Func.toStr(role.getRoleAlias()).equals(RoleConstant.ADMINISTRATOR)) {
                 throw new ServiceException("无权限创建超管角色!");
@@ -223,10 +224,10 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
                     .eq("role_name", role.getRoleName());
             role1 = roleMapper.selectOne(wrapper);
         }
-//		System.out.println("role1: *************** + "+role1);
+        //System.out.println("role1: *************** + "+role1);
         //新增或修改角色时与岗位进行关联绑定
-        if (StringUtils.isNotEmpty(pId) && role1 != null) {
-            Integer row = roleMapper.bindRoleAndPost(role1.getId(), Long.parseLong(pId));
+        if (StringUtils.isNotEmpty(role.getPId()) && role1 != null) {
+            Integer row = roleMapper.bindRoleAndPost(role1.getId(), Long.parseLong(role.getPId()));
             if (row > 0) {
                 return true;
             }

+ 39 - 0
doc/nacos/blade-flow-dev.yaml

@@ -0,0 +1,39 @@
+spring:
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    #driver-class-name: org.postgresql.Driver
+    #driver-class-name: oracle.jdbc.OracleDriver
+    #driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+    #driver-class-name: dm.jdbc.driver.DmDriver
+    druid:
+      # MySql、PostgreSQL、SqlServer、DaMeng校验
+      validation-query: select 1
+      # Oracle校验
+      #validation-query: select 1 from dual
+
+#项目模块集中配置
+blade:
+  #工作流模块开发生产环境数据库地址
+  datasource:
+    flow:
+      dev:
+        # MySql
+        url: jdbc:mysql://localhost:3306/bladex_flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+        username: root
+        password: 123456
+        # PostgreSQL
+        #url: jdbc:postgresql://127.0.0.1:5432/bladex_flow
+        #username: postgres
+        #password: 123456
+        # Oracle
+        #url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
+        #username: BLADEX_FLOW
+        #password: BLADEX_FLOW
+        # SqlServer
+        #url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex_flow
+        #username: bladex_flow
+        #password: bladex_flow
+        # DaMeng
+        #url: jdbc:dm://127.0.0.1:5236/BLADEX_FLOW?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
+        #username: BLADEX_FLOW
+        #password: BLADEX_FLOW