Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master' into master

yangyj 2 anni fa
parent
commit
5aa00e723a
41 ha cambiato i file con 1988 aggiunte e 336 eliminazioni
  1. 2 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java
  2. 34 0
      blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/dto/ArchivesAutoDTO.java
  3. 149 0
      blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/entity/ArchivesAuto.java
  4. 34 0
      blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/vo/ArchivesAutoVO.java
  5. 78 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/ArchiveFile.java
  6. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/CopyContractTreeNodeVO.java
  7. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ArchiveTreeContractDTO.java
  8. 30 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTree.java
  9. 136 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTreeContract.java
  10. 23 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ExcelEditCallback.java
  11. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java
  12. 34 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeContractVO.java
  13. 8 0
      blade-service/blade-archive/pom.xml
  14. 129 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchivesAutoController.java
  15. 42 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.java
  16. 55 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml
  17. 41 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/IArchivesAutoService.java
  18. 41 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java
  19. 49 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/wrapper/ArchivesAutoWrapper.java
  20. 15 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java
  21. 36 9
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  22. 15 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml
  23. 22 1
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java
  24. 129 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeContractController.java
  25. 23 41
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  26. 249 68
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/FirstController.java
  27. 4 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java
  28. 24 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeContractController.java
  29. 9 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreePrivateController.java
  30. 8 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java
  31. 42 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.java
  32. 46 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml
  33. 6 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeMapper.xml
  34. 5 8
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml
  35. 41 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IArchiveTreeContractService.java
  36. 3 3
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/IExcelTabService.java
  37. 41 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractServiceImpl.java
  38. 236 183
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  39. 51 16
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java
  40. 49 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ArchiveTreeContractWrapper.java
  41. 10 0
      blade-service/blade-manager/src/main/java/sql/archivetreecontract.menu.sql

+ 2 - 1
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java

@@ -123,7 +123,8 @@ public class OssBuilder {
      */
     public Oss getOss(String tenantId, String code) {
         String key = StringUtils.isNotEmpty(tenantId) ? tenantId : OSS_TENANT_ID;
-
+        System.out.println("oss----"+tenantId);
+        System.out.println("oss_code=====--"+code);
         LambdaQueryWrapper<Oss> lqw = Wrappers.<Oss>query().lambda().eq(Oss::getTenantId, key);
         // 获取传参的资源编号并查询,若有则返回,若没有则调启用的配置
         String ossCode = StringUtil.isBlank(code) ? WebUtil.getParameter(OSS_PARAM_KEY) : code;

+ 34 - 0
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/dto/ArchivesAutoDTO.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.archive.dto;
+
+import org.springblade.archive.entity.ArchivesAuto;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchivesAutoDTO extends ArchivesAuto {
+	private static final long serialVersionUID = 1L;
+
+}

+ 149 - 0
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/entity/ArchivesAuto.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.archive.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+@Data
+@TableName("u_archives_auto")
+@EqualsAndHashCode(callSuper = true)
+public class ArchivesAuto extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 项目ID
+	*/
+		private String projectId;
+	/**
+	* 合同段ID
+	*/
+		private String contractId;
+	/**
+	* 案卷提名
+	*/
+		private String name;
+	/**
+	* 档号
+	*/
+		private String fileNumber;
+	/**
+	* 缩微号
+	*/
+		private String micron;
+	/**
+	* 单位
+	*/
+		private String unit;
+	/**
+	* 数量/单位
+	*/
+		private String quantity;
+	/**
+	* 规格
+	*/
+		private String specification;
+	/**
+	* 文件起始时间
+	*/
+		private LocalDateTime startDate;
+	/**
+	* 文件结束时间
+	*/
+		private LocalDateTime endDate;
+	/**
+	* 保管期限(单位/年)
+	*/
+		private String storageTime;
+	/**
+	* 保密级别
+	*/
+		private String secretLevel;
+	/**
+	* 载体类型
+	*/
+		private String carrierType;
+	/**
+	* 主题词
+	*/
+		private String keywords;
+	/**
+	* 审核人
+	*/
+		private String reviewer;
+	/**
+	* 审核日期
+	*/
+		private LocalDateTime reviewDate;
+	/**
+	* 存放位置
+	*/
+		private String storageLocation;
+	/**
+	* 是否归档(  0:未归档、1:已归档  )
+	*/
+		private Integer isArchive;
+	/**
+	* 备注
+	*/
+		private String remark;
+	/**
+	* 立卷日期
+	*/
+		private LocalDateTime rollDate;
+	/**
+	* 立卷人
+	*/
+		private String rollor;
+	/**
+	* 节点Id
+	*/
+		private Long nodeId;
+	private String outUrl;
+	/**
+	* 光盘id
+	*/
+		private Long cdId;
+	/**
+	* 案卷内文件数量
+	*/
+		private Integer fileN;
+	private Integer pageN;
+	/**
+	* 统一里程信息
+	*/
+		private String mileage;
+	private Integer fileType;
+	private Integer size;
+	private String procsort;
+	private String nodeSort;
+	private Integer isOpen;
+	private Integer ischeck;
+
+
+}

+ 34 - 0
blade-service-api/blade-archive-api/src/main/java/org/springblade/archive/vo/ArchivesAutoVO.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.archive.vo;
+
+import org.springblade.archive.entity.ArchivesAuto;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchivesAutoVO extends ArchivesAuto {
+	private static final long serialVersionUID = 1L;
+
+}

+ 78 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/ArchiveFile.java

@@ -22,6 +22,8 @@ import org.springblade.core.mp.base.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.time.LocalDateTime;
+
 /**
  * 实体类
  *
@@ -145,5 +147,81 @@ public class ArchiveFile extends BaseEntity {
      */
     @ApiModelProperty("电签pdf文件")
     private String eVisaFile;
+	/**
+	* 文件归属的扩展节点ID
+	*/
+	@ApiModelProperty("文件归属的扩展节点ID")
+	private Long nodeExtId;
+	/**
+	* 文件类型
+	*/
+	@ApiModelProperty("文件类型")
+	private Long fileType;
+	/**
+	* 归属案卷ID
+	*/
+	@ApiModelProperty("归属案卷ID")
+	private Long archiveId;
+	/**
+	* 原始归属案卷ID ,用于拆卷
+	*/
+	@ApiModelProperty("原始归属案卷ID ,用于拆卷")
+	private Long originId;
+	/**
+	* 拍摄时间
+	*/
+	@ApiModelProperty("拍摄时间")
+	private LocalDateTime filmingTime;
+	/**
+	* 实际拍摄时间
+	*/
+	@ApiModelProperty("实际拍摄时间")
+	private LocalDateTime filmingorTime;
+	/**
+	* 媒体分类
+	*/
+	@ApiModelProperty("媒体分类")
+	private String tagId;
+	/**
+	* 相片号
+	*/
+	@ApiModelProperty("相片号")
+	private String picCode;
+	/**
+	* 参见号
+	*/
+	@ApiModelProperty("参见号")
+	private String referCode;
+	/**
+	* 底片号
+	*/
+	@ApiModelProperty("底片号")
+	private String filmCode;
+	/**
+	* 图片宽
+	*/
+	@ApiModelProperty("图片宽")
+	private Integer width;
+	/**
+	* 图片高
+	*/
+	@ApiModelProperty("图片高")
+	private Integer height;
+	/**
+	* 同步时间,用于同步
+	*/
+	@ApiModelProperty("同步时间,用于同步")
+	private LocalDateTime ftime;
+	/**
+	* 更新时间,用于同步
+	*/
+	@ApiModelProperty("更新时间,用于同步")
+	private LocalDateTime utime;
+	/**
+	* 删除时间
+	*/
+	@ApiModelProperty("删除时间")
+	private LocalDateTime delTime;
+
 
 }

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/CopyContractTreeNodeVO.java

@@ -24,6 +24,9 @@ public class CopyContractTreeNodeVO {
     @ApiModelProperty("复制到的节点PrimaryKeyId和对应的name集合(复制多份时使用)")
     private List<CopyBatch> copyBatchToPaths = new ArrayList<>();
 
+    @ApiModelProperty("所属方 1=施工 2=监理")
+    private Integer tableOwner;
+
     public void setCopyBatchToPaths(String primaryKeyId, String nodeName){
         this.copyBatchToPaths.add(new CopyBatch(primaryKeyId, nodeName));
     }

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/ArchiveTreeContractDTO.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.ArchiveTreeContract;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTreeContractDTO extends ArchiveTreeContract {
+	private static final long serialVersionUID = 1L;
+
+}

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

@@ -114,6 +114,36 @@ public class ArchiveTree extends BaseEntity {
      */
     @ApiModelProperty(value = "是否配置到上传文件显示配置树 '0'否 '1'是")
     private Integer isUploadFileDisplayConfigurationTree;
+	/**
+	* 工程类型
+	*/
+    @ApiModelProperty(value = "工程类型")
+    private Integer projectType;
+	/**
+	* 关联类型
+	*/
+    @ApiModelProperty(value = "关联类型")
+    private Integer storageType;
+	/**
+	* 扩展类型
+	*/
+    @ApiModelProperty(value = "扩展类型")
+    private Integer extType;
+	/**
+	* 扩展关联Id
+	*/
+    @ApiModelProperty(value = "扩展关联Id")
+    private Long extId;
+	/**
+	* 自动立卷类型
+	*/
+    @ApiModelProperty(value = "自动立卷类型")
+    private Integer archiveAutoType;
+	/**
+	* 自动立卷关联Id
+	*/
+    @ApiModelProperty(value = "自动立卷关联Id")
+    private Long archiveAutoNodeId;
 
 
 }

+ 136 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ArchiveTreeContract.java

@@ -0,0 +1,136 @@
+/*
+ *      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 00
+ * @since 2023-02-18
+ */
+@Data
+@TableName("m_archive_tree_contract")
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTreeContract extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 项目ID
+	*/
+		private String projectId;
+	/**
+	* 合同段ID
+	*/
+		private String contractId;
+	/**
+	* 是否配置到上传文件显示配置树 '0'否 '1'是
+	*/
+		private Integer isUploadFileDisplayConfigurationTree;
+	/**
+	* 父主键
+	*/
+		private Long parentId;
+	/**
+	* 祖级列表
+	*/
+		private String ancestors;
+	/**
+	* 节点名
+	*/
+		private String nodeName;
+	/**
+	* 节点全称
+	*/
+		private String fullName;
+	/**
+	* 节点类型
+	*/
+		private Integer nodeType;
+	/**
+	* 岗位类型
+	*/
+		private String postType;
+	/**
+	* 关联类型
+	*/
+		private Integer associationType;
+	/**
+	* 内业资料类型
+	*/
+		private String majorDataType;
+	/**
+	* 显示层级
+	*/
+		private String displayHierarchy;
+	/**
+	* 是否为存储节点 '0'否 '1'是
+	*/
+		private Integer isStorageNode;
+	/**
+	* 是否为竣工图 '0'否 '1'是
+	*/
+		private Integer isBuiltDrawing;
+	/**
+	* 是否为接口节点 '0'否 '1'是
+	*/
+		private Integer isInterfaceNode;
+	/**
+	* 接口类型
+	*/
+		private Integer interfaceType;
+	/**
+	* 排序
+	*/
+		private Integer sort;
+	/**
+	* 备注
+	*/
+		private String remark;
+	/**
+	* 工程类型
+	*/
+		private Integer projectType;
+	/**
+	* 关联类型
+	*/
+		private Integer storageType;
+	/**
+	* 扩展类型
+	*/
+		private Integer extType;
+	/**
+	* 扩展关联Id
+	*/
+		private Long extId;
+	/**
+	* 自动立卷类型
+	*/
+		private Integer archiveAutoType;
+	/**
+	* 自动立卷关联Id
+	*/
+		private Long archiveAutoNodeId;
+
+
+}

+ 23 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/ExcelEditCallback.java

@@ -0,0 +1,23 @@
+package org.springblade.manager.entity;
+
+
+import lombok.Data;
+
+@Data
+public class ExcelEditCallback {
+    /**
+     * excel l路径
+     */
+    private String url;
+    /**
+     * 在线编辑状态
+     */
+    private Integer status;
+
+    // excel 的唯一标识
+    private Long key;
+
+    // 返回码
+    private Integer error;
+
+}

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java

@@ -139,4 +139,6 @@ public interface WbsTreeContractClient {
     @GetMapping(API_PREFIX + "/selectContractTreeAll")
     List<WbsTreeContract> selectContractTreeAll(@RequestParam String contractId);
 
+    @GetMapping(API_PREFIX + "/getContractWbsTreeByParentId")
+    List<WbsTreeContract> getContractWbsTreeByParentId(@RequestParam String parentId,@RequestParam String contractId);
 }

+ 34 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ArchiveTreeContractVO.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.ArchiveTreeContract;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 视图实体类
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ArchiveTreeContractVO extends ArchiveTreeContract {
+	private static final long serialVersionUID = 1L;
+
+}

+ 8 - 0
blade-service/blade-archive/pom.xml

@@ -14,6 +14,14 @@
     <version>${bladex.project.version}</version>
     <packaging>jar</packaging>
 
+    <repositories>
+        <repository>
+            <id>com.e-iceblue</id>
+            <name>e-iceblue</name>
+            <url>https://repo.e-iceblue.cn/repository/maven-public/</url>
+        </repository>
+    </repositories>
+
     <dependencies>
         <dependency>
             <groupId>org.springblade</groupId>

+ 129 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchivesAutoController.java

@@ -0,0 +1,129 @@
+/*
+ *      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.archive.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.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
+import org.springblade.archive.wrapper.ArchivesAutoWrapper;
+import org.springblade.archive.service.IArchivesAutoService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/archivesauto")
+@Api(value = "", tags = "接口")
+public class ArchivesAutoController extends BladeController {
+
+	private final IArchivesAutoService archivesAutoService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入archivesAuto")
+	public R<ArchivesAutoVO> detail(ArchivesAuto archivesAuto) {
+		ArchivesAuto detail = archivesAutoService.getOne(Condition.getQueryWrapper(archivesAuto));
+		return R.data(ArchivesAutoWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入archivesAuto")
+	public R<IPage<ArchivesAutoVO>> list(ArchivesAuto archivesAuto, Query query) {
+		IPage<ArchivesAuto> pages = archivesAutoService.page(Condition.getPage(query), Condition.getQueryWrapper(archivesAuto));
+		return R.data(ArchivesAutoWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入archivesAuto")
+	public R<IPage<ArchivesAutoVO>> page(ArchivesAutoVO archivesAuto, Query query) {
+		IPage<ArchivesAutoVO> pages = archivesAutoService.selectArchivesAutoPage(Condition.getPage(query), archivesAuto);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入archivesAuto")
+	public R save(@Valid @RequestBody ArchivesAuto archivesAuto) {
+		return R.status(archivesAutoService.save(archivesAuto));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入archivesAuto")
+	public R update(@Valid @RequestBody ArchivesAuto archivesAuto) {
+		return R.status(archivesAutoService.updateById(archivesAuto));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入archivesAuto")
+	public R submit(@Valid @RequestBody ArchivesAuto archivesAuto) {
+		return R.status(archivesAutoService.saveOrUpdate(archivesAuto));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(archivesAutoService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      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.archive.mapper;
+
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface ArchivesAutoMapper extends BaseMapper<ArchivesAuto> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param archivesAuto
+	 * @return
+	 */
+	List<ArchivesAutoVO> selectArchivesAutoPage(IPage page, ArchivesAutoVO archivesAuto);
+
+}

+ 55 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -0,0 +1,55 @@
+<?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.archive.mapper.ArchivesAutoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="archivesAutoResultMap" type="org.springblade.archive.entity.ArchivesAuto">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <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="project_id" property="projectId"/>
+        <result column="contract_id" property="contractId"/>
+        <result column="name" property="name"/>
+        <result column="file_number" property="fileNumber"/>
+        <result column="micron" property="micron"/>
+        <result column="unit" property="unit"/>
+        <result column="quantity" property="quantity"/>
+        <result column="specification" property="specification"/>
+        <result column="start_date" property="startDate"/>
+        <result column="end_date" property="endDate"/>
+        <result column="storage_time" property="storageTime"/>
+        <result column="secret_level" property="secretLevel"/>
+        <result column="carrier_type" property="carrierType"/>
+        <result column="keywords" property="keywords"/>
+        <result column="reviewer" property="reviewer"/>
+        <result column="review_date" property="reviewDate"/>
+        <result column="storage_location" property="storageLocation"/>
+        <result column="is_archive" property="isArchive"/>
+        <result column="remark" property="remark"/>
+        <result column="roll_date" property="rollDate"/>
+        <result column="rollor" property="rollor"/>
+        <result column="node_id" property="nodeId"/>
+        <result column="out_url" property="outUrl"/>
+        <result column="cd_id" property="cdId"/>
+        <result column="file_n" property="fileN"/>
+        <result column="page_n" property="pageN"/>
+        <result column="mileage" property="mileage"/>
+        <result column="fileType" property="fileType"/>
+        <result column="size" property="size"/>
+        <result column="procsort" property="procsort"/>
+        <result column="node_sort" property="nodeSort"/>
+        <result column="isOpen" property="isOpen"/>
+        <result column="ischeck" property="ischeck"/>
+    </resultMap>
+
+
+    <select id="selectArchivesAutoPage" resultMap="archivesAutoResultMap">
+        select * from u_archives_auto where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/IArchivesAutoService.java

@@ -0,0 +1,41 @@
+/*
+ *      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.archive.service;
+
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public interface IArchivesAutoService extends BaseService<ArchivesAuto> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param archivesAuto
+	 * @return
+	 */
+	IPage<ArchivesAutoVO> selectArchivesAutoPage(IPage<ArchivesAutoVO> page, ArchivesAutoVO archivesAuto);
+
+}

+ 41 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      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.archive.service.impl;
+
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
+import org.springblade.archive.mapper.ArchivesAutoMapper;
+import org.springblade.archive.service.IArchivesAutoService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+@Service
+public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper, ArchivesAuto> implements IArchivesAutoService {
+
+	@Override
+	public IPage<ArchivesAutoVO> selectArchivesAutoPage(IPage<ArchivesAutoVO> page, ArchivesAutoVO archivesAuto) {
+		return page.setRecords(baseMapper.selectArchivesAutoPage(page, archivesAuto));
+	}
+
+}

+ 49 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/wrapper/ArchivesAutoWrapper.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.archive.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-02-17
+ */
+public class ArchivesAutoWrapper extends BaseEntityWrapper<ArchivesAuto, ArchivesAutoVO>  {
+
+	public static ArchivesAutoWrapper build() {
+		return new ArchivesAutoWrapper();
+ 	}
+
+	@Override
+	public ArchivesAutoVO entityVO(ArchivesAuto archivesAuto) {
+		ArchivesAutoVO archivesAutoVO = Objects.requireNonNull(BeanUtil.copy(archivesAuto, ArchivesAutoVO.class));
+
+		//User createUser = UserCache.getUser(archivesAuto.getCreateUser());
+		//User updateUser = UserCache.getUser(archivesAuto.getUpdateUser());
+		//archivesAutoVO.setCreateUserName(createUser.getName());
+		//archivesAutoVO.setUpdateUserName(updateUser.getName());
+
+		return archivesAutoVO;
+	}
+
+}

+ 15 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java

@@ -162,6 +162,10 @@ public class ImageClassificationFileController extends BladeController {
                 if (fileResult != null && fileResult.size() > 0) {
                     //需要删除的本地文件集合
                     List<String> removeList = new ArrayList<>();
+
+                    // 压缩到小于指定文件大小200kb
+                    double targetSize = 200 * 1024;
+
                     for (ImageClassificationFile file : fileResult) {
                         //获取图片文件流
                         String[] uris = file.getImageUrl().split(",");
@@ -188,6 +192,8 @@ public class ImageClassificationFileController extends BladeController {
                                             Sheet sheet = workbook.getSheetAt(0);
                                             Drawing<?> drawing = sheet.createDrawingPatriarch();
                                             ClientAnchor anchor = helper.createClientAnchor();
+                                            anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE);
+
                                             if (i == 0) {
                                                 anchor.setRow1(0);
                                                 anchor.setCol1(0);
@@ -196,8 +202,16 @@ public class ImageClassificationFileController extends BladeController {
                                                 anchor.setCol1(1);
                                             }
 
+                                            //获取文件流
+                                            byte[] bytes = CommonUtil.InputStreamToBytes(CommonUtil.getOSSInputStream(urls.get(i)));
+                                            //压缩文件大小
+                                            while (bytes.length > targetSize) {
+                                                float reduceMultiple = 0.5f;
+                                                bytes = FileUtils.resizeImage(bytes, reduceMultiple);
+                                            }
+
                                             //创建图片
-                                            drawing.createPicture(anchor, workbook.addPicture(CommonUtil.InputStreamToBytes(CommonUtil.getOSSInputStream(urls.get(i))), Workbook.PICTURE_TYPE_PNG));
+                                            drawing.createPicture(anchor, workbook.addPicture(bytes, Workbook.PICTURE_TYPE_JPEG));
                                             //图片定位
                                             FileUtils.imageOrientation(sheet, anchor, i == 1 ? new DataVO(1, 28) : new DataVO(0, 0));
 

+ 36 - 9
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1119,7 +1119,6 @@ public class InformationWriteQueryController extends BladeController {
                 if (!contractAllNodeMap.containsKey(contractTree.getId().toString())) {
                     contractAllNodeMap.put(contractTree.getId().toString(), new ArrayList<>());
                 }
-
             });
         }
 
@@ -1970,13 +1969,25 @@ public class InformationWriteQueryController extends BladeController {
 
         if (!new Integer("6").equals(node.getNodeType()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())) {
             //不是工序,则查询当前节点下的所有填报节点
-            List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
-            if (StringUtils.isNotEmpty(vo.getIsFirst())) {
-                //如果是首件列表请求,则删掉没有标记为首件的数据
-                queryDataResult.removeIf(data -> StringUtils.isEmpty(data.getFirstId()));
-            }
-            if (queryDataResult != null && queryDataResult.size() > 0) {
-                submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
+            if (node.getParentId() == 0){
+                String contractId = node.getContractId();
+                List<WbsTreeContract> treeS = wbsTreeContractClient.getContractWbsTreeByParentId(node.getId().toString(),contractId);
+                for (WbsTreeContract tree : treeS) {
+                    List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(tree.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
+                    if (queryDataResult != null && queryDataResult.size() > 0) {
+                        submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
+                        queryDataResult.clear();
+                    }
+                }
+            }else {
+                List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
+                if (StringUtils.isNotEmpty(vo.getIsFirst())) {
+                    //如果是首件列表请求,则删掉没有标记为首件的数据
+                    queryDataResult.removeIf(data -> StringUtils.isEmpty(data.getFirstId()));
+                }
+                if (queryDataResult != null && queryDataResult.size() > 0) {
+                    submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
+                }
             }
         }
         //设置进集合中
@@ -2095,7 +2106,23 @@ public class InformationWriteQueryController extends BladeController {
                 contractIds.add(contractIdRelation);
             }
             if (contractIds.size() > 0) {
-                rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, StringUtils.isNotEmpty(parentId) ? parentId : "0", 2);
+                //原始classify=2时查不出数量统计,所以改成传1
+                if (StringUtils.isNotEmpty(parentId)) {
+                    //子节点
+                    rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, parentId, 1);
+                } else {
+                    //根节点
+                    rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, "0", 1);
+
+                    //设置根节点数量统计
+                    for (WbsTreeContractTreeVOS root : rootTreeNode) {
+                        List<WbsTreeContractTreeVOS> rootZi = this.informationQueryService.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), 1);
+                        List<Long> collect = rootZi.stream().map(WbsTreeContractTreeVOS::getSubmitCounts).collect(Collectors.toList());
+                        Long reduce = collect.stream().reduce(0L, Long::sum);
+                        root.setSubmitCounts(reduce);
+                    }
+                }
+
             } else {
                 rootTreeNode = new ArrayList<>();
             }

+ 15 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -31,6 +31,21 @@
         <result column="drawing_no" property="drawingNo"/>
         <result column="cite_change_number" property="citeChangeNumber"/>
         <result column="e_visa_file" property="eVisaFile"/>
+        <result column="node_ext_id" property="nodeExtId"/>
+        <result column="file_type" property="fileType"/>
+        <result column="archive_id" property="archiveId"/>
+        <result column="origin_id" property="originId"/>
+        <result column="filming_time" property="filmingTime"/>
+        <result column="filmingor_time" property="filmingorTime"/>
+        <result column="tag_id" property="tagId"/>
+        <result column="pic_code" property="picCode"/>
+        <result column="refer_code" property="referCode"/>
+        <result column="film_code" property="filmCode"/>
+        <result column="width" property="width"/>
+        <result column="height" property="height"/>
+        <result column="ftime" property="ftime"/>
+        <result column="utime" property="utime"/>
+        <result column="del_time" property="delTime"/>
     </resultMap>
     <update id="recoveryByIds">
         update u_archive_file set is_deleted = 0 where

+ 22 - 1
blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

@@ -12,7 +12,10 @@ import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.vo.DataVO;
 import org.springblade.core.tool.utils.IoUtil;
 
+import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
+import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URLEncoder;
 import java.util.Arrays;
@@ -96,6 +99,24 @@ public class FileUtils {
         }
     }
 
+    /**
+     * 压缩图片
+     */
+    public static byte[] resizeImage(byte[] srcImgData, float reduceMultiple) throws IOException {
+        BufferedImage bi = ImageIO.read(new ByteArrayInputStream(srcImgData));
+        int width = (int) (bi.getWidth() * reduceMultiple);
+        int height = (int) (bi.getHeight() * reduceMultiple);
+        Image image = bi.getScaledInstance(width, height, Image.SCALE_SMOOTH);
+        BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+        Graphics g = tag.getGraphics();
+        g.setColor(Color.RED);
+        g.drawImage(image, 0, 0, null);
+        g.dispose();
+        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+        ImageIO.write(tag, "JPEG", bOut);
+        return bOut.toByteArray();
+    }
+
     /**
      * 图片定位
      */
@@ -114,7 +135,7 @@ public class FileUtils {
             anchor.setRow2(ca.getLastRow());
         }
         int dx=(int)(sheet.getColumnWidthInPixels(anchor.getCol2())+3);
-        int dy=Units.pointsToPixel(sheet.getRow(anchor.getRow2()).getHeightInPoints())-50;
+        int dy=Units.pointsToPixel(sheet.getRow(anchor.getRow2()).getHeightInPoints())-5;
         anchor.setDx2(Units.pixelToEMU(dx));
         anchor.setDy2(Units.pixelToEMU(dy));
     }

+ 129 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ArchiveTreeContractController.java

@@ -0,0 +1,129 @@
+/*
+ *      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.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.manager.entity.ArchiveTreeContract;
+import org.springblade.manager.vo.ArchiveTreeContractVO;
+import org.springblade.manager.wrapper.ArchiveTreeContractWrapper;
+import org.springblade.manager.service.IArchiveTreeContractService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/archivetreecontract")
+@Api(value = "", tags = "接口")
+public class ArchiveTreeContractController extends BladeController {
+
+	private final IArchiveTreeContractService archiveTreeContractService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入archiveTreeContract")
+	public R<ArchiveTreeContractVO> detail(ArchiveTreeContract archiveTreeContract) {
+		ArchiveTreeContract detail = archiveTreeContractService.getOne(Condition.getQueryWrapper(archiveTreeContract));
+		return R.data(ArchiveTreeContractWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入archiveTreeContract")
+	public R<IPage<ArchiveTreeContractVO>> list(ArchiveTreeContract archiveTreeContract, Query query) {
+		IPage<ArchiveTreeContract> pages = archiveTreeContractService.page(Condition.getPage(query), Condition.getQueryWrapper(archiveTreeContract));
+		return R.data(ArchiveTreeContractWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入archiveTreeContract")
+	public R<IPage<ArchiveTreeContractVO>> page(ArchiveTreeContractVO archiveTreeContract, Query query) {
+		IPage<ArchiveTreeContractVO> pages = archiveTreeContractService.selectArchiveTreeContractPage(Condition.getPage(query), archiveTreeContract);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入archiveTreeContract")
+	public R save(@Valid @RequestBody ArchiveTreeContract archiveTreeContract) {
+		return R.status(archiveTreeContractService.save(archiveTreeContract));
+	}
+
+	/**
+	 * 修改 
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入archiveTreeContract")
+	public R update(@Valid @RequestBody ArchiveTreeContract archiveTreeContract) {
+		return R.status(archiveTreeContractService.updateById(archiveTreeContract));
+	}
+
+	/**
+	 * 新增或修改 
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入archiveTreeContract")
+	public R submit(@Valid @RequestBody ArchiveTreeContract archiveTreeContract) {
+		return R.status(archiveTreeContractService.saveOrUpdate(archiveTreeContract));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(archiveTreeContractService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 23 - 41
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -52,6 +52,7 @@ import org.springblade.resource.feign.IOSSClient;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.resource.vo.NewBladeFile;
 import org.springblade.system.cache.ParamCache;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -284,6 +285,7 @@ public class ExcelTabController extends BladeController {
     public R putFileAttach(@RequestParam("file") MultipartFile file, Long nodeId) {
 
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = "/Users/hongchuangyanfa/Desktop/"; //ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
 
         ExcelTab detail = excelTabService.getById(nodeId);
         // 上传excel文件
@@ -911,7 +913,6 @@ public class ExcelTabController extends BladeController {
                             zikey.add(dataInfo);
                         }
                     } else { //空行
-
                         List<Map<String, String>> left = new ArrayList<>();
                         List<Map<String, String>> top = new ArrayList<>();
                         for (int k = 0; k < zikey.size(); k++) {
@@ -1056,7 +1057,7 @@ public class ExcelTabController extends BladeController {
                                     }
                                 } else {
                                     Element bforData = tds.get(j - 1);
-                                    if (!bforData.text().isEmpty()) {
+                                    if (!bforData.text().isEmpty() || bforData.html().indexOf("hc-form-checkbox-group")>=0) {
                                         if (rowspan >= 1) {
                                             data.empty().append("<el-input type='textarea' @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;'   :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
                                         } else {
@@ -1302,7 +1303,6 @@ public class ExcelTabController extends BladeController {
 
 
         long newPkId = SnowFlakeUtil.getId();
-        Long id = wbsTreeContract.getId();
         wbsTreeContract.setPKeyId(newPkId);
         wbsTreeContract.setCreateTime(new Date());
         String nodeName = wbsTreeContractList2.get(0).getNodeName();
@@ -1323,40 +1323,15 @@ public class ExcelTabController extends BladeController {
         String tabName = wbsTreeContract.getInitTableName();
         // 字段查询 并去掉公式字段
 
-        String colkeys = "SELECT GROUP_CONCAT(e_key) as colkeys from m_wbs_tree a ,m_wbs_form_element b WHERE a.init_table_name = '" + tabName + "' and a.id=b.f_id and b.id not in(SELECT element_id from m_formula c where c.is_deleted=0) ";
+        String colkeys = "SELECT GROUP_CONCAT(e_key) as colkeys from m_table_info a ,m_wbs_form_element b WHERE a.tab_en_name = '"+tabName+"' and a.id=b.f_id ";
         Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(colkeys);
         colkeys = stringObjectMap.get("colkeys") + "";
-        // 复制表数据
-        String querySql = "select " + colkeys + " from " + tabName + " where p_key_id=" + pkeyId;
-        List<Map<String, Object>> dataList = jdbcTemplate.queryForList(querySql);
-        if (dataList != null && dataList.size() >= 1) {
-            Map<String, Object> dataMap2 = dataList.get(0);
-
-            dataMap2.remove("p_key_id");
-            dataMap2.remove("id");
-
-            // sql 组装
-            String sqlInfo = "";
-
-            sqlInfo = "INSERT INTO " + tabName + " ( ";
 
-            String keyStr = "id,p_key_id,";
-            String valStr = SnowFlakeUtil.getId() + "," + wbsTreeContract.getPKeyId() + ",";
-
-            for (String keys : dataMap2.keySet()) {
-                if (!(dataMap2.get(keys) + "").equals("null")) {
-                    keyStr += keys + ",";
-                    valStr += "'" + dataMap2.get(keys) + "',";
-                }
-            }
-            keyStr = keyStr.substring(0, keyStr.lastIndexOf(","));
-            valStr = valStr.substring(0, valStr.lastIndexOf(","));
+        // 复制表数据
 
-            sqlInfo = sqlInfo + keyStr + ") VALUES (" + valStr + ")";
+        String querySql = "insert into "+tabName+" (id,p_key_id,"+colkeys+") select '"+newPkId+"','"+newPkId+"'," + colkeys + " from " + tabName + " where p_key_id=" + pkeyId;
+        jdbcTemplate.execute(querySql);
 
-            //huangjn 保存成功后调用生成资料查询列表数据
-            jdbcTemplate.execute(sqlInfo);
-        }
         wbsTreeContractService.save(wbsTreeContract);
         return R.data("成功");
     }
@@ -1468,7 +1443,12 @@ public class ExcelTabController extends BladeController {
                 //优先使用电签的PDF
                 pdfUrl = stringObjectMap.get("e_visa_pdf_url");
             }
-            return R.data(pdfUrl);
+            if(StringUtils.isEmpty(pdfUrl+"")){
+                return R.fail(300,"无数据");
+            }else{
+                return R.data(pdfUrl);
+            }
+
         } else {
             return R.fail("无历史数据预览,请保存数据");
         }
@@ -1580,7 +1560,7 @@ public class ExcelTabController extends BladeController {
     })
     public R<String> getTheLogPdInfo(String theLogId, String nodePrimaryKeyId, String recordTime, String contractId) throws Exception {
         //获取配置的路径
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path =ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
 
         //获取对应的日志
         JSONObject theLogJson;
@@ -1594,8 +1574,12 @@ public class ExcelTabController extends BladeController {
         }
 
         if (theLogJson != null) {
-            theLogId = theLogJson.getString("id");
+            String evPdf = theLogJson.getString("eVisaPdfUrl");
+            if(StringUtils.isNotEmpty(evPdf)){
+                return R.data(evPdf);
+            }
 
+            theLogId = theLogJson.getString("id");
             //查询对应的html
             WbsTreePrivate tableNode = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, theLogJson.getString("tableId")));
 
@@ -2332,7 +2316,6 @@ public class ExcelTabController extends BladeController {
     @GetMapping("/getDataInfoinfoxxxxx")
     @ApiOperationSupport(order = 100)
     @ApiOperation(value = "初始化实际", notes = "初始化实际")
-
     public R getFirstExcelHtml() throws Exception {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         String sql = "SELECT * from m_excel_tab x where x.alias like '%1579401528622919682%' and parent_id in ('1582212216210829314','1582211923960115201')  and is_deleted=0 and file_type=3 ";
@@ -2569,6 +2552,7 @@ public class ExcelTabController extends BladeController {
     @ApiOperation(value = "表单填写图片上传", notes = "表单填写图片上传")
     public R addBussFile(@RequestParam MultipartFile file) {
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         BladeFile bladeFile = new BladeFile();
         if (file.getSize() >= 1024) {
             String filecode = SnowFlakeUtil.getId() + "";
@@ -2615,16 +2599,14 @@ public class ExcelTabController extends BladeController {
 
     /**
      * 在线excel 修改回调
-     * @param request
-     * @param response
      * @throws IOException
      */
-    @PostMapping(value = "/callbackSave", produces = "application/json;charset=UTF-8")
+    @PostMapping(value = "/callbackSave")
     @ApiOperation(value = "onlyOffice保存回调", notes = "onlyOffice保存回调")
     @ApiOperationSupport(order = 35)
     @ResponseBody
-    public void saveWord(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        excelTabService.callbackSave(request, response);
+    public ExcelEditCallback saveWord(@RequestBody ExcelEditCallback callback) {
+        return excelTabService.callbackSave(callback);
     }
 
 }

+ 249 - 68
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/FirstController.java

@@ -1,5 +1,6 @@
 package org.springblade.manager.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -22,12 +23,15 @@ import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.*;
 import org.springblade.manager.entity.*;
 import org.springblade.manager.service.*;
 import org.springblade.manager.service.impl.ContractInfoServiceImpl;
+import org.springblade.manager.service.impl.TableInfoServiceImpl;
+import org.springblade.manager.service.impl.WbsTreePrivateServiceImpl;
 import org.springblade.manager.utils.FileUtils;
 import org.springblade.resource.feign.CommonFileClient;
 import org.springblade.resource.feign.IOSSClient;
@@ -63,6 +67,7 @@ import java.util.stream.Collectors;
 public class FirstController extends BladeController {
 
     private final IWbsTreeContractService wbsTreeContractService;
+    private final WbsTreePrivateServiceImpl wbsTreePrivateService;
     private final IOSSClient iossClient;
     private final CommonFileClient commonFileClient;
     private final ITableFileService tableFileService;
@@ -73,6 +78,7 @@ public class FirstController extends BladeController {
     private final ITextdictInfoService textdictInfoService;
     private final IProjectInfoService projectInfoService;
     private final ContractInfoServiceImpl contractInfoService;
+    private final TableInfoServiceImpl tableInfoService;
 
     /**
      * 首件表单获取 html页面
@@ -216,11 +222,11 @@ public class FirstController extends BladeController {
                     }
 
                     //获取填报数据
-                    List<Map<String, Object>> businessDataMapList = this.getFirstBusinessData(firstId, tableNode.getContractId()).getData().get("data");
+                    List<Map<String, Object>> firstBusinessDataInfos = this.getFirstBusinessDataImpl2(firstId, tableNode.getContractId());
 
                     try {
                         //处理数据
-                        for (Map<String, Object> dataMap : businessDataMapList) {
+                        for (Map<String, Object> dataMap : firstBusinessDataInfos) {
                             // 获取excel流 和 html流
                             Workbook wb = new Workbook();
                             wb.loadFromMHtml(CommonUtil.getOSSInputStream(excelTab.getFileUrl()));
@@ -392,19 +398,25 @@ public class FirstController extends BladeController {
             @ApiImplicitParam(name = "firstId", value = "pkeyId", required = true),
             @ApiImplicitParam(name = "contractId", value = "contractId", required = true)
     })
-    public R<Map<String, List<Map<String, Object>>>> getFirstBusinessData(String firstId, String contractId) {
-        if (StringUtils.isNotEmpty(firstId) && StringUtils.isNotEmpty(contractId)) {
-            //数据结果
-            Map<String, List<Map<String, Object>>> result = new HashMap<>();
-            List<Map<String, Object>> dataResult = new ArrayList<>();
-            Map<String, Object> reData = new HashMap<>();
+    public R getFirstBusinessData(String firstId, String contractId) {
+        Map<String, Object> firstBusinessData = this.getFirstBusinessDataImpl(firstId, contractId);
+        if (firstBusinessData.size() > 0) {
+            return R.data(firstBusinessData);
+        }
+        return R.data(300, null, "未找到对应的业务数据");
+    }
 
-            WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda().eq(WbsTreeContract::getContractId, contractId).eq(WbsTreeContract::getTableType, "111"));
+    private Map<String, Object> getFirstBusinessDataImpl(String firstId, String contractId) {
+        //数据结果
+        Map<String, Object> reData = new HashMap<>();
+        if (StringUtils.isNotEmpty(firstId) && StringUtils.isNotEmpty(contractId)) {
+            WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
+                    .eq(WbsTreeContract::getContractId, contractId).eq(WbsTreeContract::getTableType, "111"));
             if (wbsTreeContract == null) {
-                return R.fail("该数据下无此节点!");
+                throw new ServiceException("该数据下无此节点");
             }
             if (wbsTreeContract.getHtmlUrl() == null) {
-                return R.fail("请上传清表!");
+                throw new ServiceException("请上传清表");
             }
 
             //匹配关联Title等
@@ -482,10 +494,6 @@ public class FirstController extends BladeController {
                     }
                 }
 
-                //入参
-                if (reData.size() > 0){
-                    dataResult.add(reData);
-                }
             } catch (FileNotFoundException e) {
                 e.printStackTrace();
             }
@@ -494,72 +502,245 @@ public class FirstController extends BladeController {
             //解析数据Data
             if (json != null) {
                 //获取数据所在表格
-                WbsTreeContract tableNode = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, json.getString("tableId")));
-                if (tableNode != null && StringUtils.isNotEmpty(tableNode.getInitTableName())) {
-                    //获取填报数据
-                    List<Map<String, Object>> businessDataMapList = this.jdbcTemplate.queryForList("SELECT * FROM " + tableNode.getInitTableName() + " WHERE group_id = " + json.getString("id"));
-                    if (businessDataMapList.size() > 0) {
-                        for (Map<String, Object> mysqlData : businessDataMapList) {
-                            for (String key : mysqlData.keySet()) {
-                                String tabVal = mysqlData.get(key) + "";
-                                // 时间段处理
-                                if (StringUtils.isNotEmpty(tabVal) && !tabVal.equals("null")) {
-                                    if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
-                                        String[] tabData = tabVal.split("_\\^_");
-                                        if (reData.containsKey("pickerKey")) {
-                                            String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
-                                            reData.put("pickerKey", pickerKey);
-                                        } else {
-                                            reData.put("pickerKey", key + "__" + tabData[1]);
-                                        }
-                                        String sql = tabData[0];
-                                        sql = sql.replaceAll("\\[", "['");
-                                        sql = sql.replaceAll("]", "']");
-                                        sql = sql.replaceAll("000Z,", "000Z',");
-                                        sql = sql.replaceAll(", 20", ", '20");
-                                        sql = sql.replaceAll("'", "");
-                                        reData.put(key + "__" + tabData[1], sql);
-                                    } else if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z") >= 0) { //时间
-                                        String[] tabData = tabVal.split("_\\^_");
-                                        reData.put(key + "__" + tabData[1], tabData[0]);
-                                    } else if (tabVal.indexOf("☆") >= 0) {
-                                        String[] mysql = tabVal.split("☆");
-                                        for (String data : mysql) {
-                                            String[] tabData = data.split("_\\^_");
-                                            reData.put(key + "__" + tabData[1], tabData[0]);
+                WbsTreeContract contractNode = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, json.getString("tableId")));
+                if (ObjectUtil.isNotEmpty(contractNode)) {
+                    WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery()
+                            .eq(WbsTreePrivate::getId, contractNode.getId())
+                            .eq(WbsTreePrivate::getProjectId, contractNode.getProjectId())
+                            .eq(WbsTreePrivate::getWbsId, contractNode.getWbsId())
+                            .eq(WbsTreePrivate::getTableType, 111)
+                    );
+                    if (StringUtils.isNotEmpty(wbsTreePrivate.getInitTableId())) {
+                        TableInfo tableId = tableInfoService.getBaseMapper().selectById(wbsTreePrivate.getInitTableId());
+                        if (tableId != null) {
+                            //获取填报数据
+                            List<Map<String, Object>> businessDataMapList = this.jdbcTemplate.queryForList("SELECT * FROM " + tableId.getTabEnName() + " WHERE group_id = " + json.getString("id"));
+                            if (businessDataMapList.size() > 0) {
+                                for (Map<String, Object> mysqlData : businessDataMapList) {
+                                    for (String key : mysqlData.keySet()) {
+                                        String tabVal = mysqlData.get(key) + "";
+                                        // 时间段处理
+                                        if (StringUtils.isNotEmpty(tabVal) && !tabVal.equals("null")) {
+                                            if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                if (reData.containsKey("pickerKey")) {
+                                                    String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
+                                                    reData.put("pickerKey", pickerKey);
+                                                } else {
+                                                    reData.put("pickerKey", key + "__" + tabData[1]);
+                                                }
+                                                String sql = tabData[0];
+                                                sql = sql.replaceAll("\\[", "['");
+                                                sql = sql.replaceAll("]", "']");
+                                                sql = sql.replaceAll("000Z,", "000Z',");
+                                                sql = sql.replaceAll(", 20", ", '20");
+                                                sql = sql.replaceAll("'", "");
+                                                reData.put(key + "__" + tabData[1], sql);
+                                            } else if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z") >= 0) { //时间
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                reData.put(key + "__" + tabData[1], tabData[0]);
+                                            } else if (tabVal.indexOf("☆") >= 0) {
+                                                String[] mysql = tabVal.split("☆");
+                                                for (String data : mysql) {
+                                                    String[] tabData = data.split("_\\^_");
+                                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                                }
+                                            } else if (tabVal.indexOf("_^_") >= 0) {
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                reData.put(key + "__" + tabData[1], tabData[0]);
+                                            } else {
+                                                reData.put(key, tabVal);
+                                            }
                                         }
-                                    } else if (tabVal.indexOf("_^_") >= 0) {
-                                        String[] tabData = tabVal.split("_\\^_");
-                                        reData.put(key + "__" + tabData[1], tabData[0]);
-                                    } else {
-                                        reData.put(key, tabVal);
                                     }
+                                    reData.remove("p_key_id");
+                                    reData.remove("classify");
+                                    reData.remove("contractId");
+                                    reData.remove("pkeyId");
+                                    reData.remove("projectId");
                                 }
+                                //获取关联
+                                List<Map<String, Object>> linkMapList = this.jdbcTemplate.queryForList("SELECT link_id AS id,title AS name FROM u_first_link_data WHERE first_id = " + firstId + " and is_deleted = 0");
+                                //设置关联数据
+                                reData.put("link", linkMapList);
                             }
+                        }
+                    }
+                }
+            }
+        }
+        return reData;
+    }
+
+    private List<Map<String, Object>> getFirstBusinessDataImpl2(String firstId, String contractId) {
+        List<Map<String, Object>> result = new ArrayList<>();
+        //数据结果
+        Map<String, Object> reData = new HashMap<>();
+        if (StringUtils.isNotEmpty(firstId) && StringUtils.isNotEmpty(contractId)) {
+            WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda().eq(WbsTreeContract::getContractId, contractId).eq(WbsTreeContract::getTableType, "111"));
+            if (wbsTreeContract == null) {
+                throw new ServiceException("该数据下无此节点");
+            }
+            if (wbsTreeContract.getHtmlUrl() == null) {
+                throw new ServiceException("请上传清表");
+            }
+
+            //匹配关联Title等
+            try {
+                File file1 = ResourceUtil.getFile(wbsTreeContract.getHtmlUrl());
+                String htmlString = IoUtil.readToString(new FileInputStream(file1));
+                Document doc = Jsoup.parse(htmlString);
+
+                // 模糊匹配
+                Elements dwTitle = doc.select("el-input[placeholder~=.*承包单位]");
+                Elements sgTitle = doc.select("el-input[placeholder~=^施工单位]");
+                Elements sgTitle1 = doc.select("el-input[placeholder=安装单位]");
+                sgTitle.addAll(sgTitle1);
+                Elements htdTitle = doc.select("el-input[placeholder~=.*合同段.*]");
+                Elements htdTitle1 = doc.select("el-input[placeholder~=合同名称.*]");
+                htdTitle.addAll(htdTitle1);
+                Elements jlTitle = doc.select("el-input[placeholder~=监理单位.*]");
+                Elements bhTitle = doc.select("el-input[placeholder~=^编号]");
+                Elements bhTitle1 = doc.select("el-input[placeholder~=合同编号.*]");
+                bhTitle.addAll(bhTitle1);
+                Elements xmTitle = doc.select("el-input[placeholder~=^项目名称]");
+
+                ContractInfo contractInfo = contractInfoService.getById(wbsTreeContract.getContractId());
+                // 施工单位名称
+                if (dwTitle.size() >= 1) {
+                    int y = Integer.parseInt(dwTitle.attr("trindex"));
+                    if (y <= 10) {
+                        reData.put(dwTitle.attr("keyName"), contractInfo.getConstructionUnitName());
+                    }
+
+                }
+                if (sgTitle.size() >= 1) {
+                    int y = Integer.parseInt(sgTitle.attr("trindex"));
+                    if (y <= 10) {
+                        reData.put(sgTitle.attr("keyName"), contractInfo.getConstructionUnitName());
+                    }
+                }
 
-                            reData.remove("p_key_id");
-                            reData.remove("classify");
-                            reData.remove("contractId");
-                            reData.remove("pkeyId");
-                            reData.remove("projectId");
+                // 合同段名称
+                if (htdTitle.size() >= 1) {
+                    for (Element element : htdTitle) {
+                        int trIndex = Integer.parseInt(element.attr("trindex"));
+                        if (trIndex <= 8) {
+                            reData.put(element.attr("keyName"), contractInfo.getContractName());
+                        }
+                    }
+                }
+                // 监理单位名称
+                if (jlTitle.size() >= 1) {
+                    for (Element element : jlTitle) {
+                        int trIndex = Integer.parseInt(element.attr("trindex"));
+                        if (trIndex <= 10) {
+                            reData.put(element.attr("keyName"), contractInfo.getSupervisionUnitName());
+                        }
+                    }
+                }
+                // 编号
+                if (bhTitle.size() >= 1 && contractInfo.getIsReferenceNumber() == 1) {
+                    for (Element element : bhTitle) {
+                        int trIndex = Integer.parseInt(element.attr("trindex"));
+                        if (trIndex <= 10) {
+                            reData.put(element.attr("keyName"), contractInfo.getContractNumber());
+                        }
+                    }
+                }
 
-                            dataResult.add(reData);
+                // 项目名称
+                if (xmTitle.size() >= 1) {
+                    for (Element element : xmTitle) {
+                        int trIndex = Integer.parseInt(element.attr("trindex"));
+                        if (trIndex <= 6) {
+                            ProjectInfo projectInfo = projectInfoService.getById(wbsTreeContract.getProjectId());
+                            reData.put(element.attr("keyName"), projectInfo.getProjectName());
                         }
-                        //获取关联
-                        List<Map<String, Object>> linkMapList = this.jdbcTemplate.queryForList("SELECT link_id AS id,title AS name FROM u_first_link_data WHERE first_id = " + firstId + " and is_deleted = 0");
-                        //设置关联数据
-                        result.put("link", linkMapList);
                     }
                 }
+
+            } catch (FileNotFoundException e) {
+                e.printStackTrace();
             }
 
-            //设置表格数据
-            result.put("data", dataResult);
+            JSONObject json = this.informationQueryClient.queryFirstBusinessDataByFirstId(firstId);
+            //解析数据Data
+            if (json != null) {
+                //获取数据所在表格
+                WbsTreeContract contractNode = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, json.getString("tableId")));
+                if (ObjectUtil.isNotEmpty(contractNode)) {
+                    WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery()
+                            .eq(WbsTreePrivate::getId, contractNode.getId())
+                            .eq(WbsTreePrivate::getProjectId, contractNode.getProjectId())
+                            .eq(WbsTreePrivate::getWbsId, contractNode.getWbsId())
+                            .eq(WbsTreePrivate::getTableType, 111)
+                    );
+                    if (StringUtils.isNotEmpty(wbsTreePrivate.getInitTableId())) {
+                        TableInfo tableId = tableInfoService.getBaseMapper().selectById(wbsTreePrivate.getInitTableId());
+                        if (tableId != null) {
+                            //获取填报数据
+                            List<Map<String, Object>> businessDataMapList = this.jdbcTemplate.queryForList("SELECT * FROM " + tableId.getTabEnName() + " WHERE group_id = " + json.getString("id"));
+                            if (businessDataMapList.size() > 0) {
+                                for (Map<String, Object> mysqlData : businessDataMapList) {
+                                    for (String key : mysqlData.keySet()) {
+                                        String tabVal = mysqlData.get(key) + "";
+                                        // 时间段处理
+                                        if (StringUtils.isNotEmpty(tabVal) && !tabVal.equals("null")) {
+                                            if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                if (reData.containsKey("pickerKey")) {
+                                                    String pickerKey = reData.get("pickerKey") + "," + key + "__" + tabData[1];
+                                                    reData.put("pickerKey", pickerKey);
+                                                } else {
+                                                    reData.put("pickerKey", key + "__" + tabData[1]);
+                                                }
+                                                String sql = tabData[0];
+                                                sql = sql.replaceAll("\\[", "['");
+                                                sql = sql.replaceAll("]", "']");
+                                                sql = sql.replaceAll("000Z,", "000Z',");
+                                                sql = sql.replaceAll(", 20", ", '20");
+                                                sql = sql.replaceAll("'", "");
+                                                reData.put(key + "__" + tabData[1], sql);
+                                            } else if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z") >= 0) { //时间
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                reData.put(key + "__" + tabData[1], tabData[0]);
+                                            } else if (tabVal.indexOf("☆") >= 0) {
+                                                String[] mysql = tabVal.split("☆");
+                                                for (String data : mysql) {
+                                                    String[] tabData = data.split("_\\^_");
+                                                    reData.put(key + "__" + tabData[1], tabData[0]);
+                                                }
+                                            } else if (tabVal.indexOf("_^_") >= 0) {
+                                                String[] tabData = tabVal.split("_\\^_");
+                                                reData.put(key + "__" + tabData[1], tabData[0]);
+                                            } else {
+                                                reData.put(key, tabVal);
+                                            }
+                                        }
+                                    }
 
-            return R.data(result);
-        }
+                                    reData.remove("p_key_id");
+                                    reData.remove("classify");
+                                    reData.remove("contractId");
+                                    reData.remove("pkeyId");
+                                    reData.remove("projectId");
 
-        return R.data(300, null, "未找到对应的业务数据");
+                                }
+                                //获取关联
+                                List<Map<String, Object>> linkMapList = this.jdbcTemplate.queryForList("SELECT link_id AS id,title AS name FROM u_first_link_data WHERE first_id = " + firstId + " and is_deleted = 0");
+                                //设置关联数据
+                                reData.put("link", linkMapList);
+
+
+                            }
+                        }
+                    }
+                }
+            }
+            result.add(reData);
+        }
+        return result;
     }
 
 }

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

@@ -291,17 +291,17 @@ public class TextdictInfoController extends BladeController {
                 element.empty().append(checkbox);
             }
         } else if (textdictInfo.getTextId().equals("date")) { // 日期--年月日时分秒
-            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='YYYY年MM月DD日 HH:mm:ss' value-format='yyyy-MM-dd hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='YYYY年MM月DD日 HH:mm:ss' value-format='YYYY年MM月DD日 hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
         } else if (textdictInfo.getTextId().equals("dateYMD")) { // 日期--年月日
-            element.empty().append("<el-date-picker v-model=" + vmode + " type='date' format='YYYY年MM月DD日' value-format='YYYY-MM-DD' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
         } else if (textdictInfo.getTextId().equals("dateHMS")) { // 日期--时分秒
             element.empty().append("<el-time-picker v-model=" + vmode + " type='date' format='HH:mm:ss' value-format='HH:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateSM")) { // 日期--时分
             element.empty().append("<el-time-picker v-model=" + vmode + " type='date' format='HH:mm' value-format='HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateMDHM")) { // 日期--月日时分
-            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='MM月DD日 HH:mm' value-format='MM-DD HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='MM月DD日 HH:mm' value-format='MM月DD日 HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateDHM")) { // 日期--日时分
-            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='DD日 HH:mm' value-format='DD HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-date-picker v-model=" + vmode + " type='datetime' format='DD日 HH:mm' value-format='DD HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("daterange")) { // 时间段
             element.empty().append("<el-date-picker  v-model=" + vmode + " type='datetimerange' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
             element.children().get(0).attr("@change", "datePickerChange($event,'" + keyname + "')");

+ 24 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeContractController.java

@@ -1,10 +1,13 @@
 package org.springblade.manager.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.*;
 import lombok.AllArgsConstructor;
+import org.apache.commons.lang.StringUtils;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.dto.WbsTreeContractDTO2;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.WbsTreeContract;
@@ -103,4 +106,25 @@ public class WbsTreeContractController extends BladeController {
         return R.fail(200, "未查询到数据");
     }
 
+    /**
+     * 客户端删除 合同段 表
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "id", value = "主键id", required = true),
+            @ApiImplicitParam(name = "stats", value = "状态码", required = true)
+    })
+    public R remove(@RequestParam("id") String id,@RequestParam("stats") String stats) {
+
+        WbsTreeContract wbsTreeContract = iWbsTreeContractService.getOne(Wrappers.<WbsTreeContract>query().lambda()
+                .eq(WbsTreeContract::getPKeyId, id).eq(WbsTreeContract::getIsDeleted,0) );
+        if(StringUtils.isEmpty(wbsTreeContract.getPdfUrl()) && stats.equals("0")){
+            return R.data(300,"1","该节点下有数据");
+        }
+        return R.status(iWbsTreeContractService.remove(Wrappers.<WbsTreeContract>query().lambda()
+                .eq(WbsTreeContract::getPKeyId, id).eq(WbsTreeContract::getIsDeleted,0)));
+    }
+
 }

+ 9 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreePrivateController.java

@@ -16,7 +16,7 @@ import org.springblade.core.mp.support.Query;
 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.core.tool.utils.StringUtil;
 import org.springblade.manager.dto.WbsTreePrivateDTO2;
 import org.springblade.manager.dto.WbsTreePrivateDTO3;
 import org.springblade.manager.entity.ProjectInfo;
@@ -316,6 +316,14 @@ public class WbsTreePrivateController extends BladeController {
                                                             @RequestParam("projectId") String projectId) {
         List<WbsNodeTableVO> rs = wbsTreePrivateService.selectByNodeTable(parentId, wbsId, projectId);
         if (rs.size() > 0) {
+            for (WbsNodeTableVO r : rs) {
+                if (StringUtil.isBlank(r.getInitTableId())){
+                    WbsTree wbsTree = wbsTreeService.getById(r.getId());
+                    if (wbsTree != null){
+                        r.setInitTableId(wbsTree.getInitTableId().toString());
+                    }
+                }
+            }
             return R.data(rs);
         }
         return R.fail(200, "未查询到数据");

+ 8 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java

@@ -199,6 +199,14 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
         return this.wbsTreeContractService.selectContractTreeAll(Long.parseLong(contractId));
     }
 
+    @Override
+    public List<WbsTreeContract> getContractWbsTreeByParentId(String parentId,String contractId) {
+        LambdaQueryWrapper<WbsTreeContract> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(WbsTreeContract::getParentId,parentId);
+        wrapper.eq(WbsTreeContract::getContractId,contractId);
+        return this.wbsTreeContractService.list(wrapper);
+    }
+
     @Override
     public List<WbsTreeContractTreeVOS> queryCurrentContractLogList(String contractId) {
         ContractInfo contract = this.contractInfoService.getById(contractId);

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

@@ -0,0 +1,42 @@
+/*
+ *      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 org.springblade.manager.entity.ArchiveTreeContract;
+import org.springblade.manager.vo.ArchiveTreeContractVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+public interface ArchiveTreeContractMapper extends BaseMapper<ArchiveTreeContract> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param archiveTreeContract
+	 * @return
+	 */
+	List<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage page, ArchiveTreeContractVO archiveTreeContract);
+
+}

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

@@ -0,0 +1,46 @@
+<?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.ArchiveTreeContractMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="archiveTreeContractResultMap" type="org.springblade.manager.entity.ArchiveTreeContract">
+        <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="project_id" property="projectId"/>
+        <result column="contract_id" property="contractId"/>
+        <result column="is_upload_file_display_configuration_tree" property="isUploadFileDisplayConfigurationTree"/>
+        <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="node_type" property="nodeType"/>
+        <result column="post_type" property="postType"/>
+        <result column="association_type" property="associationType"/>
+        <result column="major_data_type" property="majorDataType"/>
+        <result column="display_hierarchy" property="displayHierarchy"/>
+        <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"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
+    </resultMap>
+
+
+    <select id="selectArchiveTreeContractPage" resultMap="archiveTreeContractResultMap">
+        select * from m_archive_tree_contract where is_deleted = 0
+    </select>
+
+</mapper>

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

@@ -27,6 +27,12 @@
         <result column="interface_type" property="interfaceType"/>
         <result column="sort" property="sort"/>
         <result column="remark" property="remark"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
         <result column="is_upload_file_display_configuration_tree" property="isUploadFileDisplayConfigurationTree"/>
     </resultMap>
 

+ 5 - 8
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml

@@ -608,14 +608,12 @@
 
     <!-- 项目级 表单类型分类 wbs树 -->
     <select id="tabTypeLazyTreeAll" resultMap="treeNodeResultMapTabType">
-        SELECT p_key_id as id,p_key_id as primaryKeyId,title,parent_id,fill_rate as fillRate,0 as excelIds,initTableId,
+        SELECT p_key_id as id,p_key_id as primaryKeyId,title,parent_id,fill_rate as fillRate,0 as excelIds,initTableId,initTableName,
         (SELECT dict_value from blade_dict where code='table_type' and dict_key not in(-1,0) and dict_key=table_type )
         as tabType,
         (SELECT count(1) FROM m_wbs_form_element WHERE f_id = initTableId and is_deleted=0) AS "elementTotal",
         (SELECT dict_value from blade_dict where code='owner_type' and dict_key not in(-1,0) and dict_key=table_owner )
         as tabOwner,
-        /*排序*/
-        -- (SELECT sort FROM m_wbs_node_sort c WHERE a.p_key_id = c.p_key_id) AS sort,
         (
         SELECT
         CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
@@ -633,13 +631,13 @@
         ) AS "has_children"
         from (
         SELECT '12345678910' as p_key_id , '表单类型' as title, 0 as parent_id,0 as table_type,0 as fill_rate,0 as
-        table_owner,0 as initTableId
+        table_owner,0 as initTableId,0 as initTableName
         union all
         SELECT dict_key as p_key_id ,dict_value as title,'12345678910' as parent_id,0 as table_type,0 as fill_rate,0 as
-        table_owner,0 as initTableId from blade_dict where code='table_type' and dict_key not in(-1,0)
+        table_owner,0 as initTableId,0 as initTableName from blade_dict where code='table_type' and dict_key not in(-1,0)
         union all
         SELECT id as p_key_id,tab_ch_name as title,tab_type as parent_id,tab_type as table_type,fill_rate,table_owner,id
-        as initTableId from m_table_info WHERE is_deleted=0
+        as initTableId,tab_en_name as initTableName from m_table_info WHERE is_deleted=0
         ) a where 1=1
         <if test="parentId != null and parentId != ''">
             and a.parent_id = #{parentId}
@@ -647,8 +645,7 @@
         <if test="titleName != null and titleName != ''">
             and a.title like concat('%',#{titleName},'%') and LENGTH(a.p_key_id)>11
         </if>
-        /*排序*/
-        -- order by sort,title
+
     </select>
 
     <select id="selectWbsTreeContractList" resultType="org.springblade.manager.entity.WbsTreePrivate">

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

@@ -0,0 +1,41 @@
+/*
+ *      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.ArchiveTreeContract;
+import org.springblade.manager.vo.ArchiveTreeContractVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+public interface IArchiveTreeContractService extends BaseService<ArchiveTreeContract> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param archiveTreeContract
+	 * @return
+	 */
+	IPage<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage<ArchiveTreeContractVO> page, ArchiveTreeContractVO archiveTreeContract);
+
+}

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

@@ -19,6 +19,7 @@ package org.springblade.manager.service;
 import com.alibaba.fastjson.JSONArray;
 import org.springblade.core.tool.api.R;
 import org.springblade.manager.bean.TableInfo;
+import org.springblade.manager.entity.ExcelEditCallback;
 import org.springblade.manager.entity.ExcelTab;
 import org.springblade.manager.vo.ExceTabTreVO;
 import org.springblade.manager.vo.ExcelTabVO;
@@ -26,6 +27,7 @@ import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.manager.vo.ExcelTabWbsTypeVO;
 import org.springblade.manager.vo.WbsTreeVO;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -149,8 +151,6 @@ public interface IExcelTabService extends BaseService<ExcelTab> {
 
     /**
      * 在线excel 保存回调
-     * @param request
-     * @param response
      */
-    void callbackSave(HttpServletRequest request, HttpServletResponse response) throws IOException;
+    ExcelEditCallback callbackSave(ExcelEditCallback callback) ;
 }

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

@@ -0,0 +1,41 @@
+/*
+ *      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 org.springblade.manager.entity.ArchiveTreeContract;
+import org.springblade.manager.vo.ArchiveTreeContractVO;
+import org.springblade.manager.mapper.ArchiveTreeContractMapper;
+import org.springblade.manager.service.IArchiveTreeContractService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+@Service
+public class ArchiveTreeContractServiceImpl extends BaseServiceImpl<ArchiveTreeContractMapper, ArchiveTreeContract> implements IArchiveTreeContractService {
+
+	@Override
+	public IPage<ArchiveTreeContractVO> selectArchiveTreeContractPage(IPage<ArchiveTreeContractVO> page, ArchiveTreeContractVO archiveTreeContract) {
+		return page.setRecords(baseMapper.selectArchiveTreeContractPage(page, archiveTreeContract));
+	}
+
+}

+ 236 - 183
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -27,9 +27,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.mixsmart.utils.ListUtils;
 import com.spire.xls.*;
+import com.spire.xls.CellRange;
+import com.spire.xls.Workbook;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.ObjectUtils;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.util.IOUtils;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
@@ -43,6 +50,7 @@ import org.springblade.business.vo.SaveContractLogVO;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.common.vo.DataVO;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
 import org.springblade.core.oss.model.BladeFile;
@@ -50,6 +58,7 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.node.ForestNodeMerger;
 import org.springblade.core.tool.utils.*;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.manager.bean.TableInfo;
 import org.springblade.manager.entity.*;
 import org.springblade.manager.formula.KeyMapper;
@@ -60,15 +69,22 @@ import org.springblade.manager.utils.FileUtils;
 import org.springblade.manager.vo.*;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.TransactionStatus;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.support.DefaultTransactionDefinition;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.awt.*;
+import java.awt.Color;
 import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URL;
@@ -87,37 +103,26 @@ import java.util.stream.Collectors;
 @AllArgsConstructor
 public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTab> implements IExcelTabService {
 
-    //客户端资料查询接口
     private final InformationQueryClient informationQueryClient;
-    // 元素信息表-
     private final IWbsTreeContractService wbsTreeContractService;
-
     private final IFormulaService formulaService;
-    private final JdbcTemplate jdbcTemplate;
 
-    private final IWbsParamService wbsParamService;
+    @Autowired
+    private JdbcTemplate jdbcTemplate;
 
+    @Autowired
+    private DataSourceTransactionManager transactionManager1;
+    private final IWbsParamService wbsParamService;
     private final IWbsTreePrivateService wbsTreePrivateService;
-
     private final ContractLogClient contractLogClient;
-
-    // 表单字典信息表
     private final ITextdictInfoService textdictInfoService;
-
-    // Oss接口
     private final NewIOSSClient newIOSSClient;
-    // 表单附件信息
     private final ITableFileService tableFileService;
-
-    // 合同端信息
     private final IContractInfoService contractInfoService;
-
     private final IProjectInfoService projectInfoService;
-
-    // 用户操作日志信息
     private final OperationLogClient operationLogClient;
-
     private final TrialSelfInspectionRecordClient inspectionRecordClient;
+    private final TableInfoServiceImpl tableInfoService;
 
     @Override
     public IPage<ExcelTabVO> selectExcelTabPage(IPage<ExcelTabVO> page, ExcelTabVO excelTab) {
@@ -509,73 +514,50 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
     /**
      * 在线excel 编辑回调
-     *
-     * @param request
-     * @param response
      */
     @Override
-    public void callbackSave(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        PrintWriter writer = response.getWriter();
-        String body = "";
-        try {
-            Scanner scanner = new Scanner(request.getInputStream());
-            scanner.useDelimiter("\\A");
-            body = scanner.hasNext() ? scanner.next() : "";
-            scanner.close();
-        } catch (Exception ex) {
-            writer.write("get request.getInputStream error:" + ex.getMessage());
-            return;
-        }
-        if (body.isEmpty()) {
-            writer.write("empty request.getInputStream");
-            return;
-        }
-        JSONObject jsonObj = JSON.parseObject(body);
-        System.out.println("回调参数对象 =====》》》 " + jsonObj);
-        int status = (Integer) jsonObj.get("status");
+    public ExcelEditCallback callbackSave(ExcelEditCallback callback) {
+        ExcelEditCallback editCallback = new ExcelEditCallback();
+        editCallback.setError(0); //初始化返回值
+        int status = callback.getStatus();
         int saved = 0;
         //status=6,表示点击保存按钮 2 关闭保存
         if (status == 3 || status == 6) //MustSave, Corrupted
         {
             //获取url
-            String downloadUri = (String) jsonObj.get("url");
+            String downloadUri = callback.getUrl();
             downloadUri = downloadUri.replaceAll("amp;", "");
             try {
                 //获取onlyOffice缓存中的文件流
-                String fileName = request.getParameter("fileName");
-                System.out.println("====下载的文件名:" + fileName);
                 URL url = new URL(downloadUri);
                 java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
-                InputStream stream = connection.getInputStream();
-                if (stream == null) {
-                    throw new Exception("Stream is null");
+                InputStream inputStream = connection.getInputStream();
+                if (inputStream == null) {
+                    throw new Exception("文件为空");
                 }
-                Long tabId = jsonObj.getLong("key");
+                Long tabId = callback.getKey();
                 if (tabId == null) {
-                    throw new Exception("key不能为空");
+                    throw new Exception("excel为空");
                 }
                 //获取数据库信息
                 ExcelTab excelTab = baseMapper.selectById(tabId);
-
                 //上传新文件到文件服务器
-                byte[] officeByte = IoUtil.readToByteArray(stream);
-                BladeFile bladeFile = newIOSSClient.updateFile(officeByte, excelTab.getName());
-
+                byte[] officeByte = IoUtil.readToByteArray(inputStream);
+                BladeFile bladeFile = this.newIOSSClient.updateFile(officeByte, excelTab.getExtension());
                 //修改本地数据信息
-                excelTab.setHtmlUrl(bladeFile.getLink());
+                excelTab.setFileUrl(bladeFile.getLink());
                 //获取文件大小
                 int size = connection.getContentLength() / 1024 / 1024; //单位M
                 excelTab.setAttachSize(Long.parseLong(size + ""));
+                excelTab.setStatus(3);
                 baseMapper.updateById(excelTab);
                 connection.disconnect();
-                //根据文件编号删除文件服务器的文件
-
-            } catch (Exception ex) {
-                saved = 1;
-                ex.printStackTrace();
+            } catch (Exception e) {
+                editCallback.setError(1);
+                e.printStackTrace();
             }
         }
-        writer.write("{\"error\":" + saved + "}");
+        return editCallback;
     }
 
 
@@ -590,66 +572,72 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         if (linkProcessList == null) {
             linkProcessList = new ArrayList<>();
         }
-
         //获取数据所在数据表名
-        WbsTreeContract table = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery()
+        WbsTreeContract contractNode = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery()
                 .eq(WbsTreeContract::getContractId, tableInfoList.get(0).getContractId())
                 .eq(WbsTreeContract::getTableType, 111));
-        if (table == null) {
-            return null;
-        }
-        String tableName = table.getInitTableName();
-        if (StringUtils.isEmpty(tableName)) {
-            return null;
-        }
-
-        //获取首件记录ID
-        String firstId = tableInfoList.get(0).getFirstId();
-        if (StringUtils.isNotEmpty(firstId)) {
-            //删除掉旧数据
-            this.jdbcTemplate.execute("DELETE FROM " + tableName + " WHERE group_id = " + firstId);
-        } else {
-            firstId = SnowFlakeUtil.getId() + "";
-        }
+        if (ObjectUtil.isNotEmpty(contractNode)) {
+            WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery()
+                    .eq(WbsTreePrivate::getId, contractNode.getId())
+                    .eq(WbsTreePrivate::getProjectId, contractNode.getProjectId())
+                    .eq(WbsTreePrivate::getWbsId, contractNode.getWbsId())
+                    .eq(WbsTreePrivate::getTableType, 111)
+            );
+            if (StringUtils.isNotEmpty(wbsTreePrivate.getInitTableName())) {
+                if (StringUtils.isNotEmpty(wbsTreePrivate.getInitTableId())) {
+                    org.springblade.manager.entity.TableInfo table = tableInfoService.getBaseMapper().selectById(wbsTreePrivate.getInitTableId());
+                    if (ObjectUtil.isNotEmpty(table)) {
+                        //获取首件记录ID
+                        String firstId = tableInfoList.get(0).getFirstId();
+                        if (StringUtils.isNotEmpty(firstId)) {
+                            //删除掉旧数据
+                            this.jdbcTemplate.execute("DELETE FROM " + table.getTabEnName() + " WHERE group_id = " + firstId);
+                        } else {
+                            firstId = SnowFlakeUtil.getId() + "";
+                        }
 
-        //获取上传的文件相关
-        String sourceUrl = tableInfoList.get(0).getSourceUrl(),
-                pdfUrl = tableInfoList.get(0).getPdfUrl(),
-                firstFileName = tableInfoList.get(0).getFirstFileName();
+                        //获取上传的文件相关
+                        String sourceUrl = tableInfoList.get(0).getSourceUrl(),
+                                pdfUrl = tableInfoList.get(0).getPdfUrl(),
+                                firstFileName = tableInfoList.get(0).getFirstFileName();
 
-        //新增数据
-        for (TableInfo tableInfo : tableInfoList) {
-            //获取字段信息
-            LinkedHashMap<String, String> dataMap2 = tableInfo.getDataMap();
+                        //新增数据
+                        for (TableInfo tableInfo : tableInfoList) {
+                            //获取字段信息
+                            LinkedHashMap<String, String> dataMap2 = tableInfo.getDataMap();
 
-            //拼接SQL
-            StringBuilder sql = new StringBuilder("INSERT INTO " + tableName),
-                    keySql = new StringBuilder("id, group_id"),
-                    valSql = new StringBuilder("" + SnowFlakeUtil.getId() + ", " + firstId);
+                            //拼接SQL
+                            StringBuilder sql = new StringBuilder("INSERT INTO " + table.getTabEnName()),
+                                    keySql = new StringBuilder("id, group_id"),
+                                    valSql = new StringBuilder("" + SnowFlakeUtil.getId() + ", " + firstId);
 
-            for (String key : dataMap2.keySet()) {
-                keySql.append(", ").append(key);
-                valSql.append(", '").append(dataMap2.get(key)).append("'");
-            }
+                            for (String key : dataMap2.keySet()) {
+                                keySql.append(", ").append(key);
+                                valSql.append(", '").append(dataMap2.get(key)).append("'");
+                            }
 
-            sql.append("(").append(keySql).append(")").append(" values(").append(valSql).append(")");
+                            sql.append("(").append(keySql).append(")").append(" values(").append(valSql).append(")");
 
-            //新增数据
-            try {
-                this.jdbcTemplate.execute(sql.toString());
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
+                            //新增数据
+                            try {
+                                this.jdbcTemplate.execute(sql.toString());
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
 
-        //获取文件题名
-        String fileTitleNames = this.getFileTitleNames(firstNodeId);
+                        //获取文件题名
+                        String fileTitleNames = this.getFileTitleNames(firstNodeId);
 
-        try {
-            //新增或修改首件记录
-            return this.informationQueryClient.saveOrUpdateInformationQueryData(firstNodeId, table.getPKeyId() + "", firstId, StringUtils.isNotEmpty(fileTitleNames) ? fileTitleNames : "首件文件名称为空", Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "true", sourceUrl, pdfUrl, firstFileName, linkProcessList);
-        } catch (Exception e) {
-            e.printStackTrace();
+                        try {
+                            //新增或修改首件记录
+                            return this.informationQueryClient.saveOrUpdateInformationQueryData(firstNodeId, contractNode.getPKeyId() + "", firstId, StringUtils.isNotEmpty(fileTitleNames) ? fileTitleNames : "首件文件名称为空", Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "true", sourceUrl, pdfUrl, firstFileName, linkProcessList);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            }
         }
         return null;
     }
@@ -667,7 +655,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         WbsTreePrivate firstNode = wbsTreePrivates.stream().filter(f -> f.getNodeType().equals(111)).findAny().orElse(null);
 
-        List<WbsTreePrivate> collect1 = wbsTreePrivates.stream().filter(f -> f.getNodeType().equals(1)).collect(Collectors.toList());
+        List<WbsTreePrivate> collect1 = wbsTreePrivates.stream().filter(f -> f.getNodeType().equals(1) && f.getParentId() != 0L).collect(Collectors.toList());
 
         List<WbsTreePrivate> collect4 = wbsTreePrivates.stream().filter(f -> f.getNodeType().equals(4)).collect(Collectors.toList());
 
@@ -678,7 +666,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 assert firstNode != null;
                 if (firstNode.getAncestors().contains(obj1.getId().toString())) {
                     fileTitleNames.append(obj1.getNodeName());
-                    break;
                 }
             }
 
@@ -697,8 +684,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         return "";
     }
 
+
+    public TransactionStatus beginTransaction(DataSourceTransactionManager transactionManager){
+        DefaultTransactionDefinition def = new DefaultTransactionDefinition();//事务定义类
+        def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
+        TransactionStatus status = transactionManager.getTransaction(def);// 返回事务对象
+        return status;
+    }
+
+
     @Override
-    @Transactional
     public R saveOrUpdateInfo(List<TableInfo> tableInfoList) {
 
         if (ListUtils.isNotEmpty(tableInfoList)) {
@@ -715,7 +710,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     String tabName = wbsTreeContract.getInitTableName();
                     // 判读修改还是 添加
                     String delSql = "delete from " + tabName + " where p_key_id=" + tableInfo.getPkeyId();
-                    jdbcTemplate.execute(delSql);
+
 
                     String sqlInfo = "";
                     LinkedHashMap<String, String> dataMap2 = tableInfo.getDataMap();
@@ -746,7 +741,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     updateWrapper.in("p_key_id", tableInfo.getPkeyId());
                     updateWrapper.set("is_tab_pdf", 2);
                     wbsTreeContractService.update(updateWrapper);
-                    jdbcTemplate.execute(sqlInfo);
+
+                    TransactionStatus transactionStatus = this.beginTransaction(transactionManager1);
+                    try {
+                        jdbcTemplate.execute(delSql);
+                        jdbcTemplate.execute(sqlInfo);
+                        transactionManager1.commit(transactionStatus);
+                    }catch (Exception e){
+                        transactionManager1.rollback(transactionStatus);
+                        e.printStackTrace();
+                    }
                 }
 
                 //获取节点
@@ -942,7 +946,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             for (String key : mysqlData.keySet()) {
                 String tabVal = mysqlData.get(key) + "";
                 // 时间段处理
-                if (StringUtils.isNotEmpty(tabVal) && !tabVal.equals("null")) {
+                if (StringUtils.isNotEmpty(tabVal) && tabVal.indexOf("null")<0) {
                     if (tabVal.indexOf("T") >= 0 && tabVal.indexOf(".000Z]") >= 0) {
                         String[] tabData = tabVal.split("_\\^_");
 
@@ -1026,7 +1030,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     @Override
     public R getBussPdfInfo(Long pkeyId) throws Exception {
 
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path = "/Users/hongchuangyanfa/Desktop/";//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
 
         WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
                 .eq(WbsTreeContract::getPKeyId, pkeyId));
@@ -1055,20 +1060,63 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         Map<String, Object> DataInfo = (Map<String, Object>) getBussDataInfo(pkeyId).getData();
 
         // 获取excel流 和 html流
-        Workbook wb = new Workbook();
-        wb.loadFromMHtml(CommonUtil.getOSSInputStream(excelTab.getFileUrl()));
+        InputStream exceInp = CommonUtil.getOSSInputStream(excelTab.getFileUrl());
+        org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(exceInp);
+
         //获取工作表
-        Worksheet sheet = wb.getWorksheets().get(0);
+        Sheet sheet = workbook.getSheetAt(0);
+        sheet.setForceFormulaRecalculation(true);
+
         // 标题添加
         ProjectInfo projectInfo = projectInfoService.getById(wbsTreeContract.getProjectId());
-        CellRange[] columns = sheet.getMergedCells();
-        for (int i = 0; i < columns.length; i++) {
-            CellRange cellRange = columns[i];
-            System.out.println(cellRange.getStyle().getFont().getSize());
-            if (cellRange.getStyle().getFont().getSize() >= 14) {
-                cellRange.setText(projectInfo.getProjectName());
-                cellRange.getStyle().getFont().setSize(20);
-                break;
+
+        int all = sheet.getRow(0).getLastCellNum();
+        int mergedCellCnt = sheet.getNumMergedRegions();
+        List<Map<String,Integer>> titleList = new ArrayList<>();
+        for (int i = 0; i < mergedCellCnt-1; i++) {
+            CellRangeAddress mergedCell = sheet.getMergedRegion(i);
+            int xx =mergedCell.getNumberOfCells();
+            if(xx==all){
+                int fisRow = mergedCell.getFirstRow();
+                int firsrCol = mergedCell.getFirstColumn();
+                Cell cell = sheet.getRow(fisRow).getCell(firsrCol);
+                short fontIndex = cell.getCellStyle().getFontIndex();
+                Font fontAt = workbook.getFontAt(fontIndex);
+                short fontHeightInPoints = fontAt.getFontHeightInPoints();
+                if(fontHeightInPoints>=14){
+                    Map<String,Integer> titleMap = new HashMap<>();
+                    titleMap.put("index",i);
+                    titleMap.put("x",firsrCol);
+                    titleMap.put("y",fisRow);
+                    String data = cell.getStringCellValue();
+                    if(StringUtils.isNotEmpty(data)){
+                        titleMap.put("val",2);
+                    }else{
+                        titleMap.put("val",1);
+                    }
+                    titleList.add(titleMap);
+                }
+            }
+        }
+
+        //添加标题
+        System.out.println(titleList.size());
+        if(titleList!=null){
+            if(titleList.size()==1){
+                Map<String,Integer> titData = titleList.get(0);
+                if(titData.get("val")==1){
+                    Cell cell = sheet.getRow(titData.get("y")).getCell(titData.get("x"));
+                    cell.setCellValue(projectInfo.getProjectName());
+                }
+            }else if(titleList.size()>=2){
+                for(int i=0;i<titleList.size();i++){
+                    Map<String,Integer> titData = titleList.get(i);
+                    if(titData.get("val")==2){
+                        Map<String,Integer> titData2 = titleList.get(i-1);
+                        Cell cell = sheet.getRow(titData2.get("y")).getCell(titData2.get("x"));
+                        cell.setCellValue(projectInfo.getProjectName());
+                    }
+                }
             }
         }
 
@@ -1092,10 +1140,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
                             if (data.html().indexOf("x1") >= 0 && data.html().indexOf("y1") >= 0) {
                                 int x1 = 0;
+                                int x2 = 0;
                                 int y1 = 0;
+                                int y2 = 0;
 
                                 if (data.html().indexOf("el-tooltip") >= 0) {
                                     x1 = Integer.parseInt(data.children().get(0).children().get(0).attr("x1"));
+                                    x2 = Integer.parseInt(data.children().get(0).children().get(0).attr("x2"));
                                     y1 = Integer.parseInt(data.children().get(0).children().get(0).attr("y1"));
                                 } else {
                                     x1 = Integer.parseInt(data.children().get(0).attr("x1"));
@@ -1108,7 +1159,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 if (myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) {
                                     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
                                     sdf.setTimeZone(TimeZone.getTimeZone("GTM+8"));
-                                    SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM-dd");
+                                    SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM月dd日");
                                     if (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0) {
 
                                         myData = myData.replace("[", "").replace("]", "").replaceAll("'", "");
@@ -1131,58 +1182,37 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 //https:bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220819/b53cb6700db369381e3b03d7737bcdec.jpg__16_1
                                 if (myData.indexOf("https") >= 0 && myData.indexOf("aliyuncs") >= 0) {
 
-                                    BufferedImage image = ImageIO.read(CommonUtil.getOSSInputStream(myData));
-
-                                    int colspan = data.attr("COLSPAN").equals("") ? 0 : Integer.parseInt(data.attr("COLSPAN"));
-                                    int rowspan = data.attr("ROWSPAN").equals("") ? 0 : Integer.parseInt(data.attr("ROWSPAN"));
-                                    int picHeight = 0;
-                                    int picWidth = 0;
-
-                                    if (rowspan == 0) {
-                                        String dataInfo = trs.get(y1).attr("height");
-                                        if (StringUtils.isEmpty(dataInfo)) {
-                                            Element firstTd = trs.get(y1 - 1).children().get(0);
-                                            String[] heg = firstTd.attr("style").split(";");
-                                            for (String str : heg) {
-                                                if (str.indexOf("height:") >= 0) {
-                                                    picHeight = Integer.parseInt(str.split(":")[1].replaceAll("px", ""));
-                                                }
-                                            }
-                                        } else {
-                                            picHeight = Integer.parseInt(dataInfo);
-                                        }
-                                    } else {
-                                        for (int i = y1; i <= (y1 + rowspan); i++) { // 跨列处理
-                                            String dataInfo = trs.get(i).attr("height");
-                                            if (StringUtils.isNotEmpty(dataInfo)) {
-                                                picHeight += Integer.parseInt(dataInfo);
-                                            }
-                                        }
-                                    }
-
-                                    if (colspan >= 1) {
-                                        for (int i = x1 - 1; i < x1 + colspan - 1; i++) {
-                                            String dataInfo = cols.get(i).attr("width").replaceAll("px", "");
-                                            if (StringUtils.isNotEmpty(dataInfo)) {
-                                                picWidth += Integer.parseInt(dataInfo);
-                                            }
-                                        }
-                                    }
+                                    InputStream imageIn = CommonUtil.getOSSInputStream(myData);
+                                    byte[] bytes = IOUtils.toByteArray(imageIn);
+                                    // 这里根据实际需求选择图片类型
+                                    int pictureIdx = workbook.addPicture(bytes,6);
+
+                                    CreationHelper helper = workbook.getCreationHelper();
+                                    ClientAnchor anchor = helper.createClientAnchor();
+                                    anchor.setCol1(x1); // param1是列号
+                                    anchor.setCol2(x2);
+                                    anchor.setRow1(y1); // param2是行号
+                                    anchor.setRow2(y2); // param2是行号
+                                    //
+                                    Drawing drawing = sheet.createDrawingPatriarch();
+                                    anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
+                                    // 插入图片
+                                    Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
+                                    pict.resize(1,1);
+                                    FileUtils.imageOrientation(sheet, anchor, new DataVO(x1-1, y1-1) );
+
+                                } else if(myData.equals("1") && data.html().indexOf("hc-form-checkbox-group")>=0){
+                                    Cell cell = sheet.getRow(y1-1).getCell(x1-1);
+                                    String exceVal = cell.getStringCellValue().replaceAll(" ","");
+                                    short fontIndex = cell.getCellStyle().getFontIndex();
+                                    Font fontAt = workbook.getFontAt(fontIndex);
+                                    fontAt.setFontName("EUDC");
+                                    cell.setCellValue(exceVal.replace("□","\u2611"));
+                                }else {
+                                     Cell cell = sheet.getRow(y1-1).getCell(x1-1);
+                                     cell.setCellValue(myData);
 
-                                    ExcelPicture pic = sheet.getPictures().add(y1, x1, image);
-                                    pic.setAutoSize(true);
-                                    pic.setWidth(picWidth - 10);
 
-                                    System.out.println(sheet.get(y1, x1).getRowHeight());
-                                    System.out.println(sheet.get(y1, x1).getRows());
-                                    pic.setHeight(picHeight);
-                                    pic.setLeft(5);
-                                } else {
-                                    CellRange cellRange = sheet.getCellRange(y1, x1);
-                                    cellRange.getCellStyle().getExcelFont().setFontName("EUDC");
-                                    cellRange.setText(myData);
-                                    System.out.println(cellRange.getStyle().getFont().getFontName());
-                                    System.out.println("后" + cellRange.getText());
                                 }
                             }
                         }
@@ -1207,16 +1237,27 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         }
                         int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
 
-                        final CellRange cellRange = sheet.getCellRange(y1, x1);
-                        cellRange.setText(e.getId() + "");
-                        cellRange.getCellStyle().getFont().setColor(Color.white);
-
+                        Cell cell = sheet.getRow(y1-1).getCell(x1-1);
+                        cell.setCellValue(e.getId() + "");
+                        short fontIndex = cell.getCellStyle().getFontIndex();
+                        Font oldfontAt = workbook.getFontAt(fontIndex);
+
+                        Font redFont = workbook.createFont();
+                        redFont.setColor(IndexedColors.WHITE.getIndex());
+                        redFont.setFontHeightInPoints(oldfontAt.getFontHeightInPoints());
+                        redFont.setFontName(oldfontAt.getFontName());
+                        CellStyle cellStyle = workbook.createCellStyle();
+                        cellStyle.setFont(redFont);
+                        cell.setCellStyle(cellStyle);
                     }
                 }
             }
         }
 
-        wb.saveToFile(excelPath, ExcelVersion.Version2010);
+      //  wb.saveToFile(excelPath, ExcelVersion.Version2010);
+        //输出流
+        FileOutputStream outputStream = new FileOutputStream(excelPath);
+        workbook.write(outputStream);
         FileUtils.excelToPdf(excelPath, pdfPath);
         BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
         //
@@ -1258,13 +1299,21 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         updateWrapper.in("p_key_id", pkeyId + "");
         updateWrapper.set("pdf_url", bladeFile2.getLink());
         wbsTreeContractService.update(updateWrapper);
-        wb.dispose();
+
+        if (outputStream != null) {
+            IoUtil.closeQuietly(outputStream);
+        }
+        if (exceInp != null) {
+            IoUtil.closeQuietly(exceInp);
+        }
+
         return R.data(bladeFile2.getLink());
     }
 
     @Override
     public void getBussPdfs(String nodeId, String classify, String contractId, String projectId) throws Exception {
-        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        //String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String file_path = "/Users/hongchuangyanfa/Desktop/" ;//ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         // 获取有权限的节点信息
         List<AppWbsTreeContractVO> wbsTreeContractList = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
         List<String> data = new ArrayList<>();
@@ -1298,6 +1347,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
 
+
+
+
     /**
      * 试验 获取填报信息
      */
@@ -1494,6 +1546,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 if (data.html().contains("el-tooltip")) {
                                     x1 = Integer.parseInt(data.children().get(0).children().get(0).attr("x1"));
                                     y1 = Integer.parseInt(data.children().get(0).children().get(0).attr("y1"));
+
                                 } else {
                                     x1 = Integer.parseInt(data.children().get(0).attr("x1"));
                                     y1 = Integer.parseInt(data.children().get(0).attr("y1"));

+ 51 - 16
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -5,15 +5,19 @@ import com.aspose.cells.Workbook;
 import com.itextpdf.text.Document;
 import com.itextpdf.text.pdf.PdfCopy;
 import com.itextpdf.text.pdf.PdfReader;
+import com.spire.xls.*;
 import com.sun.image.codec.jpeg.JPEGCodec;
 import com.sun.image.codec.jpeg.JPEGImageEncoder;
 import org.apache.commons.lang.StringUtils;
-import org.apache.poi.ss.usermodel.ClientAnchor;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.CellStyle;
 import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.util.IOUtils;
 import org.apache.poi.util.Units;
 import org.springblade.common.utils.CommonUtil;
+import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.common.vo.DataVO;
 import org.springblade.core.tool.utils.FileUtil;
 import org.springblade.core.tool.utils.IoUtil;
@@ -25,8 +29,7 @@ import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URL;
 import java.net.URLEncoder;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
@@ -297,20 +300,52 @@ public class FileUtils {
 
 
 
-/*    public static void main(String[] args) throws Exception {
-        String downloadUri="http://192.168.0.110:6831/cache/files/data/b6b30b1337cbdc522810_1914/output.xlsx/output.xlsx?md5=vJFs5dZlSpopqwWVH1PV7w&amp;expires=1675247021&amp;filename=output.xlsx";
-        downloadUri = downloadUri.replaceAll("amp;","");
-        URL url = new URL(downloadUri);
-        java.net.HttpURLConnection connection = (java.net.HttpURLConnection) url.openConnection();
-        InputStream stream = connection.getInputStream();
+    public static void main11(String[] args) throws Exception {
 
-        String excelUrl ="/Users/hongchuangyanfa/Desktop/pdf/1615164421657591808.xlsx";
+        String excelPath="/Users/hongchuangyanfa/Desktop/pdf/1625671101419880450.xlsx";
+        File file_out = ResourceUtil.getFile("/Users/hongchuangyanfa/Desktop/pdf/123.xlsx");
+        InputStream exceInp = new FileInputStream(file_out);//CommonUtil.getOSSInputStream("https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20230130/2d98b5a4d6270d5d4f98847216c17888.xlsx");
+        final org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(exceInp);
+        Sheet sheet = workbook.getSheetAt(0);
+        sheet.setForceFormulaRecalculation(true);
+        // fileName为图片完整路径,例:C:\images\EDG.jpg
+        InputStream ossInputStream = CommonUtil.getOSSInputStream("https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20230215/78c0938ed110230f3907461228e6fb45.jpg");
+        byte[] bytes = IOUtils.toByteArray(ossInputStream);
 
+        // 这里根据实际需求选择图片类型
+        int pictureIdx = workbook.addPicture(bytes,6);
 
-      //  String htmlString = IoUtil.readToString(stream);
-        File writefile = new File(excelUrl);
-        FileUtil.toFile(stream,writefile);
+        CreationHelper helper = workbook.getCreationHelper();
+        ClientAnchor anchor = helper.createClientAnchor();
+        anchor.setCol1(0); // param1是列号
+        anchor.setCol2(7);
+        anchor.setRow1(9); // param2是行号
+        anchor.setRow2(30); // param2是行号
 
+        Drawing drawing = sheet.createDrawingPatriarch();
+        anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
+        // 插入图片
+        Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
+        pict.resize(1,1);
+        FileUtils.imageOrientation(sheet, anchor, new DataVO(0, 9) );
+        FileOutputStream outputStream = new FileOutputStream(excelPath);
+        //生成一份新的excel
 
-    }*/
+        Cell cell = sheet.getRow(6).getCell(10);
+        cell.setCellValue("2023年02-08-2023年02-09");
+
+
+
+        workbook.write(outputStream);
+        if (outputStream != null) {
+            IoUtil.closeQuietly(outputStream);
+        }
+        if (exceInp != null) {
+            IoUtil.closeQuietly(exceInp);
+        }
+        if (workbook != null) {
+            IoUtil.closeQuietly(workbook);
+        }
+
+    }
 }

+ 49 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/wrapper/ArchiveTreeContractWrapper.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.ArchiveTreeContract;
+import org.springblade.manager.vo.ArchiveTreeContractVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author 00
+ * @since 2023-02-18
+ */
+public class ArchiveTreeContractWrapper extends BaseEntityWrapper<ArchiveTreeContract, ArchiveTreeContractVO>  {
+
+	public static ArchiveTreeContractWrapper build() {
+		return new ArchiveTreeContractWrapper();
+ 	}
+
+	@Override
+	public ArchiveTreeContractVO entityVO(ArchiveTreeContract archiveTreeContract) {
+		ArchiveTreeContractVO archiveTreeContractVO = Objects.requireNonNull(BeanUtil.copy(archiveTreeContract, ArchiveTreeContractVO.class));
+
+		//User createUser = UserCache.getUser(archiveTreeContract.getCreateUser());
+		//User updateUser = UserCache.getUser(archiveTreeContract.getUpdateUser());
+		//archiveTreeContractVO.setCreateUserName(createUser.getName());
+		//archiveTreeContractVO.setUpdateUserName(updateUser.getName());
+
+		return archiveTreeContractVO;
+	}
+
+}

+ 10 - 0
blade-service/blade-manager/src/main/java/sql/archivetreecontract.menu.sql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1626796893393793025', 1123598815738675201, 'archivetreecontract', '档案系统-manager', 'menu', '/manager/archivetreecontract', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1626796893393793026', '1626796893393793025', 'archivetreecontract_add', '新增', 'add', '/manager/archivetreecontract/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1626796893393793027', '1626796893393793025', 'archivetreecontract_edit', '修改', 'edit', '/manager/archivetreecontract/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1626796893393793028', '1626796893393793025', 'archivetreecontract_delete', '删除', 'delete', '/api/blade-manager/archivetreecontract/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1626796893393793029', '1626796893393793025', 'archivetreecontract_view', '查看', 'view', '/manager/archivetreecontract/view', 'file-text', 4, 2, 2, 1, NULL, 0);