Prechádzať zdrojové kódy

Merge branch 'dev' of http://219.151.181.73:3000/zhuwei/bladex into dev

laibulaizheli 1 mesiac pred
rodič
commit
444ec3ae6d
100 zmenil súbory, kde vykonal 5508 pridanie a 301 odobranie
  1. 0 1
      blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java
  2. 2 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java
  3. 53 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO.java
  4. 11 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO1.java
  5. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialFileSubmitDTO.java
  6. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSelfInspectionRecordPageDTO.java
  7. 85 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO.java
  8. 48 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO1.java
  9. 69 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialClassificationTree.java
  10. 59 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyAccessories.java
  11. 149 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyFinishTestReport.java
  12. 54 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyTestType.java
  13. 285 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyThirdReport.java
  14. 106 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSystemDocking.java
  15. 24 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/TrialCyAccessoriesClient.java
  16. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/EntrustInfoVO.java
  17. 5 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/InformationQueryVO.java
  18. 64 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/NeiYeLedgerVO.java
  19. 9 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/NeiYeQueryVO.java
  20. 36 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/QueryProcessDataVO.java
  21. 13 3
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskApprovalVO.java
  22. 20 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/ThirdReportVo.java
  23. 50 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialClassificationTreeVO.java
  24. 32 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialCyThirdReportQueryVo.java
  25. 84 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSystemDockingVO.java
  26. 50 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/BatchAddNumbersDTO.java
  27. 7 4
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TableFile.java
  28. 67 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTreeContractExtend.java
  29. 61 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTreeContractOldHtml.java
  30. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTreePrivate.java
  31. 18 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/INodeBaseInfoServiceClient.java
  32. 5 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsParamClient.java
  33. 7 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java
  34. 25 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractOldHtmlClient.java
  35. 84 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/APIWbsContractSubdivisionVo.java
  36. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/AppWbsTreeContractVO.java
  37. 2 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ExceTabTreVO.java
  38. 2 1
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreeContractLazyVO.java
  39. 6 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreeContractTreeAllVO.java
  40. 8 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreePrivateVO.java
  41. 6 3
      blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileController.java
  42. 1 1
      blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.java
  43. 4 0
      blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml
  44. 28 25
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java
  45. 1 0
      blade-service/blade-business/pom.xml
  46. 66 14
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  47. 2 2
      blade-service/blade-business/src/main/java/org/springblade/business/controller/NeiWaiYeProgressController.java
  48. 94 10
      blade-service/blade-business/src/main/java/org/springblade/business/controller/NeiYeController.java
  49. 6 3
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java
  50. 207 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialClassificationTreeController.java
  51. 100 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialCyController.java
  52. 166 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialSystemDockingController.java
  53. 118 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/TrialCyAccessoriesClientImpl.java
  54. 3 3
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/WbsTreeContractStatisticsClientImpl.java
  55. 3 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/EntrustInfoMapper.xml
  56. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/ImageClassificationFileMapper.xml
  57. 2 2
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.java
  58. 32 22
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml
  59. 50 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.java
  60. 45 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.xml
  61. 27 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyAccessoriesMapper.java
  62. 28 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyAccessoriesMapper.xml
  63. 23 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyFinishTestReportMapper.java
  64. 37 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyFinishTestReportMapper.xml
  65. 23 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyTestTypeMapper.java
  66. 24 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyTestTypeMapper.xml
  67. 24 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyThirdReportMapper.java
  68. 36 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyThirdReportMapper.xml
  69. 4 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.java
  70. 7 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.xml
  71. 43 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.java
  72. 37 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.xml
  73. 704 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/ChenYuTestScheduled.java
  74. 462 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/ChenYuTestScheduled01.java
  75. 57 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/GetFinishTestReport.java
  76. 57 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/GetThirdReport.java
  77. 25 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/Result.java
  78. 25 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/ResultPost.java
  79. 28 0
      blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/ThirdLogin.java
  80. 2 2
      blade-service/blade-business/src/main/java/org/springblade/business/service/IInformationQueryService.java
  81. 54 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialClassificationTreeService.java
  82. 50 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialSystemDockingService.java
  83. 14 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyAccessoriesService.java
  84. 19 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyFinishTestReportService.java
  85. 25 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyService.java
  86. 16 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyTestTypeService.java
  87. 18 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyThirdReportService.java
  88. 4 4
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java
  89. 12 12
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java
  90. 70 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialClassificationTreeServiceImpl.java
  91. 131 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyAccessoriesServiceImpl.java
  92. 29 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyFinishTestReportServiceImpl.java
  93. 86 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyServiceImpl.java
  94. 28 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyTestTypeServiceImpl.java
  95. 29 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyThirdReportServiceImpl.java
  96. 218 183
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java
  97. 166 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSystemDockingServiceImpl.java
  98. 136 0
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java
  99. 1 1
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/Archive2Controller.java
  100. 181 0
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/testTaskInfo.java

+ 0 - 1
blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java

@@ -66,7 +66,6 @@ public class AuthProvider {
         DEFAULT_SKIP_URL.add("/getPk"); //成渝第三方登录获取公钥
         DEFAULT_SKIP_URL.add("/getQualityTestingToken"); //成渝第三方登录获取质检系统tokne
         DEFAULT_SKIP_URL.add("/getArchiveToken"); //成渝第三方登录获取档案系统tokne
-
     }
 
     /**

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

@@ -91,13 +91,13 @@ public class OssBuilder {
 		String tenantId = AuthUtil.getTenantId();
 		Oss oss = getOss(tenantId, code);
         String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
-        if(SystemUtils.isMacOs()||SystemUtils.isWindows()){
+       /* if(SystemUtils.isMacOs()||SystemUtils.isWindows()){
             if("20".equals(sys_isonline)){
                 oss.setEndpoint("http://183.247.216.148:9000/");
             }else {
                 oss.setEndpoint("https://xinan1.zos.ctyun.cn");
             }
-        }
+        }*/
 		//oss.setEndpoint("https://xinan1.zos.ctyun.cn");
 		System.out.println("oss111="+oss.getEndpoint());
 		Oss ossCached = ossPool.get(tenantId);

+ 53 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO.java

@@ -0,0 +1,53 @@
+/*
+ *      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.business.dto;
+
+import org.springblade.business.entity.TrialClassificationTree;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 德飞试验系统检测分类树数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+public class TrialClassificationTreeDTO {
+	private static final long serialVersionUID = 1L;
+
+
+	private Long id;
+
+	/**
+	 * 父级ID
+	 */
+	private Long parentId;
+
+	/**
+	 * 项目ID
+	 */
+
+	private Long projectId;
+
+	/**
+	 * 分类名称
+	 */
+	private String classificationName;
+
+
+}

+ 11 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO1.java

@@ -0,0 +1,11 @@
+package org.springblade.business.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class TrialClassificationTreeDTO1 {
+   private List<TrialClassificationTreeDTO> list;
+   private Integer groupType;
+}

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialFileSubmitDTO.java

@@ -24,4 +24,7 @@ public class TrialFileSubmitDTO implements Serializable {
     @ApiModelProperty(value = "合同段id")
     private String contractId;
 
+    @ApiModelProperty(value = "附件类型(table_file_type 字典数据)")
+    private String tableFileType;
+
 }

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSelfInspectionRecordPageDTO.java

@@ -27,4 +27,7 @@ public class TrialSelfInspectionRecordPageDTO extends TrialSelfInspectionRecord
 
     @ApiModelProperty(value = "排序类型, 1 记录/报告编号升序, 2 记录/报告编号降序, 3 规格型号升序, 4 规格型号降序")
     private String sortType;
+
+    @ApiModelProperty("类型:0-施工,1-监理,2-业主")
+    private Integer reportType;
 }

+ 85 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO.java

@@ -0,0 +1,85 @@
+/*
+ *      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.business.dto;
+
+import org.springblade.business.entity.TrialSystemDocking;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 德飞试验系统对接表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+public class TrialSystemDockingDTO {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 德飞数据ID
+	 */
+	private Long dataId;
+
+	/**
+	 * 项目Id
+	 */
+	@NotNull(message = "projectId 不能为空")
+	private Long projectId;
+	/**
+	 * 报告文件名称
+	 */
+	private String reportName;
+	/**
+	 * 报告编号
+	 */
+	private String reportNumber;
+	/**
+	 * 单位名称
+	 */
+	private String unitName;
+	/**
+	 * 所属检测分类id
+	 */
+	@NotNull(message = "projectId 不能为空")
+	private Long classificationId;
+	/**
+	 * 规格型号
+	 */
+	private String specification;
+	/**
+	 * 报告类型(1原材检测报告,2现场检测报告,3外委报告,4第三方检测报告)
+	 */
+	private Integer reportType;
+	/**
+	 * 工程用途及部位
+	 */
+	private String purposeLocation;
+	/**
+	 * 报告日期(20250822)
+	 */
+	private String reportDate;
+	/**
+	 * 原文件地址
+	 */
+	private String fileUrl;
+
+	private String personInCharge;
+
+}

+ 48 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO1.java

@@ -0,0 +1,48 @@
+package org.springblade.business.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class TrialSystemDockingDTO1 {
+    private static final long serialVersionUID = 1L;
+    /**
+     * 主键
+     */
+    private Long id;
+    /**
+     * 报告文件名称
+     */
+    private String reportName;
+    /**
+     * 报告编号
+     */
+    private String reportNumber;
+    /**
+     * 单位名称
+     */
+    private String unitName;
+    /**
+     * 规格型号
+     */
+    private String specification;
+    /**
+     * 报告类型(1原材检测报告,2现场检测报告,3外委报告,4第三方检测报告)
+     */
+    private Integer reportType;
+    /**
+     * 工程用途及部位
+     */
+    private String purposeLocation;
+    /**
+     * 报告日期(20250822)
+     */
+    private String reportDate;
+    /**
+     * 原文件地址
+     */
+    private String fileUrl;
+
+    private String personInCharge;
+}

+ 69 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialClassificationTree.java

@@ -0,0 +1,69 @@
+/*
+ *      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.business.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 德飞试验系统检测分类树实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+@TableName("u_trial_classification_tree")
+public class TrialClassificationTree extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+	private Long id;
+
+
+
+	private Long projectId;
+	/**
+	* 父级ID
+	*/
+		private Long parentId;
+	/**
+	 * 分类祖级
+	 */
+	private String classificationAncestors;
+	/**
+	* 分类名称
+	*/
+		private String classificationName;
+
+		/**
+		 * 分组类型 1是德飞厂商
+		 */
+		private Integer groupType;
+
+	/**
+	 * 是否删除
+ 	 */
+
+	private Integer isDeleted;
+
+}

+ 59 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyAccessories.java

@@ -0,0 +1,59 @@
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 成渝-附件信息
+ * @author LHB
+ * @TableName u_trial_cy_accessories
+ */
+@TableName(value ="u_trial_cy_accessories")
+@Data
+public class TrialCyAccessories {
+    /**
+     * 主键
+     */
+    @ApiModelProperty("唯一id")
+    @TableId(type = IdType.INPUT)
+    private Long id;
+
+    /**
+     * 报告id,已签章的报告/是第三方检测报告/外委检测报告/上传报告
+     */
+    @ApiModelProperty("报告id,已签章的报告/ 是第三方检测报告/ 外委检测报告/ 上传报告")
+    private Long reportId;
+
+    /**
+     * 成渝接口返回的id
+     */
+    @ApiModelProperty("成渝接口返回的")
+    @TableField("acc_id")
+    private String accId;
+
+    /**
+     * 类型名称
+     */
+
+    @ApiModelProperty("类型名称")
+    @TableField("acc_type")
+    private String accType;
+
+    /**
+     * 文件名称
+     */
+    @ApiModelProperty("文件名称")
+    @TableField("file_name")
+    private String fileName;
+
+    /**
+     * 文件路径
+     */
+    @ApiModelProperty("文件路径")
+    @TableField("file_path")
+    private String filePath;
+}

+ 149 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyFinishTestReport.java

@@ -0,0 +1,149 @@
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 已完成(已签章完成)的检测报告接受对象
+ *
+ * @author LHB
+ */
+@TableName("u_trial_cy_finish_test_report")
+@Data
+public class TrialCyFinishTestReport {
+
+    @TableId(type = IdType.INPUT)
+    @ApiModelProperty("唯一id")
+    private Long id;
+    /**
+     * 合同ID
+     */
+    @TableField("contract_id")
+    @ApiModelProperty("合同ID")
+    private Long contractId;
+    /**
+     * 任务ID
+     */
+    @ApiModelProperty("任务ID")
+    private Integer taskId;
+    /**
+     * 合同段编码
+     */
+    @ApiModelProperty("合同段编码")
+    private String contractNumber;
+    /**
+     * 单位类型
+     * 0 施工
+     * 1 监理
+     * 2 中试
+     */
+    @ApiModelProperty("单位类型 0 施工 1 监理 2 中试")
+    private Integer cs;
+    /**
+     * 记录编号
+     */
+    @ApiModelProperty("记录编号")
+    private String number;
+    /**
+     * 报告编号
+     */
+    @ApiModelProperty("报告编号")
+    private String reportNumber;
+    /**
+     * 试验项目名称
+     */
+    @ApiModelProperty("试验项目名称")
+    private String name;
+    /**
+     * 试验工序名称
+     */
+    @ApiModelProperty("试验工序名称")
+    private String processName;
+    /**
+     * 取样地点
+     */
+    @ApiModelProperty("取样地点")
+    @TableField("sampling_place")
+    private String samplingPlace;
+    /**
+     * 样品信息 同试验检测查询界面
+     */
+    @ApiModelProperty("样品信息 同试验检测查询界面")
+    @TableField("sample_info")
+    private String sampleInfo;
+    /**
+     * 类型规格 规格型号
+     */
+    @ApiModelProperty("类型规格 规格型号")
+    @TableField("specification")
+    private String specification;
+    /**
+     * 合格证上传情况 已上传、未上传
+     */
+    @ApiModelProperty("合格证上传情况 已上传、未上传")
+    @TableField("hash_gz")
+    private String hasHGZ;
+    /**
+     * 所检参数信息 同试验检测查询界面
+     */
+    @ApiModelProperty("所检参数信息 同试验检测查询界面")
+    @TableField("test_param_info")
+    private String testParamInfo;
+    /**
+     * 报告时间
+     */
+    @ApiModelProperty("报告时间")
+    private String reportDate;
+    /**
+     * 是否合格 True 合格,False不合格
+     */
+    @ApiModelProperty("是否合格 1 合格,0 不合格")
+    private String experimentResult;
+    /**
+     * 报告人
+     */
+    @ApiModelProperty("报告人")
+    @TableField("user_name")
+    private String username;
+    /**
+     * 使用部位
+     */
+    @ApiModelProperty("使用部位")
+    private String position;
+    /**
+     * 报告文件路径
+     */
+    @ApiModelProperty("报告文件路径")
+    @TableField("report_file_path")
+    private String reportFilePath;
+    /**
+     * 记录文件路径
+     */
+    @ApiModelProperty("记录文件路径")
+    @TableField("record_file_path")
+    private String recordFilePath;
+    /**
+     * 试验树id
+     */
+    @ApiModelProperty("实验树Id")
+    @TableField("exam_name_info_id")
+    public String examNameInfoId;
+    /**
+     * 试验树id
+     */
+    @ApiModelProperty("组装文件(报告+记录+委托单)")
+    @TableField("assemble_file")
+    public String assembleFile;
+    /**
+     * 附件
+     */
+    @ApiModelProperty("附件")
+    @TableField(exist = false)
+    private List<TrialCyAccessories> accessories;
+}

+ 54 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyTestType.java

@@ -0,0 +1,54 @@
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 获取检测项目树(包括自建试验、外委、第三方、上传报告) 接受对象
+ *
+ * @author LHB
+ */
+@TableName("u_trial_cy_test_type")
+@Data
+public class TrialCyTestType {
+    @TableId(type = IdType.INPUT)
+    @ApiModelProperty("唯一id")
+    private Long pKeyId;
+    /**
+     * 项目id
+     */
+    @ApiModelProperty("项目id")
+    private Long projectId;
+    /**
+     * ID唯一标识
+     */
+    @TableField("id")
+    @ApiModelProperty("成渝的id")
+    private String id;
+    /**
+     * 名称
+     */
+    @TableField("name")
+    @ApiModelProperty("名称")
+    private String name;
+    /**
+     * 父级ID
+     */
+    @TableField("father_id")
+    @ApiModelProperty("父级id")
+    private String fatherId;
+    /**
+     * 顺序号
+     */
+    @TableField("order_index")
+    @ApiModelProperty("顺序号")
+    private String orderIndex;
+
+    @TableField(exist = false)
+    @ApiModelProperty("判断是否有子节点")
+    private Boolean hasChildren;
+}

+ 285 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialCyThirdReport.java

@@ -0,0 +1,285 @@
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 获取已上传的外委检测报告/第三方检测报告/上传报告 接受对象
+ *
+ * @author LHB
+ */
+@TableName("u_trial_cy_third_report")
+@Data
+public class TrialCyThirdReport {
+    @ApiModelProperty("唯一id")
+    @TableId(type = IdType.INPUT)
+    private Long pKeyId;
+    /**
+     * 合同id
+     */
+    @ApiModelProperty("合同id")
+    private Long contractId;
+    /**
+     * ID
+     */
+    @ApiModelProperty("成渝的id")
+    @TableField("id")
+    public String id;
+    /**
+     * 报告类型(0:外委检测,1:第三方检测,2:扫描上传报告)
+     */
+    @ApiModelProperty("报告类型(0:外委检测,1:第三方检测,2:扫描上传报告)")
+    public Integer thirdType;
+    /**
+     * 委托编号
+     */
+    @ApiModelProperty("委托编号")
+    @TableField("consign_no")
+    public String consignNo;
+    /**
+     * 报告编号
+     */
+    @ApiModelProperty("报告编号")
+    @TableField("report_no")
+    public String reportNo;
+    /**
+     * 取样时间 格式如:“2022-06-21”
+     */
+    @ApiModelProperty("取样时间 格式如:“2022-06-21”")
+    @TableField("take_sampling_date")
+    public String takeSamplingDate;
+    /**
+     * 送样时间 格式如:“2022-06-21”
+     */
+    @ApiModelProperty("送样时间 格式如:“2022-06-21”")
+    @TableField("send_sample_date")
+    public String sendSampleDate;
+    /**
+     * 检测时间 格式如:“2022-06-21”
+     */
+    @ApiModelProperty("检测时间 格式如:“2022-06-21”")
+    @TableField("test_date")
+    public String testDate;
+    /**
+     * 报告时间 格式如:“2022-06-21”
+     */
+    @ApiModelProperty("报告时间 格式如:“2022-06-21”")
+    @TableField("report_date")
+    public String reportDate;
+    /**
+     * 委托单位
+     */
+    @ApiModelProperty("委托单位")
+    @TableField("consign_unit")
+    public String consignUnit;
+    /**
+     * 检测机构
+     */
+    @ApiModelProperty("检测机构")
+    @TableField("accept_test_unit")
+    public String acceptTestUnit;
+    /**
+     * 送样人
+     */
+    @ApiModelProperty("送样人")
+    @TableField("send_sample_person")
+    public String sendSamplePerson;
+    /**
+     * 接样人
+     */
+    @ApiModelProperty("接样人")
+    @TableField("witness_person")
+    public String witnessPerson;
+    /**
+     * 工程部位
+     */
+    @ApiModelProperty("工程部位")
+    @TableField("project_part")
+    public String projectPart;
+    /**
+     * 取样地点
+     */
+    @ApiModelProperty("取样地点")
+    @TableField("sampling_place")
+    public String samplingPlace;
+    /**
+     * 样品名称
+     */
+    @ApiModelProperty("样品名称")
+    @TableField("sample_name")
+    public String sampleName;
+    /**
+     * 委托单文件下载地址
+     */
+    @ApiModelProperty("委托单文件下载地址")
+    @TableField("consign_doc_file_path")
+    public String consignDocFilePath;
+    /**
+     * 记录单文件下载地址
+     */
+    @ApiModelProperty("记录单文件下载地址")
+    @TableField("record_doc_file_path")
+    public String recordDocFilePath;
+    /**
+     * 报告单文件下载地址
+     */
+    @ApiModelProperty("报告单文件下载地址")
+    @TableField("report_doc_file_path")
+    public String reportDocFilePath;
+    /**
+     * 检测依据
+     */
+    @ApiModelProperty("检测依据")
+    @TableField("test_standard")
+    public String testStandard;
+    /**
+     * 评定标准
+     */
+    @ApiModelProperty("评定标准")
+    @TableField("assess_standard")
+    public String assessStandard;
+    /**
+     * 检测结论
+     */
+    @ApiModelProperty("检测结论")
+    @TableField("test_conclusion")
+    public String testConclusion;
+    /**
+     * 备注
+     */
+    @ApiModelProperty("备注")
+    @TableField("memo")
+    public String memo;
+    /**
+     * 期数
+     */
+    @ApiModelProperty("期数")
+    @TableField("period_num")
+    public String periodNum;
+    /**
+     * 是否合格
+     */
+    @ApiModelProperty("是否合格:1 合格, 0 不合格")
+    @TableField("is_qualified")
+    public String isQualified;
+    /**
+     * 样品编号
+     */
+    @ApiModelProperty("样品编号")
+    @TableField("sample_code")
+    public String sampleCode;
+    /**
+     * 规格型号
+     */
+    @ApiModelProperty("规格型号")
+    @TableField("gui_ge_xing_hao")
+    public String guiGeXingHao;
+    /**
+     * 生产厂家
+     */
+    @ApiModelProperty("生产厂家")
+    @TableField("sheng_chan_cj")
+    public String shengChanCJ;
+    /**
+     * 产地
+     */
+    @ApiModelProperty("产地")
+    @TableField("chan_di")
+    public String chanDi;
+    /**
+     * 样品数量
+     */
+    @ApiModelProperty("样品数量")
+    @TableField("sample_num")
+    public String sampleNum;
+    /**
+     * 检测机构资质证书编号
+     */
+    @ApiModelProperty("检测机构资质证书编号")
+    @TableField("consign_unit_ability")
+    public String consignUnitAbility;
+    /**
+     * 批号
+     */
+    @ApiModelProperty("批号")
+    @TableField("batch_num")
+    public String batchNum;
+    /**
+     * 代表数量
+     */
+    @ApiModelProperty("代表数量")
+    @TableField("quantity")
+    public String quantity;
+    /**
+     * 单位
+     */
+    @ApiModelProperty("单位")
+    @TableField("unit")
+    public String unit;
+    /**
+     * 类型ID
+     */
+    @ApiModelProperty("类型ID")
+    @TableField("consign_test_cls_id")
+    public String consignTestClsID;
+    /**
+     * 结论
+     */
+    @ApiModelProperty("结论")
+    @TableField("result")
+    public String result;
+    /**
+     * 是否已删除
+     * Null:未删除
+     * 0:未删除
+     * 1:已删除
+     */
+    @ApiModelProperty("是否已删除 0:未删除 1:已删除")
+    @TableField("is_deleted")
+    public String isDeleted;
+    /**
+     * 删除时间
+     */
+    @ApiModelProperty("删除时间")
+    @TableField("delete_time")
+    public String deleteTime;
+    /**
+     * 快报/正式报告
+     * 1 快报
+     * 2 正式报告
+     */
+    @ApiModelProperty("快报/ 正式报告 1 快报 2 正式报告")
+    @TableField("report_type")
+    public Integer reportType;
+    /**
+     * 创建时间 格式如:“2022-06-21 13:44:33 235”
+     */
+    @ApiModelProperty("创建时间 格式如:“2022-06-21 13:44:33 235”")
+    @TableField("create_time")
+    public String createTime;
+    /**
+     * 试验树id
+     */
+    @ApiModelProperty("实验树Id")
+    @TableField("exam_name_info_id")
+    public String examNameInfoId;
+    /**
+     * 试验树id
+     */
+    @ApiModelProperty("组装文件(报告+记录+委托单)")
+    @TableField("assemble_file")
+    public String assembleFile;
+
+    /**
+     * 附件
+     */
+    @ApiModelProperty("附件")
+    @TableField(exist = false)
+    private List<TrialCyAccessories> accessories;
+}

+ 106 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSystemDocking.java

@@ -0,0 +1,106 @@
+/*
+ *      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.business.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 德飞试验系统对接表实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+@TableName("u_trial_system_docking")
+public class TrialSystemDocking extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+	private Long id;
+	/**
+	 * 德飞ID
+	 */
+	private Long dataId;
+
+	/**
+	 * 项目Id
+	 */
+	private Long projectId;
+
+	private String classificationAncestors;
+	/**
+	* 报告文件名称
+	*/
+		private String reportName;
+	/**
+	* 报告编号
+	*/
+		private String reportNumber;
+	/**
+	* 单位名称
+	*/
+		private String unitName;
+	/**
+	* 所属检测分类id
+	*/
+		private Long classificationId;
+	/**
+	* 规格型号
+	*/
+		private String specification;
+	/**
+	* 报告类型(1原材检测报告,2现场检测报告,3外委报告,4第三方检测报告)
+	*/
+		private Integer reportType;
+	/**
+	* 工程用途及部位
+	*/
+		private String purposeLocation;
+	/**
+	* 报告日期(20250822)
+	*/
+		private String reportDate;
+	/**
+	* 原文件地址
+	*/
+		private String fileUrl;
+	/**
+	* 上传后文件地址
+	*/
+		private String fileUrlOss;
+	/**
+	* 负责人
+	*/
+		private String personInCharge;
+	/**
+	 * 是否删除
+ 	 */
+      private Integer isDeleted;
+
+	  /**
+	 * 是否更新OSS  1 是  0 否
+	 */
+	  private Integer isUpdateOss;
+
+}

+ 24 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/TrialCyAccessoriesClient.java

@@ -0,0 +1,24 @@
+package org.springblade.business.feign;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springblade.common.constant.BusinessConstant;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+/**
+ * @author LHB
+ */
+
+@FeignClient(value = BusinessConstant.APPLICATION_WEATHER_NAME)
+public interface TrialCyAccessoriesClient {
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/business/detection";
+
+    @PostMapping(API_PREFIX + "/getTrialFilePdfRecord")
+    List<JSONObject> getTrialFilePdfRecord(@RequestParam String primaryKeyId,@RequestParam List<Integer> list);
+}

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

@@ -53,4 +53,7 @@ public class EntrustInfoVO extends EntrustInfo {
     @ApiModelProperty("任务Id")
     private String taskId;
 
+	@ApiModelProperty("委托单编号")
+	private String entrustNo;
+
 }

+ 5 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/InformationQueryVO.java

@@ -86,6 +86,11 @@ public class InformationQueryVO extends InformationQuery {
     private Integer waitingUserStatus;
 
 
+    @ApiModelProperty("重刷状态 0-待重刷,1-正在重刷,2-重刷成功,3-重刷失败")
+    private Integer saveAgain;
+
+    @ApiModelProperty("重刷次数:如果次数大于5次 每次都是3,就停止重刷")
+    private Integer saveAgainCount;
 
     public void setWaitingUserList(String waitingUserName, Integer status) {
         if (this.waitingUserList == null) {

+ 64 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/NeiYeLedgerVO.java

@@ -1,45 +1,74 @@
 package org.springblade.business.vo;
 
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
 
 @Data
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+//忽略为加excel注解的字段
+@ExcelIgnoreUnannotated
 public class NeiYeLedgerVO {
 
     /**
      * 单位工程
      */
     @ApiModelProperty(value = "单位工程")
+    @ExcelProperty(value = "单位工程",order = 1)
+    @ColumnWidth(30)
+    @ContentStyle(wrapped = true)
     private String unitProject;
 
     /**
      * 分部工程
      */
     @ApiModelProperty(value = "分部工程")
+    @ExcelProperty(value = "分部工程",order = 2)
+    @ColumnWidth(40)
+    @ContentStyle(wrapped = true)
     private String partProject;
 
     /**
      * 子分部工程
      */
     @ApiModelProperty(value = "子分部工程")
+    @ExcelProperty(value = "子分部工程",order = 3)
+    @ColumnWidth(40)
+    @ContentStyle(wrapped = true)
     private String partChildProject;
 
     /**
      * 分项工程
      */
     @ApiModelProperty(value = "分项工程")
+    @ExcelProperty(value = "分项工程",order = 4)
+    @ColumnWidth(40)
+    @ContentStyle(wrapped = true)
     private String subentryProject;
 
     /**
      * 子分项工程
      */
     @ApiModelProperty(value = "子分项工程")
+    @ExcelProperty(value = "子分项工程",order = 5)
+    @ColumnWidth(40)
+    @ContentStyle(wrapped = true)
     private String subentryChildProject;
 
     /**
      * 工序
      */
     @ApiModelProperty(value = "工序")
+    @ExcelProperty(value = "工序",order = 6)
+    @ColumnWidth(40)
+    @ContentStyle(wrapped = true)
     private String process;
 
     //施工台账信息 start ==================================
@@ -66,6 +95,9 @@ public class NeiYeLedgerVO {
      * 审批状态
      */
     @ApiModelProperty(value = "审批状态,1未上报,2待审批,3已审批")
+    @ExcelProperty(value = "审批状态",order = 7)
+    @ColumnWidth(15)
+    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
     private String taskStatus;
 
     /**
@@ -85,6 +117,38 @@ public class NeiYeLedgerVO {
      */
     @ApiModelProperty(value = "information-query主键")
     private String id;
+    /**
+     * 是否填写了日期
+     */
+    @ApiModelProperty(value = "是否填写了日期")
+    @ExcelProperty(value = "日期是否完整",order = 9)
+    @ColumnWidth(20)
+    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
+    private String dateIsComplete;
+    /**
+     * 文件提名
+     */
+    @ApiModelProperty(value = "文件提名")
+    @ExcelProperty(value = "文件提名",order = 8)
+    @ColumnWidth(100)
+    @ContentStyle(wrapped = true)
+    private String infoQueryName;
+
+    /**
+     * 文件pdf路径
+     */
+    @ApiModelProperty(value = "路径")
+    @ExcelProperty(value = "文件地址",order = 11)
+    @ColumnWidth(110)
+    private String pdfUrl;
+    /**
+     * 附件报告
+     */
+    @ApiModelProperty(value = "附件报告")
+    @ColumnWidth(100)
+    @ContentStyle(wrapped = true)
+    @ExcelProperty(value = "附件报告",order = 10)
+    private String fileTypeMsg;
 
     public NeiYeLedgerVO(String... values) {
         this.unitProject = values[0];

+ 9 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/NeiYeQueryVO.java

@@ -38,6 +38,15 @@ public class NeiYeQueryVO {
     @ApiModelProperty(value = "项目ID")
     private String contractIdRelation;
 
+    @ApiModelProperty(value = "是否缺少附件:true为完整")
+    private Boolean isFile;
+
+    @ApiModelProperty(value = "日期是否填报,与质检树类型一致")
+    private Integer dateIsComplete;
+
+    @ApiModelProperty(value = "查询类型:1-工序,2-节点")
+    private Integer selectType = 1;
+
     private List<String> wbsIds;
 
 }

+ 36 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/QueryProcessDataVO.java

@@ -33,4 +33,40 @@ public class QueryProcessDataVO {
 
     private String isExperiment;
 
+    /**
+     * 是否填写了日期
+     */
+    private String dateIsComplete;
+    /**
+     * 文件提名
+     */
+    private String infoQueryName;
+
+    /**
+     * 文件pdf路径
+     */
+    private String pdfUrl;
+    /**
+     * 文件pdf路径
+     */
+    private String privateTableFileType;
+    /**
+     * 文件pdf路径
+     */
+    private String contractTableFileType;
+    /**
+     * 文件pdf路径
+     */
+    private String contractTableFileTypeTwo;
+
+    /**
+     * 附件报告
+     */
+    private String fileTypeMsg;
+
+    /**
+     * 附件报告是否完整
+     */
+    private Boolean fileType = false;
+
 }

+ 13 - 3
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskApprovalVO.java

@@ -54,8 +54,8 @@ public class TaskApprovalVO {
     @ApiModelProperty("附件信息")
     private List<ApprovalFile> approvalFileList = new ArrayList<>();
 
-    public void setApprovalFileList(String fileName, String fileUrl) {
-        this.approvalFileList.add(new ApprovalFile(fileName, fileUrl));
+    public void setApprovalFileList(String fileName, String fileUrl, String nodeld, String classify, String projectId, String contractId) {
+        this.approvalFileList.add(new ApprovalFile(fileName, fileUrl, nodeld, classify, projectId, contractId));
     }
 
     @Data
@@ -65,9 +65,19 @@ public class TaskApprovalVO {
 
         private String fileUrl;
 
-        public ApprovalFile(String fileName, String fileUrl) {
+        // 由于质检任务需要查看附件pdf 需要假 4个字段
+        private String nodeld;
+        private String classify;
+        private String projectId;
+        private String contractId;
+
+        public ApprovalFile(String fileName, String fileUrl, String nodeld, String classify, String projectId, String contractId) {
             this.fileName = fileName;
             this.fileUrl = fileUrl;
+            this.nodeld = nodeld;
+            this.classify = classify;
+            this.projectId = projectId;
+            this.contractId = contractId;
         }
 
         public ApprovalFile() {

+ 20 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/ThirdReportVo.java

@@ -0,0 +1,20 @@
+package org.springblade.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author LHB
+ */
+@Data
+public class ThirdReportVo {
+    private Long id;
+    private Long contractId;
+    private String reportNo;
+    private String reportDate;
+    private String projectPositionName;
+    private String detectionResultName;
+
+    @ApiModelProperty(value = "是否关联选择过 0=否 1=是")
+    private Integer isSelectedStatus;
+}

+ 50 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialClassificationTreeVO.java

@@ -0,0 +1,50 @@
+/*
+ *      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.business.vo;
+
+import org.springblade.business.entity.TrialClassificationTree;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 德飞试验系统检测分类树视图实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+public class TrialClassificationTreeVO  {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	private Long id;
+
+	private Long projectId;
+	/**
+	 * 父级ID
+	 */
+	private Long parentId;
+
+	private Boolean hasChildren;
+	/**
+	 * 分类名称
+	 */
+	private String classificationName;
+
+}

+ 32 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialCyThirdReportQueryVo.java

@@ -0,0 +1,32 @@
+package org.springblade.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 接口查询条件对象
+ * @author LHB
+ */
+@Data
+public class TrialCyThirdReportQueryVo {
+    private Integer current;
+    private Integer size;
+    @ApiModelProperty("开始时间")
+    private String startTime;
+    @ApiModelProperty("结束时间")
+    private String endTime;
+    @ApiModelProperty("树节点id")
+    @NotNull(message = "树节点id不能为空")
+    private Long nodeId;
+    @ApiModelProperty("合同段id")
+    @NotNull(message = "合同段id不能为空")
+    private Long contractId;
+    @ApiModelProperty("质检节点pkeyid")
+    private Long qualityTestPKeyId;
+    @ApiModelProperty("类型:0-外委检测,1-第三方")
+    private Integer type;
+    @ApiModelProperty("类型:0-施工,1-监理,2-业主")
+    private Integer reportType;
+}

+ 84 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSystemDockingVO.java

@@ -0,0 +1,84 @@
+/*
+ *      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.business.vo;
+
+import org.springblade.business.entity.TrialSystemDocking;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 德飞试验系统对接表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Data
+public class TrialSystemDockingVO {
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+
+	/**
+	 * 项目Id
+	 */
+	private Long projectId;
+	/**
+	 * 报告文件名称
+	 */
+	private String reportName;
+	/**
+	 * 报告编号
+	 */
+	private String reportNumber;
+	/**
+	 * 单位名称
+	 */
+	private String unitName;
+	/**
+	 * 所属检测分类id
+	 */
+
+	private Long classificationId;
+	/**
+	 * 规格型号
+	 */
+	private String specification;
+	/**
+	 * 报告类型(1原材检测报告,2现场检测报告,3外委报告,4第三方检测报告)
+	 */
+	private Integer reportType;
+	/**
+	 * 工程用途及部位
+	 */
+	private String purposeLocation;
+	/**
+	 * 报告日期(20250822)
+	 */
+	private String reportDate;
+	/**
+	 * 原文件地址
+	 */
+	private String fileUrl;
+	/**
+	 * 责任者
+	 */
+	private String personInCharge;
+
+
+}

+ 50 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/dto/BatchAddNumbersDTO.java

@@ -0,0 +1,50 @@
+package org.springblade.manager.dto;
+
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class BatchAddNumbersDTO {
+    @ApiModelProperty(value = "表单的pkeyId")
+    private Long pkeyId; //表单的pkeyId
+    @ApiModelProperty(value = "节点id")
+    private String nodeId; //节点id
+    @ApiModelProperty(value = "1施工 2监理")
+    private String classify; //1施工 2监理
+    @ApiModelProperty(value = "表单选中的key")
+    private String key; //表单选中的key
+    @ApiModelProperty(value = "1独立编号  2组合编号")
+    private Integer type;//  1独立编号  2组合编号
+
+    @ApiModelProperty(value = "1常规递增 2奇数递增 3偶数递增")
+    private Integer increType1; // 1常规递增 2奇数递增 3偶数递增
+    @ApiModelProperty(value = "1固定循环  2递增循环")
+    private Integer cycleType1; // 1固定循环  2递增循环
+    @ApiModelProperty(value = "循环组数")
+    private Integer cycleTypeGroup1; // 循环组数
+    @ApiModelProperty(value = "开始编号")
+    private Integer startNumber1; //开始编号
+    @ApiModelProperty(value = "结束编号")
+    private Integer endNumber1; //结束编号
+
+    /**
+     * 组合编号的情况才会有以下参数
+     */
+    @ApiModelProperty(value = "分隔符  - . / _ : 、")
+    private String separator; //分隔符  - . / _ : 、
+    @ApiModelProperty(value = "1常规递增 2奇数递增 3偶数递增")
+    private Integer increType2; // 1常规递增 2奇数递增 3偶数递增
+    @ApiModelProperty(value = "1固定循环  2递增循环")
+    private Integer cycleType2; // 1固定循环  2递增循环
+    @ApiModelProperty(value = "循环组数")
+    private Integer cycleTypeGroup2; // 循环组数
+    @ApiModelProperty(value = "开始编号")
+    private Integer startNumber2; //开始编号
+    @ApiModelProperty(value = "结束编号")
+    private Integer endNumber2; //结束编号
+}

+ 7 - 4
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/TableFile.java

@@ -16,10 +16,7 @@
  */
 package org.springblade.manager.entity;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.*;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModel;
@@ -98,4 +95,10 @@ public class TableFile implements Serializable {
 
     private Integer sort;
 
+    /**
+     * 文件是否为关联的试验文件
+     */
+    @TableField(exist = false)
+    private Boolean isTrial = false;
+
 }

+ 67 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTreeContractExtend.java

@@ -0,0 +1,67 @@
+package org.springblade.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 合同段-扩展表
+ * @TableName m_wbs_tree_contract_extend
+ */
+@TableName(value ="m_wbs_tree_contract_extend")
+@Data
+public class WbsTreeContractExtend {
+    /**
+     * 
+     */
+    @TableId
+    private Long pKeyId;
+    /**
+     * 合同id
+     */
+    private Long contractId;
+
+    /**
+     *  类型(1-施工,2-监理)
+     */
+    private Integer type;
+    /**
+     *  是否为同步数据(1-是,0-不是)
+     */
+    private Integer isSync;
+    /**
+     *  节点祖级路径
+     */
+    private String ancestors;
+
+    /**
+     *  创建时间
+     */
+    private Date syncTime;
+
+    /**
+     *  是否删除(0-正常,1-已删除)
+     */
+    private Integer isDeleted;
+
+    /**
+     *  创建时间
+     */
+    private Date createTime;
+
+    /**
+     *  创建人
+     */
+    private Long createUser;
+
+    /**
+     *  修改时间
+     */
+    private Date updateTime;
+
+    /**
+     *  修改人
+     */
+    private Long updateUser;
+}

+ 61 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsTreeContractOldHtml.java

@@ -0,0 +1,61 @@
+package org.springblade.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 合同段表单上报之前的html记录
+ * @author LHB
+ * @TableName m_wbs_tree_contract_old_html
+ */
+@TableName(value ="m_wbs_tree_contract_old_html")
+@Data
+public class WbsTreeContractOldHtml {
+    /**
+     * 
+     */
+    @TableId
+    private Long id;
+
+    /**
+     * 合同WBS的p_key_id
+     */
+    private Long contractFormId;
+
+    /**
+     * 上报之前的html表单
+     */
+    private String oldHtmlUrl;
+
+    /**
+     * 上报之前的html表单
+     */
+    private String oldExcelUrl;
+
+    /**
+     *  是否删除(0-正常,1-已删除)
+     */
+    private Integer isDeleted;
+
+    /**
+     *  创建时间
+     */
+    private Date createTime;
+
+    /**
+     *  创建人
+     */
+    private Long createUser;
+
+    /**
+     *  修改时间
+     */
+    private Date updateTime;
+
+    /**
+     *  修改人
+     */
+    private Long updateUser;
+}

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

@@ -267,5 +267,7 @@ public class WbsTreePrivate extends BaseEntity {
     @ApiModelProperty(value = "是否包含单元评定")
     private Integer isClassifition;
 
+    @ApiModelProperty(value = "附件类型(复选)")
+    private String tableFileType;
 
 }

+ 18 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/INodeBaseInfoServiceClient.java

@@ -0,0 +1,18 @@
+package org.springblade.manager.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
+
+@FeignClient(value = APPLICATION_NAME_PREFIX + "manager")
+public interface INodeBaseInfoServiceClient {
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/manager/nodebaseinfo";
+
+    @GetMapping(API_PREFIX + "/getNameRuleByRule")
+    String getNameRuleByRule(@RequestParam String nameRule, @RequestParam String wbsId);
+}

+ 5 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsParamClient.java

@@ -1,6 +1,7 @@
 package org.springblade.manager.feign;
 
 
+import org.springblade.core.tool.api.R;
 import org.springblade.manager.entity.WbsParam;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.util.List;
+
 import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
 
 @FeignClient(value = APPLICATION_NAME_PREFIX + "manager")
@@ -26,4 +29,6 @@ public interface WbsParamClient {
 
     @PostMapping(API_PREFIX + "/createFileTitle")
     String createFileTitle(@RequestBody WbsTreeContract contract);
+    @PostMapping(API_PREFIX + "/getNameRuleByPkeyId")
+    R<List<String>> getNameRuleByPkeyId(@RequestParam Long pKeyId, @RequestParam Long projectId);
 }

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

@@ -1,6 +1,7 @@
 package org.springblade.manager.feign;
 
 import org.springblade.business.dto.EKeyDto;
+import org.springblade.core.tool.api.R;
 import org.springblade.manager.entity.ContractRelationJlyz;
 import org.springblade.manager.entity.WbsTreeContract;
 import org.springblade.manager.vo.AppWbsTreeContractVO;
@@ -205,4 +206,10 @@ public interface WbsTreeContractClient {
 
     @GetMapping(API_PREFIX + "/saveNameRuleByPkeyId")
     void saveNameRuleByPkeyId(@RequestParam Long  pKeyId, @RequestParam String s,  @RequestParam Long projectId);
+
+    @PostMapping(API_PREFIX + "/queryListByPIds")
+    List<WbsTreeContract> queryListByPIds(@RequestBody List<Long> pIds);
+
+    @PostMapping(API_PREFIX + "/findIsExistTreeNode")
+    Integer findIsExistTreeNode(@RequestBody List<String> ids);
 }

+ 25 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractOldHtmlClient.java

@@ -0,0 +1,25 @@
+package org.springblade.manager.feign;
+
+import org.springblade.manager.entity.WbsTreeContract;
+import org.springblade.manager.entity.WbsTreeContractOldHtml;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
+
+@FeignClient(value = APPLICATION_NAME_PREFIX + "manager")
+public interface WbsTreeContractOldHtmlClient {
+    /**
+     * 接口前缀
+     */
+    String API_PREFIX = "/api/manager/WbsTreeContractOldHtml";
+
+    @PostMapping(API_PREFIX + "/save")
+    Boolean save(@RequestBody List<WbsTreeContractOldHtml> data);
+
+    @PostMapping(API_PREFIX + "/deleteByContractFormIds")
+    void deleteByContractFormIds(@RequestBody List<Long> collect);
+}

+ 84 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/APIWbsContractSubdivisionVo.java

@@ -0,0 +1,84 @@
+package org.springblade.manager.vo;
+
+import lombok.Data;
+import org.springblade.manager.entity.WbsTreeContract;
+
+/**
+ * 合同段分部分项划分节点试图
+ * 包含各个状态
+ * | 01   | 交工证书     | 所有子节点存在一个的major_data_type = 3   值为 true     |
+ * | 02   | 7天强度报告  | 所有最小节点中在m_table_file 中type = 11  存在一个true  |
+ * | 03   | 28天强度报告 | 所有最小节点中在m_table_file 中type = 12   存在一个true |
+ * | 04   | 监理收验资料 | 监理 major_data_type = 4  全部已审批                    |
+ * | 05   | 桩检报告     | 所有最小节点中在m_table_file 中type = 13   存在一个true |
+ * | 06   | 质检资料     | 质检 major_data_type = 4  全部已审批                    |
+ * | 07   | 评定资料     | major_data_type = 2  全部已审批                         |
+ * @author LHB
+ */
+@Data
+public class APIWbsContractSubdivisionVo {
+    /**
+     * 主键
+     */
+    private Long id;
+    /**
+     * 编码 空
+     */
+    private String code;
+    /**
+     * 节点名称
+     */
+    private String name;
+    /**
+     * 桩号
+     */
+    private String stake;
+    /**
+     * 父节点id
+     */
+    private Long pid;
+    /**
+     * 1表示单位工程 2表示分部工程 3表示分项工程
+     */
+    private Integer nodeType;
+    /**
+     * 层级编码 空
+     */
+    private String levelCode;
+    /**
+     * 专业工程id
+     */
+    private String partitionCatagID;
+    /**
+     * 专业工程名称
+     */
+    private String partitionCatagName;
+    /**
+     * 交工证书
+     */
+    private Boolean completionCertificate = false;
+    /**
+     * 7天强度报告
+     */
+    private Boolean strengthReportSeven = false;
+    /**
+     * 28天强度报告
+     */
+    private Boolean strengthReportTwentyEight = false;
+    /**
+     * 监理资料
+     */
+    private Boolean supervisionData = false;
+    /**
+     * 桩检报告
+     */
+    private Boolean pileInspectionReport = false;
+    /**
+     * 质检资料
+     */
+    private Boolean qualityInspectionData = false;
+    /**
+     * 评定资料
+     */
+    private Boolean evaluationData = false;
+}

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/AppWbsTreeContractVO.java

@@ -21,4 +21,6 @@ public class AppWbsTreeContractVO extends WbsTreeContract {
     @ApiModelProperty(value = "文件题名")
     private String fileName;
 
+    @ApiModelProperty(value = "是否最近同步节点")
+    private Integer isSync;
 }

+ 2 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/ExceTabTreVO.java

@@ -63,6 +63,8 @@ public class ExceTabTreVO extends ExcelTab implements INode<ExceTabTreVO> {
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private Boolean hasChildren;
 
+    private Integer tableOwner;
+
     @Override
     public List<ExceTabTreVO> getChildren() {
         if (this.children == null) {

+ 2 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreeContractLazyVO.java

@@ -139,6 +139,7 @@ public class WbsTreeContractLazyVO implements Serializable {
     @ApiModelProperty(value = "是否完成日期填写1是2否")
     private Integer dateIsComplete;
 
-
+    @ApiModelProperty(value = "是否最近同步节点")
+    private Integer isSync;
 
 }

+ 6 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreeContractTreeAllVO.java

@@ -41,6 +41,12 @@ public class WbsTreeContractTreeAllVO implements INode<WbsTreeContractTreeAllVO>
     @ApiModelProperty(value = "是否为自定义新增节点 1=是")
     private Integer isCustom;
 
+    @ApiModelProperty(value = "是否完成日期填写 1是 2否")
+    private Integer dateIsComplete;
+
+    @ApiModelProperty(value = "是否为自定义新增节点 1=是")
+    private Integer isSync;
+
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private List<WbsTreeContractTreeAllVO> children;
 

+ 8 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/WbsTreePrivateVO.java

@@ -6,9 +6,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.springblade.core.tool.node.INode;
+import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.manager.entity.WbsTreePrivate;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 @Data
@@ -68,5 +71,10 @@ public class WbsTreePrivateVO extends WbsTreePrivate implements INode<WbsTreePri
      */
     private Integer checkStatus = 0;
 
+    /**
+     * 附件类型
+     */
+    private List<String> tableFileTypes;
+
 
 }

+ 6 - 3
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchiveFileController.java

@@ -454,8 +454,11 @@ public class ArchiveFileController extends BladeController {
     @PostMapping("/sendFileToEArchives")
     @ApiOperationSupport(order = 18)
     @ApiOperation(value = "智慧工地推送文件至电子档案数据规则接口")
-    public R<Boolean> sendFileToEArchives(@RequestBody ArchiveDataVo vo) {
-        //数据入库
-        return  autoService.sendFileToEArchives(vo);
+    public R<Boolean> sendFileToEArchives(@RequestBody List<ArchiveDataVo> vo) {
+        for (ArchiveDataVo v : vo) {
+            //数据入库
+            autoService.sendFileToEArchives(v);
+        }
+        return  R.success("操作成功");
     }
 }

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

@@ -229,7 +229,7 @@ public interface ArchivesAutoMapper extends BaseMapper<ArchivesAuto> {
 	 */
 	Map<String, BigDecimal> getAllArchiveByContractTypeSummary(@Param("projectId") Long projectId,@Param("type") String typ);
 
-	String getArchiveFileByParentId(@Param("nodeId") String nodeId,@Param("contractId") String contractId);
+	Long getArchiveFileByParentId(@Param("nodeId") String nodeId,@Param("contractId") String contractId);
 
     List<ArchivesAutoVO4> selectAllArchiveAuto(@Param("projectId")Long projectId, @Param("contractId") Long contractId, @Param("nodeIds") List<String> nodeIds,@Param("isArchive")Integer isArchive);
 

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

@@ -1643,4 +1643,8 @@
         order by m.tree_sort,u.auto_file_sort is null ,u.auto_file_sort,u.file_number is null,
         SUBSTRING_INDEX(u.file_number, '_', 1), SUBSTRING_INDEX(u.file_number, '_', -1) + 0 ,u.create_time asc
     </select>
+    <select id="getArchiveFileByParentId" resultType="java.lang.Long">
+        select c.id from m_archive_tree_contract c left join m_archive_tree a on a.id=c.from_id where c.contract_id=#{contractId} and a.id=#{nodeId} and c.is_deleted=0 and a.is_deleted=0
+
+    </select>
 </mapper>

+ 28 - 25
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -4784,11 +4784,11 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 			return R.fail("请根据接口文档上传参数");
 		}
 
-		String nodeId = dataInfo.getNodeId();
+		String nodeIdstr = dataInfo.getNodeId();
 		String contractId = dataInfo.getContractId();
 		String fileUrl = dataInfo.getFileUrl();
 		String fileName = dataInfo.getFileNmae();
-		if (nodeId == null || Func.isNull(nodeId)) {
+		if (nodeIdstr == null || Func.isNull(nodeIdstr)) {
 			return R.fail("请上传nodeId");
 		}
 		if (contractId == null || Func.isNull(contractId)) {
@@ -4807,30 +4807,33 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 		if (contractInfo == null) {
 			return R.fail("请传输正确的contractId");
 		}
-		//获取文件的父节点Id
-		String treeContractId = baseMapper.getArchiveFileByParentId(nodeId, contractId);
-		if (treeContractId == null || Func.isNull(treeContractId)) {
-			R.fail("请校验传输的nodeId和contractId,没有查到父节点Id");
-		}
-
 
-		// 将数据插入到 auto表中
-		ArchivesAuto archivesAuto = new ArchivesAuto();
-		long newPkId = SnowFlakeUtil.getId(); //主键Id
-		archivesAuto.setId(newPkId);
-		archivesAuto.setProjectId(Func.toLong(contractInfo.getPId()));
-		archivesAuto.setContractId(Func.toLong(contractId));
-		archivesAuto.setName(fileName);
-		archivesAuto.setIsDeleted(0);
-		this.save(archivesAuto);
-
-		// 保存文件到archive_file表中
-		long arueId = SnowFlakeUtil.getId(); //主键Id
-		ArchiveFile archiveFile = new ArchiveFile();
-		archiveFile.setId(arueId);
-		archiveFile.setArchiveId(newPkId);
-		archiveFile.setFileName(fileName);
-		archiveFileClient.saveArchiveFileByBIM(archiveFile);
+		String[] nodeIds = nodeIdstr.split(",");
+		for (String  nodeId: nodeIds) {
+			//获取文件的父节点Id
+			Long treeContractId = baseMapper.getArchiveFileByParentId(nodeId, contractId);
+			if (treeContractId == null || Func.isNull(treeContractId)) {
+				R.fail("请校验传输的nodeId和contractId,没有查到父节点Id");
+			}
+			// 将数据插入到 auto表中
+			ArchivesAuto archivesAuto = new ArchivesAuto();
+			long newPkId = SnowFlakeUtil.getId(); //主键Id
+			archivesAuto.setId(newPkId);
+			archivesAuto.setProjectId(Func.toLong(contractInfo.getPId()));
+			archivesAuto.setContractId(Func.toLong(contractId));
+			archivesAuto.setName(fileName);
+			archivesAuto.setIsDeleted(0);
+			archivesAuto.setNodeId(treeContractId);
+			this.save(archivesAuto);
+
+			// 保存文件到archive_file表中
+			long arueId = SnowFlakeUtil.getId(); //主键Id
+			ArchiveFile archiveFile = new ArchiveFile();
+			archiveFile.setId(arueId);
+			archiveFile.setArchiveId(newPkId);
+			archiveFile.setFileName(fileName);
+			archiveFileClient.saveArchiveFileByBIM(archiveFile);
+		}
 		return R.success("保存成功");
 	}
 

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

@@ -34,6 +34,7 @@
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-core-test</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.springblade</groupId>

+ 66 - 14
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
@@ -86,6 +87,9 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.*;
 import java.net.URLEncoder;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
@@ -112,6 +116,7 @@ public class InformationWriteQueryController extends BladeController {
     private final ContractClient contractClient;
 
     private final WbsTreeContractClient wbsTreeContractClient;
+    private final WbsTreeContractOldHtmlClient wbsTreeContractOldHtmlClient;
 
     private final WbsTreePrivateClient wbsTreePrivateClient;
 
@@ -158,6 +163,7 @@ public class InformationWriteQueryController extends BladeController {
     private final IRecycleBinService recycleBinService;
     private final WbsTreeContractStatisticsClientImpl wbsTreeContractStatisticsClient;
     private final IRecycleBinInfoService recycleBinInfoService;
+    private final INodeBaseInfoServiceClient nodeBaseInfoServiceClient;
 
 
     @Autowired
@@ -227,7 +233,12 @@ public class InformationWriteQueryController extends BladeController {
                 String sql="select * from m_wbs_tree_contract where p_key_id="+query.getWbsId()+" and is_deleted=0";
                 WbsTreeContract contract = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
                 if(dto.getType()==1){
-                    result=wbsParamClient.createFileTitle(contract);
+                    R<List<String>>  nameRuleList = wbsParamClient.getNameRuleByPkeyId(contract.getPKeyId(), Long.valueOf(contract.getProjectId()));
+                    String nameRule = "";
+                    if (nameRuleList != null && nameRuleList.getData() != null && !nameRuleList.getData().isEmpty()) {
+                        nameRule = String.join("-", nameRuleList.getData());
+                    }
+                    result  = nodeBaseInfoServiceClient.getNameRuleByRule(nameRule, contract.getPKeyId()+"");
                 }else {
                     result=nodeNameMap.get(query.getId());
                     //同时修改工程划分节点命名规则
@@ -392,13 +403,14 @@ public class InformationWriteQueryController extends BladeController {
             if(StringUtils.isEmpty(dto1.getNameRule())){
                 throw new ServiceException("请输入题名规则");
             }
-            String sql="select p_key_id,ancestors_p_id from m_wbs_tree_contract where p_key_id="+dto1.getWbsId()+" and is_deleted=0";
-            WbsTreeContract contract = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
-            String result="";
-            if(contract!=null){
-                result= createFileTitle(contract, dto1.getNameRule());
-            }
-            list.add(new PreviewNodeNameVO1(dto1.getWbsId(),result));
+           String result=nodeBaseInfoServiceClient.getNameRuleByRule(dto1.getNameRule(),dto1.getWbsId());
+//            String sql="select p_key_id,ancestors_p_id from m_wbs_tree_contract where p_key_id="+dto1.getWbsId()+" and is_deleted=0";
+//            WbsTreeContract contract = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
+//            String result="";
+//            if(contract!=null){
+//                result= createFileTitle(contract, dto1.getNameRule());
+//            }
+            list.add(new PreviewNodeNameVO1(dto1.getWbsId(),result.toString()));
         }
         return R.data(list);
     }
@@ -413,7 +425,7 @@ public class InformationWriteQueryController extends BladeController {
             WbsTreeContract contract = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
             String result="";
             if(nameRules!=null){
-                result= createFileTitle(contract, String.join("-", nameRules));
+                result = nodeBaseInfoServiceClient.getNameRuleByRule(String.join("-", nameRules), contract.getPKeyId() + "");
             }
             list.add(new PreviewNodeNameVO(dto.getWbsId(),result,nameRules));
         }
@@ -1213,8 +1225,48 @@ public class InformationWriteQueryController extends BladeController {
                 return R.data(300, false, "未查询到填报信息,上报失败");
             }
         } else { //质检
+            //记录选中节点的所有表单旧html
+            List<Long> list = Arrays.stream(startTaskVO.getIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
+            List<WbsTreeContract> wbsTreeContracts =  wbsTreeContractClient.queryListByPIds(list);
+
+
             businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, startTaskVO.getIds().replaceAll(",", "")).eq(InformationQuery::getClassify, startTaskVO.getClassify().toString()).eq(InformationQuery::getType, 1).last("order by id desc limit 1"));
             if (businessData != null) {
+
+                //处理html 复制之后记录在新表中w
+                if (CollectionUtils.isNotEmpty(wbsTreeContracts)) {
+                    List<WbsTreeContractOldHtml> data = new ArrayList<>();
+                    try {
+                        for (WbsTreeContract wbsTreeContract : wbsTreeContracts) {
+                            ExcelTab byId = excelTabClient.getById(String.valueOf(wbsTreeContract.getExcelId()));
+                            WbsTreeContractOldHtml oldHtml = new WbsTreeContractOldHtml();
+                            oldHtml.setId(SnowFlakeUtil.getId());
+                            oldHtml.setCreateUser(getUser().getUserId());
+                            String htmlUrl = wbsTreeContract.getHtmlUrl();
+                            // 获取或下载文件
+                            Path sourcePath = FileUtils.getOrDownloadFile(htmlUrl);
+                            // 生成副本路径
+                            Path copyPath = FileUtils.generateCopyPath(sourcePath,wbsTreeContract.getPKeyId());
+                            // 执行复制操作(覆盖已存在的文件)
+                            Files.copy(sourcePath, copyPath, StandardCopyOption.REPLACE_EXISTING);
+
+                            oldHtml.setContractFormId(wbsTreeContract.getPKeyId());
+                            oldHtml.setOldHtmlUrl(copyPath.toFile().getAbsolutePath());
+                            //记录历史excel路径
+                            oldHtml.setOldExcelUrl(byId.getFileUrl());
+                            data.add(oldHtml);
+                        }
+                        List<Long> collect = data.stream().map(WbsTreeContractOldHtml::getContractFormId).collect(Collectors.toList());
+                        //删除旧记录
+                        wbsTreeContractOldHtmlClient.deleteByContractFormIds(collect);
+
+                        wbsTreeContractOldHtmlClient.save(data);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        throw new ServiceException(e.getMessage());
+                    }
+                }
+
                 //设置业务数据ID
                 startTaskVO.setIds(businessData.getId().toString());
                 return this.batchTask(startTaskVO);
@@ -2581,11 +2633,11 @@ private Object reviseValue(Map<String, String> p2, String key, Object value) {
                     /*重做随机值*/
                     List<RangeJson> rjs = JSON.parseArray(setting, RangeJson.class);
                     if (value != null && !value.toString().isEmpty() && Func.isNotEmpty(rjs)) {
-//                        List<RangeJson> temp = rjs.stream().filter(rj -> rj.getPkeyId().equals(pKeyId)).collect(Collectors.toList());
-//                        if (temp.isEmpty()) {
-//                            temp = rjs;
-//                        }
-                        List<RangeJson> rangeJsons = rjs.stream().filter(rj -> rj.getPkeyId().equals(pKeyId)).collect(Collectors.toList());
+                        List<RangeJson> temp = rjs.stream().filter(rj -> rj.getPkeyId().equals(pKeyId)).collect(Collectors.toList());
+                        if (temp.isEmpty()) {
+                            temp = rjs;
+                        }
+                        List<RangeJson> rangeJsons = temp;
                         if (!rangeJsons.isEmpty()) {
                             List<String[]> la = Arrays.stream(value.toString().split("☆")).map(s -> s.split("_\\^_")).collect(Collectors.toList());
                             /*全部为一个数的时候不用修改*/

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/NeiWaiYeProgressController.java

@@ -99,7 +99,7 @@ public class NeiWaiYeProgressController {
                 queryProcessDataVOList = this.informationQueryService.queryProcessDataByParentIdAndContractId2(node.getId().toString(), classFy, contractId);
             } else {
                 //填报节点
-                queryProcessDataVOList = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), classFy);
+                queryProcessDataVOList = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), classFy, null);
                 childList.clear();
                 //设置填报节点进集合中
                 childList.add(node);
@@ -165,7 +165,7 @@ public class NeiWaiYeProgressController {
                 queryProcessDataVOList = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), 1, contractId);
             } else {
                 //填报节点
-                queryProcessDataVOList = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), 1);
+                queryProcessDataVOList = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), 1, null);
                 childList.clear();
                 //设置填报节点进集合中
                 childList.add(node);

+ 94 - 10
blade-service/blade-business/src/main/java/org/springblade/business/controller/NeiYeController.java

@@ -1,6 +1,8 @@
 package org.springblade.business.controller;
 
 import cn.hutool.core.date.DateUtil;
+import com.aliyun.oss.ServiceException;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -24,9 +26,11 @@ import org.springblade.business.vo.NeiYeQueryVO;
 import org.springblade.business.vo.QueryProcessDataVO;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.CollectionUtil;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.WbsFormElement;
@@ -36,6 +40,8 @@ import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.WbsTreeContractClient;
 import org.springblade.manager.feign.WbsTreePrivateClient;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
+import org.springblade.system.entity.DictBiz;
+import org.springblade.system.entity.Region;
 import org.springframework.core.io.ByteArrayResource;
 import org.springframework.core.io.Resource;
 import org.springframework.http.HttpHeaders;
@@ -46,6 +52,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.SingleColumnRowMapper;
 import org.springframework.web.bind.annotation.*;
 import org.springblade.core.mp.support.Query;
+import springfox.documentation.annotations.ApiIgnore;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.ByteArrayOutputStream;
@@ -86,6 +93,12 @@ public class NeiYeController {
     @ApiOperation(value = "获取内业台账列表")
     public R<IPage<NeiYeLedgerVO>> queryCurrentNodeNeiYeLedger(@RequestBody NeiYeQueryVO queryVO) {
         if (queryVO.getWbsIds() != null && queryVO.getWbsIds().size() > 0) {
+            //查询字典 dict_biz  code = table_file_type
+            List<DictBiz> dictBiz = jdbcTemplate.query("select * from blade_dict_biz where code = 'table_file_type'", new BeanPropertyRowMapper<>(DictBiz.class));
+            if(CollectionUtil.isEmpty(dictBiz)){
+               throw new ServiceException("table_file_type 字典未查询到数据");
+            }
+            Map<String, String> dictMap = dictBiz.stream().collect(Collectors.toMap(DictBiz::getDictKey, DictBiz::getDictValue));
             //生成列表
             List<NeiYeLedgerVO> neiYeLedgerVOList = new ArrayList<>();
             Integer contractType = 1;
@@ -112,18 +125,21 @@ public class NeiYeController {
             }
             //不是工序,则查询当前节点下的所有填报节点
             List<QueryProcessDataVO> queryDataResult;
+            //本身就是工序节点就查本节点
+            if(node.getNodeType() == 6){
+                queryVO.setSelectType(2);
+            }
             //有些填报节点的MajorDataType为0
-            if (!new Integer("6").equals(node.getNodeType()) && ObjectUtil.isNotEmpty(node.getMajorDataType()) &&!Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())
-                    && !node.getNodeName().contains("开工报告") && !node.getNodeName().contains("质量检验评定表")) {
+            if (queryVO.getSelectType() != null && queryVO.getSelectType() == 1) {
                 //非填报节点
                 if (node.getParentId() == 0) {
-                    queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractIdTwo("", contractType, contractId);
+                    queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractIdTwo("", contractType, contractId, queryVO.getDateIsComplete());
                 } else {
-                    queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractIdTwo(node.getPKeyId().toString(), contractType, contractId);
+                    queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractIdTwo(node.getAncestorsPId() + "," + node.getPKeyId(), contractType, contractId, queryVO.getDateIsComplete());
                 }
             } else {
                 //填报节点
-                queryDataResult = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), contractType);
+                queryDataResult = this.informationQueryService.queryProcessDataByPrimaryKeyIdAndClassify(node.getPKeyId().toString(), contractType, queryVO.getDateIsComplete());
             }
 
             if (queryDataResult != null && queryDataResult.size() > 0) {
@@ -134,6 +150,43 @@ public class NeiYeController {
                 List<String> stringList = jdbcTemplate.queryForList(sql, String.class);
                 if (stringList.size() > 0) {
                     queryDataResult.stream().forEach(qdr -> {
+                        StringBuilder sb = new StringBuilder();
+                        if (StringUtils.isEmpty(qdr.getPrivateTableFileType())) {
+                            sb.append("/");
+                        } else {
+                            //后台节点配置的附件类型
+                            List<String> privateFileType = Arrays.asList(qdr.getPrivateTableFileType().split(","));
+                            //附件名称
+                            List<String> names = new ArrayList<>();
+
+                            if (StringUtils.isNotEmpty(qdr.getContractTableFileType()) || StringUtils.isNotEmpty(qdr.getContractTableFileTypeTwo())) {
+                                if(StringUtils.isNotEmpty(qdr.getContractTableFileTypeTwo())){
+                                    qdr.setContractTableFileType(qdr.getContractTableFileType()+","+qdr.getContractTableFileTypeTwo());
+                                }else{
+                                    qdr.setContractTableFileType(qdr.getContractTableFileTypeTwo());
+                                }
+
+                                List<String> contractFileType = Arrays.asList(qdr.getContractTableFileType().split(","));
+
+                                HashSet<String> strings = new HashSet<>(contractFileType);
+                                //后台配置的与合同段配置的附件类型比较 查到质检未配置的附件名称
+                                List<String> collect = privateFileType.stream().filter(fileType -> !strings.contains(fileType)).collect(Collectors.toList());
+                                if (CollectionUtil.isNotEmpty(collect)) {
+                                    collect.forEach(f -> names.add("【" + dictMap.get(f) + "】"));
+                                } else {
+                                    sb.append("报告完整");
+                                    qdr.setFileType(true);
+                                }
+                            } else {
+                                privateFileType.forEach(f -> names.add("【" + dictMap.get(f) + "】"));
+                            }
+                            if(CollectionUtil.isNotEmpty(names)){
+                                sb.append("缺少").append(StringUtils.join(names, "、"));
+                            }
+                        }
+
+                        qdr.setFileTypeMsg(sb.toString());
+
                         if (stringList.contains(qdr.getPrimaryKeyId())) {
                             qdr.setIsExperiment("true");
                         }
@@ -145,6 +198,10 @@ public class NeiYeController {
                     queryDataResult = queryDataResult.stream()
                             .filter(qdr -> isExperiment.equals(qdr.getIsExperiment())).collect(Collectors.toList());
                 }
+                //过滤附件
+                if (queryVO.getIsFile() != null) {
+                    queryDataResult = queryDataResult.stream().filter(f -> Objects.equals(f.getFileType(), queryVO.getIsFile())).collect(Collectors.toList());
+                }
                 //设置评定值
                 queryDataResult.stream().forEach(qdr -> qdr.setEvaluate("false"));
                 List<QueryProcessDataVO> vos = queryDataResult.stream().filter(qdr -> qdr.getTitle().contains("质量检验评定表"))
@@ -240,8 +297,13 @@ public class NeiYeController {
                     return R.data(300, null, "未查询到数据");
                 }
                 //分组
-                List<List<QueryProcessDataVO>> groupList = CommonUtil.getBatchSize(queryDataResult, queryVO.getSize());
-                List<QueryProcessDataVO> groupQueryList = groupList.get(queryVO.getCurrent() == 0 ? 0 : queryVO.getCurrent() - 1);
+                List<QueryProcessDataVO> groupQueryList = null;
+                if(queryVO.getSize() != null && queryVO.getSize() > 0){
+                    List<List<QueryProcessDataVO>> groupList = CommonUtil.getBatchSize(queryDataResult, queryVO.getSize());
+                     groupQueryList = groupList.get(queryVO.getCurrent() == 0 ? 0 : queryVO.getCurrent() - 1);
+                }else{
+                    groupQueryList = queryDataResult;
+                }
 
                 //获取所有施工日志记录
                 List<String> primaryKeyIds = groupQueryList.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList());
@@ -273,7 +335,7 @@ public class NeiYeController {
                     }
                     //todo 当前缺少是否关联评定、是否关联试验 =================================
                     //新增列表数据
-                    neiYeLedgerVOList.add(new NeiYeLedgerVO(map.get("unitProject"),
+                    NeiYeLedgerVO neiYeLedgerVO = new NeiYeLedgerVO(map.get("unitProject"),
                             map.get("partProject"),
                             map.get("partChildProject"),
                             map.get("subentryProject"),
@@ -285,8 +347,13 @@ public class NeiYeController {
                             vo.getEvaluate(),
                             vo.getIsExperiment(),
                             vo.getReportNumber(),
-                            vo.getInformationQueryId())
-                    );
+                            vo.getInformationQueryId());
+
+                    neiYeLedgerVO.setDateIsComplete(vo.getDateIsComplete());
+                    neiYeLedgerVO.setInfoQueryName(vo.getInfoQueryName());
+                    neiYeLedgerVO.setPdfUrl(vo.getPdfUrl());
+                    neiYeLedgerVO.setFileTypeMsg(vo.getFileTypeMsg());
+                    neiYeLedgerVOList.add(neiYeLedgerVO);
                 }
                 //转换为page信息
                 Query query = new Query();
@@ -552,4 +619,21 @@ public class NeiYeController {
         }
     }
 
+
+    /**
+     * 导出业内台账
+     */
+    @PostMapping("export")
+    @ApiOperationSupport(order = 11)
+    @ApiOperation(value = "导出业内台账", notes = "传入user")
+    public void exportRegion(@RequestBody NeiYeQueryVO queryVO,HttpServletResponse response) {
+        //导出所有
+        queryVO.setSize(-1);
+        R<IPage<NeiYeLedgerVO>> iPageR = queryCurrentNodeNeiYeLedger(queryVO);
+        //获取数据
+        if(iPageR.isSuccess()){
+            List<NeiYeLedgerVO> list = iPageR.getData().getRecords();
+            ExcelUtil.export(response, "内业台账" + org.springblade.core.tool.utils.DateUtil.time(), "行政区划数据表", list, NeiYeLedgerVO.class);
+        }
+    }
 }

+ 6 - 3
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -172,13 +172,16 @@ public class TaskController extends BladeController {
             @ApiImplicitParam(name = "formDataId", value = "数据源", required = true),
             @ApiImplicitParam(name = "approvalType", value = "上报类型", required = true)
     })
-    public R<List<TaskApprovalVO>> getBatchApprovalTaskParameter(@RequestParam String formDataId, @RequestParam Integer approvalType) {
+    public R<List<TaskApprovalVO>> getBatchApprovalTaskParameter(@RequestParam String formDataId, @RequestParam String approvalType) {
         List<String> longs = Func.toStrList(formDataId);
+        List<String> apptype = Func.toStrList(approvalType);
         List<TaskApprovalVO> taskApprovalVOList = new ArrayList<>();
-        for (String aLong : longs) {
+        for (int i=0;i<longs.size();i++) {
+            String aLong = longs.get(i);
+            Integer approv = Integer.parseInt(apptype.get(i));
             TaskApprovalVO result = new TaskApprovalVO();
             result.setFormDataId(aLong);
-            result.setApprovalType(approvalType);
+            result.setApprovalType(approv);
             taskApprovalVOList.add(this.taskService.queryBusinessData(result));
         }
         return R.data(taskApprovalVOList);

+ 207 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialClassificationTreeController.java

@@ -0,0 +1,207 @@
+/*
+ *      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.business.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+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.business.dto.TrialClassificationTreeDTO;
+import org.springblade.business.dto.TrialClassificationTreeDTO1;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.log.exception.ServiceException;
+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.BeanUtil;
+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.business.entity.TrialClassificationTree;
+import org.springblade.business.vo.TrialClassificationTreeVO;
+import org.springblade.business.service.ITrialClassificationTreeService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 德飞试验系统检测分类树 控制器
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/trialclassificationtree")
+@Api(value = "德飞试验系统检测分类树", tags = "德飞试验系统检测分类树接口")
+public class TrialClassificationTreeController extends BladeController {
+
+	private final ITrialClassificationTreeService trialClassificationTreeService;
+
+//	/**
+//	 * 详情
+//	 */
+//	@GetMapping("/detail")
+//	@ApiOperationSupport(order = 1)
+//	@ApiOperation(value = "详情", notes = "传入trialClassificationTree")
+//	public R<TrialClassificationTree> detail(TrialClassificationTree trialClassificationTree) {
+//		TrialClassificationTree detail = trialClassificationTreeService.getOne(Condition.getQueryWrapper(trialClassificationTree));
+//		return R.data(detail);
+//	}
+//
+	/**
+	 * 德飞试验系统检测分类树
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "查询当前节点的子节点", notes = "传入trialClassificationTree")
+	public R<List<TrialClassificationTreeVO>> list(Long id,Long projectId) {
+		if(projectId==null){
+			throw new ServiceException("请选择项目");
+		}
+		List<TrialClassificationTreeVO> list = trialClassificationTreeService.selectAllNode(id,projectId);
+		return R.data(list);
+	}
+
+//	/**
+//	 * 自定义分页 德飞试验系统检测分类树
+//	 */
+//	@GetMapping("/page")
+//	@ApiOperationSupport(order = 3)
+//	@ApiOperation(value = "分页", notes = "传入trialClassificationTree")
+//	public R<IPage<TrialClassificationTreeVO>> page(TrialClassificationTreeVO trialClassificationTree, Query query) {
+//		IPage<TrialClassificationTreeVO> pages = trialClassificationTreeService.selectTrialClassificationTreePage(Condition.getPage(query), trialClassificationTree);
+//		return R.data(pages);
+//	}
+
+	/**
+	 * 新增 德飞试验系统检测分类树
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入trialClassificationTree")
+	public R save(@Valid @RequestBody TrialClassificationTreeDTO1 dto) {
+		Boolean flag=false;
+		if(dto.getGroupType()!=null&&dto.getGroupType()==1){
+			if(dto.getList().size()>1){
+				trialClassificationTreeService.deleteByGroupType(dto.getGroupType());
+				flag=true;
+			}
+		}
+		// 假设您有一个 List<TrialClassificationTreeDTO> list
+		Map<Long, Long> map = dto.getList().stream()
+				.collect(Collectors.toMap(
+						TrialClassificationTreeDTO::getId, // 按 parentId 分组
+						TrialClassificationTreeDTO::getParentId // 收集每个分组的 id 列表
+				));
+		List<TrialClassificationTree>insertList=new ArrayList<>();
+		for (TrialClassificationTreeDTO trialClassificationTreeDTO : dto.getList()) {
+			TrialClassificationTree trialClassificationTree = new TrialClassificationTree();
+			BeanUtil.copy(trialClassificationTreeDTO, trialClassificationTree);
+			Long parentId = trialClassificationTree.getParentId();
+			StringBuilder classificationAncestors = new StringBuilder();
+			classificationAncestors.append(trialClassificationTree.getId());
+			if(parentId!=0){
+				classificationAncestors.append( ",").append(parentId);
+			}
+			while (parentId!=null&&parentId!=0){
+				parentId = selectAncestors(parentId,map,flag);
+				if(parentId!=null&&parentId!=0){
+					classificationAncestors.append(",").append(parentId);
+				}
+			}
+			trialClassificationTree.setClassificationAncestors(classificationAncestors.toString());
+			trialClassificationTree.setGroupType(dto.getGroupType());
+			insertList.add(trialClassificationTree);
+		}
+		return R.status(trialClassificationTreeService.saveBatch(insertList));
+	}
+
+	public Long selectAncestors(Long parentId,Map<Long, Long> map,Boolean flag) {
+		if(parentId==0){
+			return null;
+		}
+		if(map.containsKey(parentId)){
+			if(map.get(parentId)!=null){
+				return map.get(parentId);
+			}
+		}else {
+			if(!flag){
+				return trialClassificationTreeService.selectAncestors(parentId);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * 修改 德飞试验系统检测分类树
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入trialClassificationTree")
+	public R update(Long id,String classificationName) {
+		if(id==null){
+			return R.fail("请选择要修改的分类");
+		}
+		if(Func.isEmpty(classificationName)){
+			return R.fail("请输入分类名称");
+		}
+		TrialClassificationTree trialClassificationTree = new TrialClassificationTree();
+		trialClassificationTree.setClassificationName(classificationName);
+		return R.status(trialClassificationTreeService.update(new UpdateWrapper<TrialClassificationTree>().set("classification_name", classificationName).eq("id", id)));
+	}
+
+//	/**
+//	 * 新增或修改 德飞试验系统检测分类树
+//	 */
+//	@PostMapping("/submit")
+//	@ApiOperationSupport(order = 6)
+//	@ApiOperation(value = "新增或修改", notes = "传入trialClassificationTree")
+//	public R submit(@Valid @RequestBody List<TrialClassificationTree> trialClassificationTrees) {
+//		return R.status(trialClassificationTreeService.saveOrUpdateBatch(trialClassificationTrees));
+//	}
+
+	
+//	/**
+//	 * 删除 德飞试验系统检测分类树
+//	 */
+//	@PostMapping("/remove")
+//	@ApiOperationSupport(order = 7)
+//	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+//	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+//		return R.status(trialClassificationTreeService.deleteLogic(Func.toLongList(ids)));
+//	}
+
+
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入id")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam Long id) {
+		boolean update = trialClassificationTreeService.update(new UpdateWrapper<TrialClassificationTree>().set("is_deleted", 1).in("classification_ancestors", id));
+		return R.status(update);
+	}
+}

+ 100 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialCyController.java

@@ -0,0 +1,100 @@
+package org.springblade.business.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springblade.business.entity.TrialContainerClassification;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyTestType;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.service.TrialCyService;
+import org.springblade.business.service.TrialCyTestTypeService;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+import org.springblade.core.tool.api.R;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 成渝试验数据接口
+ * @author LHB
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/cyTrial")
+@Api(value = "成渝试验数据接口", tags = "成渝试验数据接口")
+public class TrialCyController {
+
+    private TrialCyService trialCyService;
+
+
+    /**
+     * 根据合同段id验证当前合同段是否未成渝项目下未开启试验功能的合同段
+     * @return
+     */
+    @GetMapping("/isCyAndTestModule")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "验证是否使用成渝那边的树", notes = "传入合同段id")
+    public R<Boolean> isCyAndTestModule(Long projectId,Long contractId){
+        return R.data(trialCyService.isCyAndTestModule(projectId, contractId));
+    }
+
+    /**
+     * 获取成渝那边的树
+     * @return
+     */
+    @GetMapping("/getTree")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "获取成渝那边的树", notes = "传入项目id")
+    public R<List<TrialCyTestType>> getTree(Long projectId, String parentId){
+        return R.data(trialCyService.getTree(projectId,parentId));
+    }
+
+    /**
+     * 获取试验检测报告
+     * @return
+     */
+    @GetMapping("/getTrialDetectionReport")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "获取试验检测报告", notes = "")
+    public R<Page<ThirdReportVo>> getTrialDetectionReport(@Validated TrialCyThirdReportQueryVo queryVo){
+        return R.data(trialCyService.getTrialDetectionReport(queryVo));
+    }
+
+
+    /**
+     * 获取第三方/外委 检测报告
+     * @return
+     */
+    @GetMapping("/getThirdReport")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "获取第三方/外委 检测报告", notes = "")
+    public R<Page<ThirdReportVo>> getThirdReport(@Validated TrialCyThirdReportQueryVo queryVo){
+        return R.data(trialCyService.getThirdReport(queryVo));
+    }
+
+
+    /**
+     * 清除成渝试验关联
+     * @return
+     */
+    @GetMapping("/clearTrialAssociation")
+    @ApiOperation(value = "清除成渝试验关联", notes = "")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "nodeId", value = "节点", required = true),
+            @ApiImplicitParam(name = "recordId", value = "pkeyId", required = true)
+    })
+    public R<Boolean> clearTrialAssociation(Long nodeId, Long recordId){
+        return R.data(trialCyService.clearTrialAssociation(nodeId,recordId));
+    }
+
+}

+ 166 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialSystemDockingController.java

@@ -0,0 +1,166 @@
+/*
+ *      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.business.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.apache.commons.lang.StringUtils;
+import org.springblade.business.dto.TrialSystemDockingDTO;
+import org.springblade.business.dto.TrialSystemDockingDTO1;
+import org.springblade.business.entity.TrialClassificationTree;
+import org.springblade.business.service.ITrialClassificationTreeService;
+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.BeanUtil;
+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.business.entity.TrialSystemDocking;
+import org.springblade.business.vo.TrialSystemDockingVO;
+import org.springblade.business.service.ITrialSystemDockingService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 德飞试验系统对接表 控制器
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/trialsystemdocking")
+@Api(value = "德飞试验系统对接表", tags = "德飞试验系统对接表接口")
+public class TrialSystemDockingController extends BladeController {
+
+	private final ITrialSystemDockingService trialSystemDockingService;
+
+	private final ITrialClassificationTreeService trialClassificationTreeService;
+
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入trialSystemDocking")
+	public R<TrialSystemDocking> detail(@RequestParam Long id) {
+		TrialSystemDocking detail = trialSystemDockingService.getById(id);
+		return R.data(detail);
+	}
+
+//	/**
+//	 * 分页 德飞试验系统对接表
+//	 */
+//	@GetMapping("/list")
+//	@ApiOperationSupport(order = 2)
+//	@ApiOperation(value = "分页", notes = "传入trialSystemDocking")
+//	public R<IPage<TrialSystemDocking>> list(TrialSystemDocking trialSystemDocking, Query query) {
+//		IPage<TrialSystemDocking> pages = trialSystemDockingService.page(Condition.getPage(query), Condition.getQueryWrapper(trialSystemDocking));
+//		return R.data(pages);
+//	}
+
+	/**
+	 * 自定义分页 德飞试验系统对接表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入trialSystemDocking")
+	public R<IPage<TrialSystemDockingVO>> page(TrialSystemDockingVO trialSystemDocking, Query query) {
+		IPage<TrialSystemDockingVO> pages = trialSystemDockingService.selectTrialSystemDockingPage(Condition.getPage(query), trialSystemDocking);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 德飞试验系统对接表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入trialSystemDocking")
+	public R save(@Valid @RequestBody List<TrialSystemDockingDTO> list) {
+		List<TrialSystemDocking>list1=new ArrayList<>();
+		for (TrialSystemDockingDTO trialSystemDockingDTO : list) {
+			TrialSystemDocking trialSystemDocking = new TrialSystemDocking();
+			BeanUtil.copy(trialSystemDockingDTO,trialSystemDocking);
+			TrialClassificationTree trialClassificationTree = trialClassificationTreeService.getById(trialSystemDockingDTO.getClassificationId());
+			if(trialClassificationTree!=null){
+				trialSystemDocking.setClassificationAncestors(trialClassificationTree.getClassificationAncestors());
+			}
+			list1.add(trialSystemDocking);
+		}
+		boolean b = trialSystemDockingService.saveBatch(list1);
+		if(b){
+			//异步下载文件并且上传Oss
+			trialSystemDockingService.syncUpdateFile(list1);
+		}
+		Map<Long, Long> map = list1.stream().collect(Collectors.toMap(TrialSystemDocking::getDataId, TrialSystemDocking::getId));
+		return R.data(map);
+	}
+
+	/**
+	 * 修改 德飞试验系统对接表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入trialSystemDocking")
+	public R update(@Valid @RequestBody TrialSystemDockingDTO1 trialSystemDockingDTO) {
+		TrialSystemDocking trialSystemDocking = trialSystemDockingService.getById(trialSystemDockingDTO.getId());
+		BeanUtil.copy(trialSystemDockingDTO,trialSystemDocking);
+		if(StringUtils.isNotEmpty(trialSystemDockingDTO.getFileUrl())&&!trialSystemDockingDTO.getFileUrl().equals(trialSystemDocking.getFileUrl())){
+			trialSystemDockingService.syncUpdateFile1(trialSystemDocking);
+		}
+		return R.status(trialSystemDockingService.updateById(trialSystemDocking));
+	}
+
+//	/*
+//	 * 新增或修改 德飞试验系统对接表
+//	 */
+//	@PostMapping("/submit")
+//	@ApiOperationSupport(order = 6)
+//	@ApiOperation(value = "新增或修改", notes = "传入trialSystemDocking")
+//	public R submit(@Valid @RequestBody TrialSystemDocking trialSystemDocking) {
+//		return R.status(trialSystemDockingService.saveOrUpdate(trialSystemDocking));
+//	}
+
+	
+	/**
+	 * 删除 德飞试验系统对接表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		if (Func.isEmpty(ids)) {
+			return R.fail("参数错误");
+		}
+		trialSystemDockingService.updatedelete(Func.toLongList(ids));
+		return R.status(true);
+	}
+
+}

+ 118 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/TrialCyAccessoriesClientImpl.java

@@ -0,0 +1,118 @@
+package org.springblade.business.feignClient;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.AllArgsConstructor;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.feign.TrialCyAccessoriesClient;
+import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
+import org.springblade.business.service.TrialCyFinishTestReportService;
+import org.springblade.business.service.TrialCyThirdReportService;
+import org.springblade.core.tool.utils.CollectionUtil;
+import org.springblade.manager.entity.TableFile;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author LHB
+ */
+@RestController
+@AllArgsConstructor
+public class TrialCyAccessoriesClientImpl implements TrialCyAccessoriesClient {
+
+    private final TrialSelfInspectionRecordMapper trialSelfInspectionRecordMapper;
+
+    /**
+     * 第三方、外委
+     */
+    private final TrialCyThirdReportService trialCyThirdReportService;
+
+    /**
+     * 试验报告
+     */
+    private final TrialCyFinishTestReportService trialCyFinishTestReportService;
+
+    @Override
+    public List<JSONObject> getTrialFilePdfRecord(String primaryKeyId, List<Integer> list) {
+        //获取id
+        List<Map<String, Object>> trialFilePdfRecord = trialSelfInspectionRecordMapper.getTrialFilePdfRecord(primaryKeyId, list);
+
+        if (CollectionUtil.isNotEmpty(trialFilePdfRecord)) {
+
+            //试验报告ids
+            List<Long> listOne = new ArrayList<>();
+            //第三方外委ids
+            List<Long> listTwo = new ArrayList<>();
+
+            for (Map<String, Object> stringObjectMap : trialFilePdfRecord) {
+
+                Integer type = (Integer) stringObjectMap.get("type");
+                Long recordId = (Long) stringObjectMap.get("record_id");
+                //试验报告
+                if (type == 11) {
+                    listOne.add(recordId);
+                } else {
+                    //第三方、外委
+                    listTwo.add(recordId);
+                }
+            }
+
+            List<JSONObject> result = new ArrayList<>();
+
+            if (CollectionUtil.isNotEmpty(listOne)) {
+                List<TrialCyFinishTestReport> list1 = trialCyFinishTestReportService.list(Wrappers.<TrialCyFinishTestReport>lambdaQuery()
+                        .isNotNull(TrialCyFinishTestReport::getAssembleFile)
+                        .in(TrialCyFinishTestReport::getTaskId, listOne)
+                );
+
+                if (CollectionUtil.isNotEmpty(list1)) {
+                    list1.forEach(f -> {
+                        String[] split = f.getAssembleFile().split("/");
+                        JSONObject jsonObject = new JSONObject();
+                        jsonObject.put("id", f.getTaskId());
+                        jsonObject.put("name", split[split.length - 1]);
+                        jsonObject.put("contractId", f.getContractId());
+                        jsonObject.put("domainUrl", f.getAssembleFile());
+                        jsonObject.put("domainPdfUrl", f.getAssembleFile());
+                        jsonObject.put("tabId", primaryKeyId);
+                        jsonObject.put("extension", "pdf");
+                        //是否为试验关联的附件
+                        jsonObject.put("isTrial", true);
+                        result.add(jsonObject);
+                    });
+                }
+            }
+            if (CollectionUtil.isNotEmpty(listTwo)) {
+                List<TrialCyThirdReport> list1 = trialCyThirdReportService.list(Wrappers.<TrialCyThirdReport>lambdaQuery()
+                        .isNotNull(TrialCyThirdReport::getAssembleFile)
+                        .in(TrialCyThirdReport::getId, listTwo)
+                );
+
+                if (CollectionUtil.isNotEmpty(list1)) {
+                    list1.forEach(f -> {
+                        String[] split = f.getAssembleFile().split("/");
+                        JSONObject jsonObject = new JSONObject();
+                        jsonObject.put("id", f.getId());
+                        jsonObject.put("name", split[split.length - 1]);
+                        jsonObject.put("contractId", f.getContractId());
+                        jsonObject.put("domainUrl", f.getAssembleFile());
+                        jsonObject.put("domainPdfUrl", f.getAssembleFile());
+                        jsonObject.put("tabId", primaryKeyId);
+                        jsonObject.put("extension", "pdf");
+                        //是否为试验关联的附件
+                        jsonObject.put("isTrial", true);
+                        result.add(jsonObject);
+                    });
+                }
+            }
+            return result;
+        }
+
+        return null;
+    }
+}

+ 3 - 3
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/WbsTreeContractStatisticsClientImpl.java

@@ -45,19 +45,19 @@ public class WbsTreeContractStatisticsClientImpl implements WbsTreeContractStati
             if (!queryList.isEmpty()) {
                 for (InformationQuery query : queryList) {
                     if (map.containsKey(query.getWbsId() + "," + query.getContractId() + "," + query.getClassify())) {
+                        redisTemplate.opsForList().remove("blade:statistics:information_query_statistics_key", 1, query.getId() + "");
                         continue;
                     }
                     try {
                         wbsTreeContractStatisticsService.updateInformationNumber(query.getWbsId(), query.getClassify(), query.getContractId());
                         map.put(query.getWbsId() + "," + query.getContractId() + "," + query.getClassify(), "");
+                        redisTemplate.opsForList().remove("blade:statistics:information_query_statistics_key", 1, query.getId() + "");
                     } catch (Exception e) {
+                        redisTemplate.opsForList().remove("blade:statistics:information_query_statistics_key", 1, query.getId() + "");
                         redisTemplate.opsForList().rightPush("blade:statistics:information_query_statistics_key", query.getId() + "");
                         log.error("updateInformationQueryStatus wbsId = {}, contractId = {}, classify = {}", query.getWbsId(), query.getContractId(), query.getClassify() , e);
                     }
                 }
-                for (String queryId : queryIds) {
-                    redisTemplate.opsForList().remove("blade:statistics:information_query_statistics_key", 1, queryId);
-                }
             }
         }
     }

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/EntrustInfoMapper.xml

@@ -71,6 +71,9 @@
         <if test="param2.entrustName != null and param2.entrustName != ''">
             AND ( a.entrust_name like CONCAT(CONCAT('%', #{param2.entrustName}), '%') or a.entrust_no like CONCAT(CONCAT('%', #{param2.entrustName}), '%') or b.material_name like CONCAT(CONCAT('%', #{param2.entrustName}), '%'))
         </if>
+        <if test="param2.entrustNo != null and param2.entrustNo != ''">
+            AND a.entrust_no like CONCAT(CONCAT('%', #{param2.entrustNo}), '%')
+        </if>
     </select>
 
     <select id="getReportDetail" resultType="org.springblade.business.vo.EntrustDataInfoVO">

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ImageClassificationFileMapper.xml

@@ -126,7 +126,7 @@
                 order by shooting_time desc
             ) as files
         where
-            1 = 1
+        1 = 1
         <if test="param.queryDate != null and param.queryDate != ''">
             and files.shootingTimeStr like concat('%',#{param.queryDate},'%')
         </if>

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.java

@@ -42,7 +42,7 @@ public interface InformationQueryMapper extends BaseMapper<InformationQuery> {
 
     List<WbsTreeContractTreeVOS> queryContractTree(@Param("contractId") String contractId, @Param("parentId") String parentId, @Param("classify") Integer classify);
 
-    List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(@Param("primaryKeyId") String primaryKeyId, @Param("classify") Integer classify);
+    List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(@Param("primaryKeyId") String primaryKeyId, @Param("classify") Integer classify, @Param("dateIsComplete") Integer dateIsComplete);
 
     /**
      * 查询工序节点的填报记录
@@ -57,7 +57,7 @@ public interface InformationQueryMapper extends BaseMapper<InformationQuery> {
     /**
      * 查询工序节点的填报记录
      */
-    List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(@Param("parentId") String parentId, @Param("classify") Integer classify, @Param("contractId") String contractId);
+    List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(@Param("parentId") String parentId, @Param("classify") Integer classify, @Param("contractId") String contractId, @Param("dateIsComplete") Integer dateIsComplete);
 
     /**
      * 查询工序节点的填报记录3

+ 32 - 22
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -50,6 +50,13 @@
         <result column="evaluate" property="evaluate"/>
         <result column="queryType" property="queryType"/>
         <result column="isExperiment" property="isExperiment"/>
+        <result column="dateIsComplete" property="dateIsComplete"/>
+        <result column="infoQueryName" property="infoQueryName"/>
+        <result column="pdfUrl" property="pdfUrl"/>
+        <result column="privateTableFileType" property="privateTableFileType"/>
+        <result column="contractTableFileType" property="contractTableFileType"/>
+        <result column="contractTableFileTypeTwo" property="contractTableFileTypeTwo"/>
+        <result column="pdfUrl" property="pdfUrl"/>
     </resultMap>
 
     <resultMap id="queryContractTreeMap" type="org.springblade.manager.vo.WbsTreeContractTreeVOS">
@@ -428,10 +435,16 @@
                wtc.p_key_id,
                wtc.ancestors,
                wtc.major_data_type,
+               case when wtc.date_is_complete = 1 then '是' else '否' end AS dateIsComplete,
                IFNULL(if(length(trim(wtc.full_name)) > 0, wtc.full_name, wtc.node_name), wtc.node_name) AS     title,
                wtc.parent_id                                                                            AS     parentId,
                uiq.id                                                                                   AS     informationQueryId,
+               uiq.name                                                                                   AS     infoQueryName,
+               uiq.pdf_url                                                                                   AS     pdfUrl,
                uiq.status,
+               p.table_file_type									                                    AS privateTableFileType,
+               (select GROUP_CONCAT(DISTINCT table_file_type) from u_trial_file_pdf_record where node_id = wtc.p_key_id) contractTableFileType,
+               (select GROUP_CONCAT(DISTINCT type) from m_table_file where tab_id = wtc.p_key_id and is_deleted = 0 and classify = #{classify}) contractTableFileTypeTwo,
                (
                    select case iq.status
                               WHEN 2 then 'true'
@@ -450,26 +463,14 @@
         AS isExperiment
         FROM
         m_wbs_tree_contract AS wtc
-        LEFT JOIN u_information_query AS uiq ON wtc.p_key_id = uiq.wbs_id AND uiq.classify =
-        #{classify}
-        and
-        uiq
-        .
-        is_deleted
-        =
-        0
+        LEFT JOIN u_information_query AS uiq ON wtc.p_key_id = uiq.wbs_id AND uiq.classify = #{classify} and uiq.is_deleted =  0 and uiq.status != 3
+        left join m_wbs_tree_private p on wtc.is_type_private_pid = p.p_key_id
         WHERE
-        wtc
-        .
-        p_key_id
-        =
-        #{primaryKeyId}
-        AND
-        wtc
-        .
-        is_deleted
-        =
-        0
+        wtc.p_key_id = #{primaryKeyId}
+        AND  wtc.is_deleted = 0
+        <if test="dateIsComplete != null">
+            AND wtc.date_is_complete = #{dateIsComplete}
+        </if>
     </select>
 
     <select id="queryProcessDataByParentIdAndContractId" resultMap="queryProcessDataMap">
@@ -822,6 +823,7 @@
     </select>
     <select id="queryProcessDataByParentIdAndContractIdTwo" resultMap="queryProcessDataMap">
         SELECT wtc.id                                                                                   AS treeId,
+               case when wtc.date_is_complete = 1 then '是' else '否' end                                AS dateIsComplete,
                wtc.p_key_id,
                wtc.ancestors,
                wtc.major_data_type,
@@ -831,20 +833,28 @@
                uiq.id                                                                                   AS informationQueryId,
                IFNULL(uiq.status, 0)                                                                    AS status,
                uiq.type                                                                                 AS queryType,
+               uiq.name                                                                                 AS infoQueryName,
+               uiq.pdf_url                                                                              AS pdfUrl,
+               p.table_file_type									                                    AS privateTableFileType,
+               (select GROUP_CONCAT(DISTINCT table_file_type) from u_trial_file_pdf_record where node_id = wtc.p_key_id) contractTableFileType,
+               (select GROUP_CONCAT(DISTINCT type) from m_table_file where tab_id = wtc.p_key_id and is_deleted = 0 and classify = #{classify}) contractTableFileTypeTwo,
                case
                    WHEN uiq.pdf_trial_url is null then 'false'
                    ELSE 'true' end                                                                      AS isExperiment
         FROM m_wbs_tree_contract AS wtc
                  LEFT JOIN u_information_query AS uiq
                            ON wtc.p_key_id = uiq.wbs_id AND uiq.classify = #{classify} and uiq.is_deleted = 0 and
-                              wtc.is_deleted = 0 and
-                              wtc.status = 1
+                              uiq.status != 3
+                 left join m_wbs_tree_private p on wtc.is_type_private_pid = p.p_key_id
         WHERE wtc.type = 1
           AND wtc.major_data_type in (0, 1, 2, 3, 4)
-          AND wtc.ancestors like concat('%', #{parentId}, '%')
+          AND wtc.ancestors_p_id like concat(#{parentId}, '%')
           AND wtc.contract_id = #{contractId}
           AND wtc.is_deleted = 0
           AND wtc.status = 1
+        <if test="dateIsComplete != null">
+            AND wtc.date_is_complete = #{dateIsComplete}
+        </if>
     </select>
 
     <select id="queryProcessDataByParentIdAndContractId_3" resultMap="queryProcessDataMap">

+ 50 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.java

@@ -0,0 +1,50 @@
+/*
+ *      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.business.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialClassificationTree;
+import org.springblade.business.vo.TrialClassificationTreeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 德飞试验系统检测分类树 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+public interface TrialClassificationTreeMapper extends BaseMapper<TrialClassificationTree> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param trialClassificationTree
+	 * @return
+	 */
+	List<TrialClassificationTreeVO> selectTrialClassificationTreePage(IPage page, TrialClassificationTreeVO trialClassificationTree);
+
+    void deleteById1(Long id);
+
+	Long selectAncestors(Long parentId);
+
+    List<TrialClassificationTreeVO> selectAllNode(@Param("id") Long id, @Param("projectId") Long projectId);
+
+	void deleteByGroupType(@Param("groupType") Integer groupType);
+}

+ 45 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.xml

@@ -0,0 +1,45 @@
+<?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.business.mapper.TrialClassificationTreeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="trialClassificationTreeResultMap" type="org.springblade.business.entity.TrialClassificationTree">
+        <result column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="classification_name" property="classificationName"/>
+    </resultMap>
+    <update id="deleteById1">
+        update u_trial_classification_tree set is_deleted = 1 where classification_ancestors  like concat('%',#{id},'%')
+    </update>
+    <delete id="deleteByGroupType">
+        delete from u_trial_classification_tree where group_type = #{groupType}
+    </delete>
+
+
+    <select id="selectTrialClassificationTreePage" resultMap="trialClassificationTreeResultMap">
+        select * from u_trial_classification_tree where is_deleted = 0
+    </select>
+    <select id="selectAncestors" resultType="java.lang.Long">
+        select parent_id from u_trial_classification_tree where id = #{parentId} and is_deleted = 0
+    </select>
+    <select id="selectAllNode" resultType="org.springblade.business.vo.TrialClassificationTreeVO">
+        select tree.id,tree.parent_id,tree.project_id,tree.classification_name,(
+            SELECT
+                CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+            FROM
+             u_trial_classification_tree
+            WHERE
+                parent_id = tree.id and is_deleted = 0
+        ) AS "has_children"
+        from u_trial_classification_tree tree
+        where tree.is_deleted = 0 and tree.project_id = #{projectId}
+        <if test="id!=null and id!=''">
+            and tree.parent_id = #{id}
+        </if>
+        <if test="id==null or id==''">
+            and tree.parent_id = 0
+        </if>
+    </select>
+
+</mapper>

+ 27 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyAccessoriesMapper.java

@@ -0,0 +1,27 @@
+package org.springblade.business.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialCyAccessories;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_accessories(成渝-附件信息)】的数据库操作Mapper
+* @createDate 2025-08-04 14:39:16
+* @Entity generator.domain.UTrialCyAccessories
+*/
+public interface TrialCyAccessoriesMapper extends BaseMapper<TrialCyAccessories> {
+
+    Boolean clearTrialAssociation(@Param("nodeId") Long nodeId,
+                                  @Param("recordId") Long recordId);
+
+    List<String> selectFilePdfList(@Param("nodeId") Long nodeId,
+                                   @Param("types") Integer... types);
+}
+
+
+
+

+ 28 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyAccessoriesMapper.xml

@@ -0,0 +1,28 @@
+<?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.business.mapper.TrialCyAccessoriesMapper">
+
+    <resultMap id="BaseResultMap" type="org.springblade.business.entity.TrialCyAccessories">
+            <id property="id" column="id" />
+            <result property="reportId" column="report_id" />
+            <result property="accId" column="acc_id" />
+            <result property="accType" column="acc_type" />
+            <result property="fileName" column="file_name" />
+            <result property="filePath" column="file_path" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,report_id,acc_id,acc_type,file_name,file_path
+    </sql>
+    <delete id="clearTrialAssociation">
+        delete from u_trial_file_pdf_record where node_id = #{nodeId} and record_id=#{recordId}
+    </delete>
+    <select id="selectFilePdfList" resultType="java.lang.String">
+        select record_id from u_trial_file_pdf_record where node_id = #{nodeId} and type in
+          <foreach collection="types" item="type" open="(" close=")" separator=",">
+              #{type}
+          </foreach>
+    </select>
+</mapper>

+ 23 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyFinishTestReportMapper.java

@@ -0,0 +1,23 @@
+package org.springblade.business.mapper;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_finish_test_report(成渝-获取标段已完成(已签章完成)的检测报告)】的数据库操作Mapper
+* @createDate 2025-08-01 09:05:03
+* @Entity generator.domain.UTrialCyFinishTestReport
+*/
+public interface TrialCyFinishTestReportMapper extends BaseMapper<TrialCyFinishTestReport> {
+
+    Page<ThirdReportVo> myPage(Page<ThirdReportVo> page, @Param("query") TrialCyThirdReportQueryVo queryVo);
+}
+
+
+
+

+ 37 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyFinishTestReportMapper.xml

@@ -0,0 +1,37 @@
+<?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.business.mapper.TrialCyFinishTestReportMapper">
+    <select id="myPage" resultType="org.springblade.business.vo.ThirdReportVo">
+        select
+            task_id id,
+            contract_id contractId,
+            report_number reportNo,
+            report_date reportDate,
+            position projectPositionName,
+            case
+                when experiment_result = 1 then '合格'
+                else '不合格'
+            end detectionResultName,
+        (select count(0) > 0 from u_trial_file_pdf_record where node_id = #{query.qualityTestPKeyId}  and type = 11 and record_id = t.id) isSelectedStatus
+        from u_trial_cy_finish_test_report t
+        <where>
+            <if test="query.contractId != null">
+                AND contract_id = #{query.contractId}
+            </if>
+            <if test="query.nodeId != null">
+                AND exam_name_info_id = #{query.nodeId}
+            </if>
+            <if test="query.startTime != null">
+                AND report_date >= #{query.startTime}
+            </if>
+            <if test="query.endTime != null">
+                AND report_date &lt;= #{query.endTime}
+            </if>
+            <if test="query.reportType != null">
+                AND cs = #{query.reportType}
+            </if>
+        </where>
+    </select>
+</mapper>

+ 23 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyTestTypeMapper.java

@@ -0,0 +1,23 @@
+package org.springblade.business.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialCyTestType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_test_type(成渝-试验检测树)】的数据库操作Mapper
+* @createDate 2025-08-01 09:05:07
+* @Entity generator.domain.UTrialCyTestType
+*/
+public interface TrialCyTestTypeMapper extends BaseMapper<TrialCyTestType> {
+
+    List<TrialCyTestType> getTree(@Param("projectId") Long projectId,
+                                  @Param("parentId") String parentId);
+}
+
+
+
+

+ 24 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyTestTypeMapper.xml

@@ -0,0 +1,24 @@
+<?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.business.mapper.TrialCyTestTypeMapper">
+    <sql id="Base_sql">
+        p_key_id,
+        project_id,
+        id,
+        father_id,
+        name,
+        order_index,
+        create_time
+    </sql>
+    <select id="getTree" resultType="org.springblade.business.entity.TrialCyTestType">
+        select
+            <include refid="Base_sql"/>,
+            (select count(1) > 0 from u_trial_cy_test_type where father_id = t.id) has_children
+        from u_trial_cy_test_type t
+        where project_id = #{projectId}
+          and father_id = #{parentId}
+        order by order_index
+    </select>
+</mapper>

+ 24 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyThirdReportMapper.java

@@ -0,0 +1,24 @@
+package org.springblade.business.mapper;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialCyThirdReport;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_third_report(成渝-已上传的外委检测报告/第三方检测报告/上传报告)】的数据库操作Mapper
+* @createDate 2025-08-01 09:05:10
+* @Entity generator.domain.UTrialCyThirdReport
+*/
+public interface TrialCyThirdReportMapper extends BaseMapper<TrialCyThirdReport> {
+
+    Page<ThirdReportVo> myPage(Page<ThirdReportVo> page,
+                               @Param("query") TrialCyThirdReportQueryVo queryVo);
+}
+
+
+
+

+ 36 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialCyThirdReportMapper.xml

@@ -0,0 +1,36 @@
+<?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.business.mapper.TrialCyThirdReportMapper">
+    <select id="myPage" resultType="org.springblade.business.vo.ThirdReportVo">
+        select
+            id,
+            contract_id contractId,
+            report_no reportNo,
+            report_date reportDate,
+            project_part projectPositionName,
+            case when is_qualified = 1 then '合格'
+                else '不合格'
+            end detectionResultName,
+        (select count(0) > 0 from u_trial_file_pdf_record where node_id = #{query.qualityTestPKeyId}  and type in(12,13) and record_id = t.id) isSelectedStatus
+        from u_trial_cy_third_report t
+        <where>
+            <if test="query.contractId != null">
+                AND contract_id = #{query.contractId}
+            </if>
+            <if test="query.type != null">
+                AND `third_type` = #{query.type}
+            </if>
+            <if test="query.startTime != null">
+                AND report_date >= #{query.startTime}
+            </if>
+            <if test="query.endTime != null">
+                AND report_date &lt;= #{query.endTime}
+            </if>
+            <if test="query.nodeId != null">
+                AND exam_name_info_id = #{query.nodeId}
+            </if>
+        </where>
+    </select>
+</mapper>

+ 4 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.java

@@ -7,6 +7,7 @@ import org.springblade.business.entity.TrialSelfInspectionRecord;
 import org.springblade.manager.entity.WbsTreeContract;
 
 import java.util.List;
+import java.util.Map;
 
 public interface TrialSelfInspectionRecordMapper extends BaseMapper<TrialSelfInspectionRecord> {
 
@@ -34,7 +35,7 @@ public interface TrialSelfInspectionRecordMapper extends BaseMapper<TrialSelfIns
 
     void deleteSeletedStatusByNodeId(String nodeId, Integer type, String recordId);
 
-    void insertSeletedStatus(Long id, String nodeId, Integer type, String recordId);
+    void insertSeletedStatus(Long id, String nodeId, Integer type, String recordId, String tableFileType);
 
     List<String> selectCountSeletedStatus(String nodeId, Integer type);
 
@@ -45,4 +46,6 @@ public interface TrialSelfInspectionRecordMapper extends BaseMapper<TrialSelfIns
     @Select("select self_id from u_trial_self_quality_project where quality_node_id = #{pKeyId}")
     List<String> selectTrialIdByNodeId(Long pKeyId);
 
+    List<Map<String,Object>> getTrialFilePdfRecord(@Param("nodeId") String nodeId,
+                                                   @Param("types") List<Integer> types);
 }

+ 7 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.xml

@@ -42,7 +42,7 @@
     </insert>
 
     <insert id="insertSeletedStatus">
-        insert into u_trial_file_pdf_record(id,node_id,type,record_id) values ( #{id} , #{nodeId} , #{type} , #{recordId} )
+        insert into u_trial_file_pdf_record(id,node_id,type,record_id,table_file_type) values ( #{id} , #{nodeId} , #{type} , #{recordId} , #{tableFileType})
     </insert>
 
     <update id="updateInformationQuery">
@@ -108,5 +108,11 @@
             </if>
         </where>
     </select>
+    <select id="getTrialFilePdfRecord" resultType="java.util.Map">
+        select record_id,type from u_trial_file_pdf_record where node_id = #{nodeId} and `type` in
+       <foreach collection="types" item="type" open="(" close=")" separator=",">
+           #{type}
+       </foreach>
+    </select>
 
 </mapper>

+ 43 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      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.business.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialSystemDocking;
+import org.springblade.business.vo.TrialSystemDockingVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 德飞试验系统对接表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+public interface TrialSystemDockingMapper extends BaseMapper<TrialSystemDocking> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param trialSystemDocking
+	 * @return
+	 */
+	List<TrialSystemDockingVO> selectTrialSystemDockingPage(IPage page, @Param("vo") TrialSystemDockingVO trialSystemDocking);
+
+}

+ 37 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.xml

@@ -0,0 +1,37 @@
+<?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.business.mapper.TrialSystemDockingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="trialSystemDockingResultMap" type="org.springblade.business.vo.TrialSystemDockingVO">
+        <result column="id" property="id"/>
+        <result column="report_name" property="reportName"/>
+        <result column="report_number" property="reportNumber"/>
+        <result column="unit_name" property="unitName"/>
+        <result column="classification_id" property="classificationId"/>
+        <result column="specification" property="specification"/>
+        <result column="report_type" property="reportType"/>
+        <result column="purpose_location" property="purposeLocation"/>
+        <result column="report_date" property="reportDate"/>
+        <result column="file_url" property="fileUrl"/>
+        <result column="person_in_charge" property="personInCharge"/>
+    </resultMap>
+
+
+    <select id="selectTrialSystemDockingPage" resultMap="trialSystemDockingResultMap">
+        select id,project_id,report_name,report_number,unit_name,classification_id,specification,report_type,purpose_location,report_date,file_url,person_in_charge from u_trial_system_docking where is_deleted = 0 and project_id=#{vo.projectId}
+        <if test="vo.reportName != null and vo.reportName != ''">
+            and report_name like concat('%',#{vo.reportName},'%')
+        </if>
+        <if test="vo.reportNumber != null and vo.reportNumber != ''">
+            and report_number like concat('%',#{vo.reportNumber},'%')
+        </if>
+        <if test="vo.classificationId != null and vo.classificationId != ''">
+            and classification_ancestors like concat('%',#{vo.classificationId},'%')
+        </if>
+        <if test="vo.reportType != null and vo.reportType != ''">
+            and report_type =#{vo.reportType}
+        </if>
+    </select>
+
+</mapper>

+ 704 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/ChenYuTestScheduled.java

@@ -0,0 +1,704 @@
+package org.springblade.business.scheduled;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.nacos.common.utils.MD5Utils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import org.springblade.business.entity.*;
+import org.springblade.business.scheduled.vo.*;
+import org.springblade.business.service.TrialCyAccessoriesService;
+import org.springblade.business.service.TrialCyFinishTestReportService;
+import org.springblade.business.service.TrialCyTestTypeService;
+import org.springblade.business.service.TrialCyThirdReportService;
+import org.springblade.business.utils.FileUtils;
+import org.springblade.common.constant.CommonConstant;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.common.utils.SystemUtils;
+import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.redis.cache.BladeRedis;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.*;
+import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springblade.system.cache.ParamCache;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
+
+/**
+ * 成渝试验第三方接口获取数据
+ * 定时任务
+ *
+ * @author LHB
+ */
+@Component
+@Slf4j
+public class ChenYuTestScheduled {
+
+    // 接口URL常量
+    private static final String THIRD_LOGIN_URL = "/api/ThirdSystem/ThirdLogin";
+    private static final String CONTRACT_SECT_URL = "/api/CQHCZC/MesureSystem/GetContractSectByProjCode";
+    private static final String FINISH_TEST_REPORT_URL = "/open/TestReport/GetFinishTestReport";
+    private static final String THIRD_REPORT_URL = "/open/ThirdReport/GetThirdReport";
+    private static final String ALL_TEST_TYPE_URL = "/open/ThirdReport/GetAllTestType";
+
+    // SQL常量
+    private static final String PROJECT_ID_SQL = "select id from m_project_info where project_number = ? and is_deleted = 0 limit 1";
+    private static final String APP_KEY_SQL = "select param_value from blade_param where param_key = 'cy.trial.appKey' and is_deleted = 0";
+    private static final String APP_SECRET_SQL = "select param_value from blade_param where param_key = 'cy.trial.appSecret' and is_deleted = 0";
+
+    @Resource
+    private JdbcTemplate jdbcTemplate;
+
+    @Resource
+    private BladeRedis bladeRedis;
+
+    @Resource
+    private TrialCyFinishTestReportService trialCyFinishTestReportService;
+
+    @Resource
+    private TrialCyTestTypeService trialCyTestTypeService;
+
+    @Resource
+    private TrialCyThirdReportService trialCyThirdReportService;
+
+    @Resource
+    private TrialCyAccessoriesService trialCyAccessoriesService;
+
+    @Resource
+    private NewIOSSClient newIOSSClient;
+
+    private CloseableHttpClient httpClient;
+    private static final String TOKEN_REDIS_KEY = "blade:cqcy:token";
+    private static final String PROJECT_CODE = "cqcyfx";
+    private static Long PROJECT_ID = null;
+    private static final String BASE_URL = "https://apicqcyfx.qdm123.com";
+    private final Map<String, Long> contractCodeMap = new ConcurrentHashMap<>();
+
+    @PostConstruct
+    public void init() {
+        this.httpClient = HttpClientBuilder.create().build();
+    }
+
+    @PreDestroy
+    public void destroy() {
+        if (httpClient != null) {
+            try {
+                httpClient.close();
+                log.info("HTTP client closed successfully");
+            } catch (IOException e) {
+                log.error("Error closing HTTP client", e);
+            }
+        }
+    }
+
+    /**
+     * 确保项目ID已初始化
+     */
+    private synchronized void ensureProjectIdInitialized() {
+        if (PROJECT_ID != null) return;
+
+        try {
+            List<ProjectInfo> projectList = jdbcTemplate.query(
+                    PROJECT_ID_SQL,
+                    new Object[]{PROJECT_CODE},
+                    new BeanPropertyRowMapper<>(ProjectInfo.class)
+            );
+
+            if (projectList != null && !projectList.isEmpty()) {
+                PROJECT_ID = projectList.get(0).getId();
+                log.info("Project ID initialized: {}", PROJECT_ID);
+            } else {
+                log.error("Project not found for code: {}", PROJECT_CODE);
+            }
+        } catch (Exception e) {
+            log.error("Error initializing project ID", e);
+        }
+    }
+
+    /**
+     * 获取有效的Token
+     */
+    private String getToken() {
+        String token = bladeRedis.get(TOKEN_REDIS_KEY);
+        if (token != null) {
+            return token;
+        }
+        return thirdLogin();
+    }
+
+    /**
+     * 登录获取Token
+     */
+    private String thirdLogin() {
+        ensureProjectIdInitialized();
+        if (PROJECT_ID == null) {
+            log.error("Project ID not available for login");
+            return null;
+        }
+
+        try {
+            String appKey = jdbcTemplate.queryForObject(APP_KEY_SQL, String.class);
+            String appSecret = jdbcTemplate.queryForObject(APP_SECRET_SQL, String.class);
+
+            if (StringUtil.isBlank(appKey) || StringUtil.isBlank(appSecret)) {
+                log.error("Missing appKey or appSecret configuration");
+                return null;
+            }
+
+            Long time = System.currentTimeMillis();
+            String md5Hex = MD5Utils.md5Hex(time + appKey + appSecret, "UTF-8");
+
+            ThirdLogin thirdLogin = new ThirdLogin();
+            thirdLogin.setAppKey(appKey);
+            thirdLogin.setTimestamp(time);
+            thirdLogin.setSecret(md5Hex);
+
+            Result result = postToken(BASE_URL + THIRD_LOGIN_URL, thirdLogin);
+            if (result == null || result.getState() != 1) {
+                log.error("Login failed: {}", result != null ? result.getMessage() : "No response");
+                return null;
+            }
+
+            JSONObject data = (JSONObject) result.getData();
+            String newToken = data.getString("token");
+            long expire = data.getLong("expireSecond") - 60;
+            bladeRedis.setEx(TOKEN_REDIS_KEY, newToken, expire);
+            return newToken;
+        } catch (Exception e) {
+            log.error("Login process failed", e);
+            return null;
+        }
+    }
+
+    /**
+     * 获取合同段列表
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getContractSectByProjCode() {
+        if (!SystemUtils.isLinux()) {
+            return;
+        }
+
+        contractCodeMap.clear();
+        String token = getToken();
+        ensureProjectIdInitialized();
+
+        if (token == null || PROJECT_ID == null) {
+            log.error("Invalid token or project ID");
+            return;
+        }
+
+        try {
+            //获取合同段列表接口
+            Result result = getContractList();
+            if (result == null || result.getState() != 1) {
+                log.error("Failed to get contract sections: {}",
+                        result != null ? result.getMessage() : "No response");
+                return;
+            }
+
+            JSONArray data = (JSONArray) result.getData();
+            if (CollectionUtil.isEmpty(data)) {
+                log.warn("No contract sections found");
+                return;
+            }
+
+            List<String> codes = new ArrayList<>();
+            for (int i = 0; i < data.size(); i++) {
+                JSONObject obj = data.getJSONObject(i);
+                String name = obj.getString("Name");
+                if (StringUtil.isNotBlank(name)) {
+                    codes.add(name);
+                }
+            }
+
+            if (CollectionUtil.isEmpty(codes)) {
+                log.info("No valid contract codes found");
+                return;
+            }
+
+            // 构建参数化查询
+            String placeholders = String.join(",", Collections.nCopies(codes.size(), "?"));
+            String sql = "SELECT * FROM m_contract_info WHERE contract_number IN (" + placeholders + ")";
+
+            List<ContractInfo> contracts = jdbcTemplate.query(
+                    sql,
+                    codes.toArray(),
+                    new BeanPropertyRowMapper<>(ContractInfo.class)
+            );
+
+            for (ContractInfo contract : contracts) {
+                contractCodeMap.put(contract.getContractNumber(), contract.getId());
+            }
+
+            log.info("Loaded {} contract mappings", contractCodeMap.size());
+        } catch (Exception e) {
+            log.error("Error processing contract sections", e);
+        }
+    }
+
+    /**
+     * 获取已完成的检测报告
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getFinishTestReport() {
+        if (!SystemUtils.isLinux()) {
+            return;
+        }
+
+        String token = getToken();
+        ensureProjectIdInitialized();
+
+        if (token == null || PROJECT_ID == null || contractCodeMap.isEmpty()) {
+            log.error("Preconditions not met for finish test report");
+            return;
+        }
+
+        for (Map.Entry<String, Long> entry : contractCodeMap.entrySet()) {
+            String contractCode = entry.getKey();
+            Long contractId = entry.getValue();
+
+            //查询旧数据
+            List<TrialCyFinishTestReport> list = trialCyFinishTestReportService.list(Wrappers.<TrialCyFinishTestReport>lambdaQuery()
+                    .eq(TrialCyFinishTestReport::getContractId, contractId));
+            //等会准备删除的历史数据
+            List<Long> ids = list.stream().map(TrialCyFinishTestReport::getId).collect(Collectors.toList());
+
+            int pageIndex = 0;
+            final int pageSize = 100;
+            boolean hasMore = true;
+
+            while (hasMore) {
+                try {
+                    List<NameValuePair> params = new ArrayList<NameValuePair>();
+                    params.add(new BasicNameValuePair("ProjectCode", PROJECT_CODE));
+                    params.add(new BasicNameValuePair("ContractsectCode", contractCode));
+                    //这些参数未找到传递的值
+                    if (false) {
+                        params.add(new BasicNameValuePair("BeginTime", null));
+                        params.add(new BasicNameValuePair("EndTime", null));
+                        params.add(new BasicNameValuePair("FinishBeginTime", null));
+                        params.add(new BasicNameValuePair("FinishEndTime", null));
+                    }
+                    params.add(new BasicNameValuePair("PageIndex", String.valueOf(pageIndex)));
+                    params.add(new BasicNameValuePair("PageSize", String.valueOf(pageSize)));
+
+                    ResultPost result = post(BASE_URL + FINISH_TEST_REPORT_URL, params);
+
+                    if (result == null) {
+                        log.error("Request failed for contract: {}", contractCode);
+                        break;
+                    }
+
+                    if (result.getCode() != 200) {
+                        log.error("API error for contract {}: {}", contractCode, result.getMsg());
+                        break;
+                    }
+
+                    JSONArray data = (JSONArray) result.getResult();
+                    if (CollectionUtil.isEmpty(data)) {
+                        break;
+                    }
+
+                    List<TrialCyFinishTestReport> reports = data.toJavaList(TrialCyFinishTestReport.class);
+                    for (TrialCyFinishTestReport report : reports) {
+                        Long id = SnowFlakeUtil.getId();
+                        report.setId(id);
+                        report.setContractId(contractId);
+                        //处理boolean值
+                        report.setExperimentResult(String.valueOf(report.getExperimentResult() == null ? 0 : "True".equals(report.getExperimentResult()) ? 1 : 0));
+
+                        List<String> urls = new ArrayList<>();
+                        if (StringUtil.isNotBlank(report.getReportFilePath())) {
+                            urls.add(report.getReportFilePath());
+                        }
+                        if (StringUtil.isNotBlank(report.getRecordFilePath())) {
+                            urls.add(report.getRecordFilePath());
+                        }
+
+                        //处理附件
+                        List<TrialCyAccessories> accessories = report.getAccessories();
+                        if (CollectionUtil.isNotEmpty(accessories)) {
+                            accessories.forEach(f -> {
+                                f.setId(SnowFlakeUtil.getId());
+                                f.setReportId(id);
+                                if (StringUtil.isNotBlank(f.getFilePath())) {
+                                    urls.add(f.getFilePath());
+                                }
+                            });
+
+                            if (CollectionUtil.isNotEmpty(ids)) {
+                                trialCyAccessoriesService.remove(Wrappers.<TrialCyAccessories>lambdaQuery()
+                                        .in(TrialCyAccessories::getReportId, ids));
+                            }
+                            trialCyAccessoriesService.saveBatch(accessories);
+                        }
+
+                        //组合文件
+                        if (urls.size() > 0) {
+                            //重新合并
+                                String filePath = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+                                String listPdf = filePath + "/pdf/" + id + ".pdf";
+                                File tabPDF = ResourceUtil.getFile(listPdf);
+                                if (tabPDF.exists()) {
+                                    tabPDF.delete();
+                                }
+                                FileUtils.mergePdfPublicMethods(urls, listPdf);
+                                BladeFile bladeFile = this.newIOSSClient.uploadFile(id + ".pdf", listPdf);
+                                if (bladeFile != null) {
+                                    report.setAssembleFile(bladeFile.getLink());
+                                }
+                        }
+                    }
+                    if (CollectionUtil.isNotEmpty(ids)) {
+                        trialCyFinishTestReportService.removeBatchByIds(ids);
+
+                        List<String> fileUrls = list.stream().map(TrialCyFinishTestReport::getAssembleFile).filter(StringUtil::isNotBlank).collect(Collectors.toList());
+                        if(CollectionUtil.isNotEmpty(fileUrls)){
+                            //删除组合文件
+                            fileUrls.forEach(f -> {
+                                String pdfName = f.split("upload")[1];
+                                this.newIOSSClient.removeFile("upload" + pdfName);
+                            });
+                        }
+                    }
+
+                    trialCyFinishTestReportService.saveBatch(reports);
+                    hasMore = reports.size() >= pageSize;
+                    pageIndex++;
+                } catch (Exception e) {
+                    log.error("Error processing contract {} page {}", contractCode, pageIndex, e);
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * 获取第三方报告
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getThirdReport() {
+        if (!SystemUtils.isLinux()) {
+            return;
+        }
+
+        Integer[] thirdTypes = {0, 1, 2};
+
+        String token = getToken();
+        ensureProjectIdInitialized();
+
+        if (token == null || PROJECT_ID == null || contractCodeMap.isEmpty()) {
+            log.error("Preconditions not met for third report");
+            return;
+        }
+
+        for (Map.Entry<String, Long> entry : contractCodeMap.entrySet()) {
+            String contractCode = entry.getKey();
+            Long contractId = entry.getValue();
+
+
+            //获取旧id
+            List<TrialCyThirdReport> list = trialCyThirdReportService.list(Wrappers.<TrialCyThirdReport>lambdaQuery()
+                    .eq(TrialCyThirdReport::getContractId, contractId));
+            //等会要删除的id
+            List<Long> ids = list.stream().map(TrialCyThirdReport::getPKeyId).collect(Collectors.toList());
+
+
+            int pageIndex = 0;
+            final int pageSize = 100;
+            boolean hasMore = true;
+
+            for (Integer thirdType : thirdTypes) {
+                while (hasMore) {
+                    try {
+                        List<NameValuePair> params = new ArrayList<NameValuePair>();
+                        params.add(new BasicNameValuePair("ProjectCode", PROJECT_CODE));
+                        params.add(new BasicNameValuePair("ContractsectCode", contractCode));
+                        params.add(new BasicNameValuePair("ThirdType", String.valueOf(thirdType)));
+                        //这些参数为找到传递值
+                        if (false) {
+                            params.add(new BasicNameValuePair("BeginTime", null));
+                            params.add(new BasicNameValuePair("EndTime", null));
+                        }
+                        params.add(new BasicNameValuePair("PageIndex", String.valueOf(pageIndex)));
+                        params.add(new BasicNameValuePair("PageSize", String.valueOf(pageSize)));
+
+
+                        ResultPost result = post(BASE_URL + THIRD_REPORT_URL, params);
+
+                        if (result == null) {
+                            log.error("Request failed for contract: {}", contractCode);
+                            break;
+                        }
+
+                        if (result.getCode() != 200) {
+                            log.error("API error for contract {}: {}", contractCode, result.getMsg());
+                            break;
+                        }
+
+                        JSONArray data = (JSONArray) result.getResult();
+                        if (CollectionUtil.isEmpty(data)) {
+                            break;
+                        }
+
+                        List<TrialCyThirdReport> reports = data.toJavaList(TrialCyThirdReport.class);
+                        for (TrialCyThirdReport report : reports) {
+
+                            List<String> urls = new ArrayList<>();
+                            if (StringUtil.isNotBlank(report.getReportDocFilePath())) {
+                                urls.add(report.getReportDocFilePath());
+                            }
+                            if (StringUtil.isNotBlank(report.getRecordDocFilePath())) {
+                                urls.add(report.getRecordDocFilePath());
+                            }
+
+                            Long id = SnowFlakeUtil.getId();
+                            report.setPKeyId(id);
+                            report.setContractId(contractId);
+                            //报告类型
+                            report.setThirdType(thirdType);
+                            //处理boolean值
+                            report.setIsDeleted(String.valueOf(report.getIsDeleted() == null ? '1' : "True".equals(report.getIsDeleted()) ? '1' : '0'));
+                            report.setIsQualified(String.valueOf(report.getIsQualified() == null ? '0' : "True".equals(report.getIsQualified()) ? '1' : '0'));
+
+                            //处理附件
+                            List<TrialCyAccessories> accessories = report.getAccessories();
+                            if (CollectionUtil.isNotEmpty(accessories)) {
+                                accessories.forEach(f -> {
+                                    f.setId(SnowFlakeUtil.getId());
+                                    f.setReportId(id);
+
+                                    if (StringUtil.isNotBlank(f.getFilePath())) {
+                                        urls.add(f.getFilePath());
+                                    }
+                                });
+                                //删除旧数据
+                                if (CollectionUtil.isNotEmpty(ids)) {
+                                    trialCyAccessoriesService.remove(Wrappers.<TrialCyAccessories>lambdaQuery()
+                                            .in(TrialCyAccessories::getReportId, ids));
+                                }
+                                //添加新数据
+                                trialCyAccessoriesService.saveBatch(accessories);
+                            }
+
+                            //组合文件
+                            if (urls.size() > 0) {
+                                //重新合并
+                                String filePath = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+                                String listPdf = filePath + "/pdf/" + id + ".pdf";
+                                File tabPDF = ResourceUtil.getFile(listPdf);
+                                if (tabPDF.exists()) {
+                                    tabPDF.delete();
+                                }
+                                FileUtils.mergePdfPublicMethods(urls, listPdf);
+                                BladeFile bladeFile = this.newIOSSClient.uploadFile(id + ".pdf", listPdf);
+                                if (bladeFile != null) {
+                                    report.setAssembleFile(bladeFile.getLink());
+                                }
+                            }
+                        }
+                        //删除旧数据
+                        if (CollectionUtil.isNotEmpty(ids)) {
+                            trialCyThirdReportService.removeBatchByIds(ids);
+                            List<String> fileUrls = list.stream().map(TrialCyThirdReport::getAssembleFile).filter(StringUtil::isNotBlank).collect(Collectors.toList());
+                            if(CollectionUtil.isNotEmpty(fileUrls)){
+                                //删除组合文件
+                                fileUrls.forEach(f -> {
+                                    String pdfName = f.split("upload")[1];
+                                    this.newIOSSClient.removeFile("upload" + pdfName);
+                                });
+                            }
+                        }
+
+                        //添加新数据
+                        trialCyThirdReportService.saveBatch(reports);
+                        hasMore = reports.size() >= pageSize;
+                        pageIndex++;
+                    } catch (Exception e) {
+                        log.error("Error processing contract {} page {}", contractCode, pageIndex, e);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * 获取检测项目树
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getAllTestType() {
+        if (!SystemUtils.isLinux()) {
+            return;
+        }
+
+        try {
+            String token = getToken();
+            ensureProjectIdInitialized();
+
+            if (token == null || PROJECT_ID == null) {
+                log.error("Invalid token or project ID");
+                return;
+            }
+
+            List<NameValuePair> params = new ArrayList<NameValuePair>();
+            params.add(new BasicNameValuePair("ProjectCode", PROJECT_CODE));
+
+            ResultPost result = post(BASE_URL + ALL_TEST_TYPE_URL, params);
+            if (result == null || result.getCode() != 200) {
+                log.error("Failed to get test types: {}",
+                        result != null ? result.getMsg() : "No response");
+                return;
+            }
+
+            JSONArray data = (JSONArray) result.getResult();
+            if (CollectionUtil.isEmpty(data)) {
+                log.info("No test types found");
+                return;
+            }
+
+            List<TrialCyTestType> testTypes = data.toJavaList(TrialCyTestType.class);
+            for (TrialCyTestType type : testTypes) {
+                type.setPKeyId(SnowFlakeUtil.getId());
+                type.setProjectId(PROJECT_ID);
+                type.setFatherId(type.getFatherId() == null || type.getFatherId().isEmpty() ? "0" : type.getFatherId());
+            }
+            //先删除旧数据
+            trialCyTestTypeService.remove(Wrappers.<TrialCyTestType>lambdaQuery()
+                    .eq(TrialCyTestType::getProjectId, PROJECT_ID));
+            trialCyTestTypeService.saveOrUpdateBatch(testTypes);
+            log.info("Saved {} test types", testTypes.size());
+        } catch (Exception e) {
+            log.error("Error processing test types", e);
+        }
+    }
+
+    /**
+     * HTTP POST请求 获取token
+     */
+    private Result postToken(String url, ThirdLogin payload) {
+        HttpPost httpPost = new HttpPost(url);
+        httpPost.setHeader("Content-Type", "application/json");
+        try {
+            httpPost.setEntity(new StringEntity(JSON.toJSONString(payload), StandardCharsets.UTF_8));
+        } catch (Exception e) {
+            log.error("Failed to set request entity", e);
+            return null;
+        }
+
+        try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
+            HttpResponse response = httpClient.execute(httpPost);
+            int status = response.getStatusLine().getStatusCode();
+
+            if (status != 200) {
+                log.warn("HTTP error: {} - {}", status, response.getStatusLine().getReasonPhrase());
+                return null;
+            }
+
+            try (InputStream input = response.getEntity().getContent()) {
+                byte[] buffer = new byte[1024];
+                int bytesRead;
+                while ((bytesRead = input.read(buffer)) != -1) {
+                    output.write(buffer, 0, bytesRead);
+                }
+            }
+
+            String responseString = new String(output.toByteArray(), StandardCharsets.UTF_8);
+            return JSON.parseObject(responseString, Result.class);
+        } catch (Exception e) {
+            log.error("HTTP request failed: {}", url, e);
+            return null;
+        }
+    }
+
+    /**
+     * HTTP POST请求
+     */
+    private ResultPost post(String url, List<NameValuePair> params) {
+        HttpPost httpPost = new HttpPost(url);
+        httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
+        httpPost.setHeader("token", getToken());
+        try {
+            httpPost.setEntity(new UrlEncodedFormEntity(params, Consts.UTF_8));
+        } catch (Exception e) {
+            log.error("Failed to set request entity", e);
+            return null;
+        }
+
+        try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
+            HttpResponse response = httpClient.execute(httpPost);
+            int status = response.getStatusLine().getStatusCode();
+
+            if (status != 200) {
+                log.warn("HTTP error: {} - {}", status, response.getStatusLine().getReasonPhrase());
+                return null;
+            }
+
+            try (InputStream input = response.getEntity().getContent()) {
+                byte[] buffer = new byte[1024];
+                int bytesRead;
+                while ((bytesRead = input.read(buffer)) != -1) {
+                    output.write(buffer, 0, bytesRead);
+                }
+            }
+
+            String responseString = new String(output.toByteArray(), StandardCharsets.UTF_8);
+            return JSON.parseObject(responseString, ResultPost.class);
+        } catch (Exception e) {
+            log.error("HTTP request failed: {}", url, e);
+            return null;
+        }
+    }
+
+    /**
+     * HTTP get 请求 获取合同段数据
+     */
+    private Result getContractList() {
+        try {
+            CloseableHttpClient client = HttpClients.createDefault();
+            HttpGet httpGet = new HttpGet(BASE_URL + CONTRACT_SECT_URL + "?token=" + getToken() + "&ProjectCode=" + PROJECT_CODE);
+            CloseableHttpResponse response = client.execute(httpGet);
+
+            //5、获取实体
+            HttpEntity entity = response.getEntity();
+            //将实体装成字符串
+            String string = EntityUtils.toString(entity);
+            return JSON.parseObject(string, Result.class);
+        } catch (IOException e) {
+            log.error("HTTP request failed: {}", BASE_URL + CONTRACT_SECT_URL, e);
+            return null;
+        }
+    }
+}

+ 462 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/ChenYuTestScheduled01.java

@@ -0,0 +1,462 @@
+package org.springblade.business.scheduled;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.nacos.common.utils.MD5Utils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyTestType;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.scheduled.vo.GetFinishTestReport;
+import org.springblade.business.scheduled.vo.GetThirdReport;
+import org.springblade.business.scheduled.vo.Result;
+import org.springblade.business.scheduled.vo.ThirdLogin;
+import org.springblade.business.service.TrialCyFinishTestReportService;
+import org.springblade.business.service.TrialCyTestTypeService;
+import org.springblade.business.service.TrialCyThirdReportService;
+import org.springblade.common.utils.SystemUtils;
+import org.springblade.core.redis.cache.BladeRedis;
+import org.springblade.core.tool.utils.CollectionUtil;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * 成渝试验第三方接口获取数据
+ * 定时任务
+ *
+ * @author LHB
+ */
+@Component
+@Slf4j
+public class ChenYuTestScheduled01 {
+
+    @Resource
+    private JdbcTemplate jdbcTemplate;
+
+    @Resource
+    private BladeRedis bladeRedis;
+    /**
+     * 成渝-获取标段已完成(已签章完成)的检测报告
+     */
+    @Resource
+    private TrialCyFinishTestReportService trialCyFinishTestReportService;
+    /**
+     * 成渝-试验检测树
+     */
+    @Resource
+    private TrialCyTestTypeService trialCyTestTypeService;
+    /**
+     * 成渝-已上传的外委检测报告/ 第三方检测报告/ 上传报告
+     */
+    @Resource
+    private TrialCyThirdReportService trialCyThirdReportService;
+
+    // HTTP客户端复用
+    private CloseableHttpClient httpClient;
+
+    @PostConstruct
+    public void init() {
+        this.httpClient = HttpClientBuilder.create().build();
+    }
+
+    //token缓存key
+    private static final String TOKEN_REDIS_KEY = "blade:cqcy:token";
+
+    //项目编码
+    private static final String PROJECT_CODE = "cqcyfx";
+
+    //项目id
+    private static Long PROJECT_ID = null;
+
+    //接口域名
+    private final String URL = "https://apicqcyfx.qdm123.com";
+
+    //合同编码缓存
+    private final Map<String, Long> contractCodeMap = new ConcurrentHashMap<>();
+
+    /**
+     * 登录 获取token
+     */
+
+    public String thirdLogin() {
+        //TODO 从后台管理的配置中心获取
+        String url = "/api/ThirdSystem/ThirdLogin";
+
+
+        //获取项目id
+        String sql = "select id from m_project_info where project_number = ? and is_deleted = 0 limit 1";
+        ProjectInfo projectInfo = jdbcTemplate.queryForObject(sql, ProjectInfo.class, PROJECT_CODE);
+        PROJECT_ID = projectInfo.getId();
+
+
+        String getAppKeySql = "select param_value from blade_param where param_key = 'cy.trial.appKey' and is_deleted = 0";
+        String getAppSecretSql = "select param_value from blade_param where param_key = 'cy.trial.appSecret' and is_deleted = 0";
+        //后管配置 appKey
+        String appKey = jdbcTemplate.queryForObject(getAppKeySql, String.class);
+        //后管配置 appSecret
+        String appSecret = jdbcTemplate.queryForObject(getAppSecretSql, String.class);
+        if (StringUtil.isBlank(appKey) || StringUtil.isBlank(appSecret)) {
+            log.error("---------#后管未配置成渝-试验-授权码或私钥");
+            return null;
+        }
+        //当前时间戳
+        Long time = System.currentTimeMillis();
+
+        //加密
+        String md5Hex = MD5Utils.md5Hex(time + appKey + appSecret, "UTF-8");
+
+        ThirdLogin thirdLogin = new ThirdLogin();
+        thirdLogin.setAppKey(appKey);
+        thirdLogin.setTimestamp(time);
+        thirdLogin.setSecret(md5Hex);
+
+
+        Result post = this.post(URL + url, thirdLogin);
+        if (post == null) {
+            log.error("---------#成渝第三方接口访问失败");
+            return null;
+        }
+        Integer state = post.getState();
+        //成功
+        if (state == 1) {
+            JSONObject data = (JSONObject) post.getData();
+            bladeRedis.setEx(TOKEN_REDIS_KEY, data.getString("token"), data.getLong("expireSecond") - 60);
+            return data.getString("token");
+        } else {
+            log.error("---------#成渝第三方接口访问失败:" + post.getMessage());
+            return null;
+        }
+    }
+
+
+    /**
+     * 获取合同段列表接口
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getContractSectByProjCode()     {
+        if(!SystemUtils.isLinux()){
+            return;
+        }
+        //清空缓存
+        contractCodeMap.clear();
+
+        String url = "/api/CQHCZC/MesureSystem/GetContractSectByProjCode";
+
+        String token = bladeRedis.get(TOKEN_REDIS_KEY);
+        if (token == null) {
+            token = thirdLogin();
+        }
+        if (token == null) {
+            log.error("---------#成渝第三方接口访问失败:token为空");
+            return;
+        }
+        if (PROJECT_ID == null) {
+            log.error("---------#成渝第三方接口访问失败:项目不存在");
+            return;
+        }
+
+
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("token", token);
+        jsonObject.put("ProjectCode", PROJECT_CODE);
+
+        Result post = this.post(URL + url, jsonObject);
+
+        if (post == null) {
+            log.error("---------#成渝第三方接口访问失败");
+            return;
+        }
+        Integer state = post.getState();
+        //成功
+        if (state == 1) {
+            //合同段列表数据
+            JSONArray data = (JSONArray) post.getData();
+
+            List<String> codes = new ArrayList<>();
+
+            //返回的数据不能为空
+            if (CollectionUtil.isNotEmpty(data)) {
+                for (Object datum : data) {
+                    JSONObject jsonObject1 = (JSONObject) datum;
+                    String code = jsonObject1.getString("Code");
+                    //编码不能为空
+                    if (StringUtil.isNotBlank(code)) {
+                        codes.add(code);
+                    }
+                }
+            }
+            //封装需要查询的合同段
+            if (CollectionUtil.isNotEmpty(codes)) {
+                //使用参数化查询防止SQL注入
+                StringBuilder sqlBuilder = new StringBuilder("select * from m_contract_info where contract_number in (");
+                for (int i = 0; i < codes.size(); i++) {
+                    sqlBuilder.append(i == 0 ? "?" : ",?");
+                }
+                sqlBuilder.append(")");
+
+                //查询数据
+                List<ContractInfo> contractInfoList = jdbcTemplate.queryForList(sqlBuilder.toString(), ContractInfo.class, codes.toArray());
+                contractInfoList.forEach(f -> {
+                    contractCodeMap.put(f.getContractNumber(), f.getId());
+                });
+            }
+        } else {
+            log.error("---------#成渝第三方接口访问失败:" + post.getMessage());
+        }
+    }
+
+    /**
+     * 获取标段已完成(已签章完成)的检测报告
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getFinishTestReport() {
+        if(!SystemUtils.isLinux()){
+            return;
+        }
+        String url = "/open/TestReport/GetFinishTestReport";
+
+        String token = bladeRedis.get(TOKEN_REDIS_KEY);
+        if (token == null) {
+            token = thirdLogin();
+        }
+        if (token == null) {
+            log.error("---------#成渝第三方接口访问失败:token为空");
+            return;
+        }
+        if (PROJECT_ID == null) {
+            log.error("---------#成渝第三方接口访问失败:项目不存在");
+            return;
+        }
+        //获取需要同步的合同段信息
+        Set<String> contractCodes = contractCodeMap.keySet();
+        if (CollectionUtil.isEmpty(contractCodes)) {
+            log.error("---------#成渝第三方接口访问失败:合同段编码无数据");
+            return;
+        }
+        for (String contractCode : contractCodes) {
+            GetFinishTestReport getFinishTestReport = new GetFinishTestReport(token, PROJECT_CODE, contractCode);
+
+            Integer pageIndex = 0;
+            Integer pageSize = 100;
+
+            do {
+                getFinishTestReport.setPageIndex(pageIndex);
+                getFinishTestReport.setPageSize(pageSize);
+
+                Result post = this.post(URL + url, getFinishTestReport);
+                if (post == null) {
+                    log.error("---------#成渝第三方接口访问失败:接口访问失败, contractCode: {}", contractCode);
+                    break; // 继续处理下一个合同段
+                }
+                Integer state = post.getState();
+                //成功
+                if (state == 1) {
+                    //检测报告列表
+                    JSONArray data = (JSONArray) post.getData();
+                    List<TrialCyFinishTestReport> list = data.toJavaList(TrialCyFinishTestReport.class);
+                    //退出循环
+                    if (CollectionUtil.isEmpty(list)) {
+                        break;
+                    }
+                    list.forEach(f -> f.setContractId(contractCodeMap.get(contractCode)));
+                    //处理数据
+                    trialCyFinishTestReportService.saveBatch(list);
+                    if (list.size() < pageSize) {
+                        break;
+                    }
+                    pageIndex++;
+                } else {
+                    log.error("---------#成渝第三方接口访问失败:{}, contractCode: {}", post.getMessage(), contractCode);
+                    break; // 继续处理下一个合同段
+                }
+            } while (true);
+        }
+    }
+
+    /**
+     * 获取已上传的外委检测报告/第三方检测报告/上传报告
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getThirdReport() {
+        if(!SystemUtils.isLinux()){
+            return;
+        }
+        String url = "/open/ThirdReport/GetThirdReport";
+
+        String token = bladeRedis.get(TOKEN_REDIS_KEY);
+        if (token == null) {
+            token = thirdLogin();
+        }
+        if (token == null) {
+            log.error("---------#成渝第三方接口访问失败:token为空");
+            return;
+        }
+        if (PROJECT_ID == null) {
+            log.error("---------#成渝第三方接口访问失败:项目不存在");
+            return;
+        }
+        //获取需要同步的合同段信息
+        Set<String> contractCodes = contractCodeMap.keySet();
+        if (CollectionUtil.isEmpty(contractCodes)) {
+            log.error("---------#成渝第三方接口访问失败:合同段编码无数据");
+            return;
+        }
+        for (String contractCode : contractCodes) {
+            GetThirdReport getThirdReport = new GetThirdReport(token, PROJECT_CODE, contractCode);
+
+            Integer pageIndex = 0;
+            int pageSize = 100;
+
+            do {
+                getThirdReport.setPageIndex(pageIndex);
+                getThirdReport.setPageSize(pageSize);
+
+                Result post = this.post(URL + url, getThirdReport);
+                if (post == null) {
+                    log.error("---------#成渝第三方接口访问失败:接口访问失败, contractCode: {}", contractCode);
+                    break; // 继续处理下一个合同段
+                }
+                Integer state = post.getState();
+                //成功
+                if (state == 1) {
+                    //已上传的外委检测报告/第三方检测报告/上传报告
+                    JSONArray data = (JSONArray) post.getData();
+                    List<TrialCyThirdReport> list = data.toJavaList(TrialCyThirdReport.class);
+                    //退出循环
+                    if (CollectionUtil.isEmpty(list)) {
+                        break;
+                    }
+                    list.forEach(f -> f.setContractId(contractCodeMap.get(contractCode)));
+                    //处理数据
+                    trialCyThirdReportService.saveBatch(list);
+
+                    if (list.size() < pageSize) {
+                        break;
+                    }
+
+                    pageIndex++;
+                } else {
+                    log.error("---------#成渝第三方接口访问失败:{}, contractCode: {}", post.getMessage(), contractCode);
+                    break; // 继续处理下一个合同段
+                }
+            } while (true);
+        }
+    }
+
+    /**
+     * 获取检测项目树(包括自建试验、外委、第三方、上传报告)
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void getAllTestType() {
+        if(!SystemUtils.isLinux()){
+            return;
+        }
+
+        String url = "/open/ThirdReport/GetAllTestType";
+        String token = bladeRedis.get(TOKEN_REDIS_KEY);
+        if (token == null) {
+            token = thirdLogin();
+        }
+        if (token == null) {
+            log.error("---------#成渝第三方接口访问失败:token为空");
+            return;
+        }
+        if (PROJECT_ID == null) {
+            log.error("---------#成渝第三方接口访问失败:项目不存在");
+            return;
+        }
+
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("token", token);
+        jsonObject.put("ProjectCode", PROJECT_CODE);
+
+        Result post = this.post(URL + url, jsonObject);
+
+        if (post == null) {
+            log.error("---------#成渝第三方接口访问失败:接口访问失败");
+            return;
+        }
+
+
+        Integer state = post.getState();
+        //成功
+        if (state == 1) {
+            //合同段列表数据
+            JSONArray data = (JSONArray) post.getData();
+            List<TrialCyTestType> list = data.toJavaList(TrialCyTestType.class);
+            //退出循环
+            if (CollectionUtil.isEmpty(list)) {
+                return;
+            }
+            list.forEach(f -> f.setProjectId(PROJECT_ID));
+            //处理数据
+            trialCyTestTypeService.saveOrUpdateBatch(list);
+        } else {
+            log.error("---------#成渝第三方接口访问失败:" + post.getMessage());
+        }
+    }
+
+
+    /**
+     * 封装请求参数
+     */
+    public Result post(String url, Object object) {
+        HttpPost httpPost = new HttpPost(url);
+        httpPost.setHeader("Content-Type", "application/json");
+
+        // 对象转json
+        StringEntity json = new StringEntity(JSON.toJSONString(object), "utf-8");
+        httpPost.setEntity(json);
+
+        try {
+            HttpResponse httpResponse = httpClient.execute(httpPost);
+
+            // 检查响应状态码
+            int statusCode = httpResponse.getStatusLine().getStatusCode();
+            if (statusCode != 200) {
+                log.warn("HTTP request failed with status code: {}", statusCode);
+                // 可以根据具体业务需求调整错误处理方式
+                return null;
+            }
+
+            try (InputStream inputStream = httpResponse.getEntity().getContent();
+                 ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
+
+                byte[] buffer = new byte[1024];
+                int index = 0;
+                while ((index = inputStream.read(buffer)) != -1) {
+                    outputStream.write(buffer, 0, index);
+                }
+                // 响应参数 - 指定明确的字符编码
+                Result result = JSON.parseObject(outputStream.toString("utf-8"), Result.class);
+                return result;
+            }
+        } catch (IOException e) {
+            log.error("HTTP request failed: ", e);
+            // 返回错误结果或抛出异常,根据业务需求决定
+            return null;
+        }
+    }
+
+}

+ 57 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/GetFinishTestReport.java

@@ -0,0 +1,57 @@
+package org.springblade.business.scheduled.vo;
+
+import lombok.Data;
+
+/**
+ * 获取标段已完成(已签章完成)的检测报告的接口实体类
+ *
+ * @author LHB
+ */
+@Data
+public class GetFinishTestReport {
+    /**
+     * 登录接口返回的token
+     */
+    private String token;
+    /**
+     * 工程项目编码,数据约定具体见附件
+     */
+    private String ProjectCode;
+    /**
+     * 合同段/工区编码,数据约定具体见附件
+     */
+    private String ContractsectCode;
+    /**
+     * 报告起始时间
+     */
+    private String BeginTime;
+    /**
+     * 报告截止时间,注意:此字段实际执行时间包含传入时间当天,截止至当天24:00
+     */
+    private String EndTime;
+    /**
+     * 签章完成时间范围-起
+     */
+    private String FinishBeginTime;
+    /**
+     * 签章完成时间范围-止,截止至当天24:00
+     */
+    private String FinishEndTime;
+    /**
+     * 页码,默认为0
+     */
+    private Integer PageIndex;
+    /**
+     * 获取数据条数,不大于1000
+     */
+    private Integer PageSize;
+
+    public GetFinishTestReport(String token, String projectCode, String contractsectCode) {
+        this.token = token;
+        ProjectCode = projectCode;
+        ContractsectCode = contractsectCode;
+    }
+
+    public GetFinishTestReport() {
+    }
+}

+ 57 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/GetThirdReport.java

@@ -0,0 +1,57 @@
+package org.springblade.business.scheduled.vo;
+
+import lombok.Data;
+
+/**
+ * 获取已上传的外委检测报告/第三方检测报告/上传报告的请求参数对象
+ *
+ * @author LHB
+ */
+@Data
+public class GetThirdReport {
+    /**
+     * 登录接口返回的token
+     */
+    private String token;
+    /**
+     * 工程项目编码,数据约定具体见附件
+     */
+    private String ProjectCode;
+    /**
+     * 合同段/工区编码,数据约定具体见附件
+     */
+    private String ContractsectCode;
+    /**
+     * 0:外委检测
+     * 1:第三方检测
+     * 2:扫描上传报告
+     */
+    private Integer ThirdType;
+    /**
+     * 上传起始时间
+     * 注意:此字段实际执行时间为当天0点
+     */
+    private String BeginTime;
+    /**
+     * 上传截止时间,注意:此字段实际执行时间为当天24:00
+     */
+    private String EndTime;
+    /**
+     * 页码,默认为0
+     */
+    private Integer PageIndex;
+    /**
+     * 获取数据条数,不大于100
+     */
+    private Integer PageSize;
+
+
+    public GetThirdReport(String token, String projectCode, String contractsectCode) {
+        this.token = token;
+        ProjectCode = projectCode;
+        ContractsectCode = contractsectCode;
+    }
+
+    public GetThirdReport() {
+    }
+}

+ 25 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/Result.java

@@ -0,0 +1,25 @@
+package org.springblade.business.scheduled.vo;
+
+import lombok.Data;
+
+/**
+ * 成渝第三方接口响应结构
+ * @author LHB
+ */
+@Data
+public class Result {
+    /**
+     * 请求结果
+     * 0:请求失败
+     * 1:请求成功
+     */
+    private Integer state;
+    /**
+     * 操作提示信息;
+     */
+    private String message;
+    /**
+     * 接口返回的数据对象包体,由每个接口根据业务逻辑决定,可为JSON对象或JSON数组对象。
+     */
+    private Object data;
+}

+ 25 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/ResultPost.java

@@ -0,0 +1,25 @@
+package org.springblade.business.scheduled.vo;
+
+import lombok.Data;
+
+/**
+ * 成渝第三方接口响应结构
+ * @author LHB
+ */
+@Data
+public class ResultPost {
+    /**
+     * 请求结果
+     * 0:请求失败
+     * 1:请求成功
+     */
+    private Integer code;
+    /**
+     * 操作提示信息;
+     */
+    private String msg;
+    /**
+     * 接口返回的数据对象包体,由每个接口根据业务逻辑决定,可为JSON对象或JSON数组对象。
+     */
+    private Object result;
+}

+ 28 - 0
blade-service/blade-business/src/main/java/org/springblade/business/scheduled/vo/ThirdLogin.java

@@ -0,0 +1,28 @@
+package org.springblade.business.scheduled.vo;
+
+import lombok.Data;
+
+/**
+ * 成渝获取token接口参数
+ *
+ * @author LHB
+ */
+@Data
+public class ThirdLogin {
+    /**
+     * 授权第三方KEY(成渝那边提供)
+     */
+    private String appKey;
+    /**
+     * 空
+     */
+    private String account;
+    /**
+     * 时间截(1970-01-01至当前时间的总毫秒数)
+     */
+    private Long timestamp;
+    /**
+     * MD5(timestamp + appKey + account + appSecret)
+     */
+    private String secret;
+}

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/service/IInformationQueryService.java

@@ -57,7 +57,7 @@ public interface IInformationQueryService extends BaseService<InformationQuery>
     /**
      * 查询工序节点的填报记录
      */
-    List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(String primaryKeyId, Integer classify);
+    List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(String primaryKeyId, Integer classify, Integer dateIsComplete);
 
     /**
      * 查询工序节点的填报记录
@@ -73,7 +73,7 @@ public interface IInformationQueryService extends BaseService<InformationQuery>
     /**
      * 查询工序节点的填报记录,简化
      */
-    List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(String parentId, Integer classify, String contractId);
+    List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(String parentId, Integer classify, String contractId, Integer dateIsComplete);
 
     /**
      * 查询工序节点的填报记录,status不默认为0,资料进度统计

+ 54 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialClassificationTreeService.java

@@ -0,0 +1,54 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.swagger.models.auth.In;
+import org.springblade.business.entity.TrialClassificationTree;
+import org.springblade.business.vo.TrialClassificationTreeVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 德飞试验系统检测分类树 服务类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+public interface ITrialClassificationTreeService extends BaseService<TrialClassificationTree>{
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param trialClassificationTree
+	 * @return
+	 */
+	IPage<TrialClassificationTreeVO> selectTrialClassificationTreePage(IPage<TrialClassificationTreeVO> page, TrialClassificationTreeVO trialClassificationTree);
+
+    Long selectAncestors(Long parentId);
+
+    boolean deleteById(Long id);
+
+
+    List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId);
+
+	void deleteByGroupType(Integer groupType);
+}

+ 50 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialSystemDockingService.java

@@ -0,0 +1,50 @@
+/*
+ *      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.business.service;
+
+import org.springblade.business.dto.TrialSystemDockingDTO1;
+import org.springblade.business.entity.TrialSystemDocking;
+import org.springblade.business.vo.TrialSystemDockingVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 德飞试验系统对接表 服务类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+public interface ITrialSystemDockingService extends BaseService<TrialSystemDocking> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param trialSystemDocking
+	 * @return
+	 */
+	IPage<TrialSystemDockingVO> selectTrialSystemDockingPage(IPage<TrialSystemDockingVO> page, TrialSystemDockingVO trialSystemDocking);
+
+    void syncUpdateFile(List<TrialSystemDocking> list);
+
+	void updatedelete(List<Long> longList);
+
+	void syncUpdateFile1(@Valid TrialSystemDocking trialSystemDocking);
+}

+ 14 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyAccessoriesService.java

@@ -0,0 +1,14 @@
+package org.springblade.business.service;
+
+import org.springblade.business.entity.TrialCyAccessories;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_accessories(成渝-附件信息)】的数据库操作Service
+* @createDate 2025-08-04 14:39:16
+*/
+public interface TrialCyAccessoriesService extends IService<TrialCyAccessories> {
+
+    Boolean clearTrialAssociation(Long nodeId, Long recordId);
+}

+ 19 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyFinishTestReportService.java

@@ -0,0 +1,19 @@
+package org.springblade.business.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_finish_test_report(成渝-获取标段已完成(已签章完成)的检测报告)】的数据库操作Service
+* @createDate 2025-08-01 09:05:03
+*/
+public interface TrialCyFinishTestReportService extends IService<TrialCyFinishTestReport> {
+
+    Page<ThirdReportVo> myPage(Page<ThirdReportVo> objectPage,
+                               TrialCyThirdReportQueryVo queryVo);
+}

+ 25 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyService.java

@@ -0,0 +1,25 @@
+package org.springblade.business.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyTestType;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+
+import java.util.List;
+
+/**
+ * @author LHB
+ */
+public interface TrialCyService {
+    Boolean isCyAndTestModule(Long projectId, Long contractId);
+
+    List<TrialCyTestType> getTree(Long projectId, String parentId);
+
+    Page<ThirdReportVo> getTrialDetectionReport(TrialCyThirdReportQueryVo queryVo);
+
+    Page<ThirdReportVo> getThirdReport(TrialCyThirdReportQueryVo queryVo);
+
+    Boolean clearTrialAssociation(Long nodeId, Long recordId);
+}

+ 16 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyTestTypeService.java

@@ -0,0 +1,16 @@
+package org.springblade.business.service;
+
+import org.springblade.business.entity.TrialCyTestType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_test_type(成渝-试验检测树)】的数据库操作Service
+* @createDate 2025-08-01 09:05:07
+*/
+public interface TrialCyTestTypeService extends IService<TrialCyTestType> {
+
+    List<TrialCyTestType> getTree(Long projectId, String parentId);
+}

+ 18 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/TrialCyThirdReportService.java

@@ -0,0 +1,18 @@
+package org.springblade.business.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyThirdReport;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_third_report(成渝-已上传的外委检测报告/第三方检测报告/上传报告)】的数据库操作Service
+* @createDate 2025-08-01 09:05:10
+*/
+public interface TrialCyThirdReportService extends IService<TrialCyThirdReport> {
+
+    Page<ThirdReportVo> myPage(Page<ThirdReportVo> page, TrialCyThirdReportQueryVo queryVo);
+}

+ 4 - 4
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -141,8 +141,8 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
     }
 
     @Override
-    public List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(String primaryKeyId, Integer classify) {
-        return this.baseMapper.queryProcessDataByPrimaryKeyIdAndClassify(primaryKeyId, classify);
+    public List<QueryProcessDataVO> queryProcessDataByPrimaryKeyIdAndClassify(String primaryKeyId, Integer classify, Integer dateIsComplete) {
+        return this.baseMapper.queryProcessDataByPrimaryKeyIdAndClassify(primaryKeyId, classify, dateIsComplete);
     }
 
     @Override
@@ -166,8 +166,8 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
 
     //简化
     @Override
-    public List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(String parentId, Integer classify, String contractId) {
-        List<QueryProcessDataVO> result = this.baseMapper.queryProcessDataByParentIdAndContractIdTwo(parentId, classify, contractId);
+    public List<QueryProcessDataVO> queryProcessDataByParentIdAndContractIdTwo(String parentId, Integer classify, String contractId, Integer dateIsComplete) {
+        List<QueryProcessDataVO> result = this.baseMapper.queryProcessDataByParentIdAndContractIdTwo(parentId, classify, contractId, dateIsComplete);
         return result;
     }
 

+ 12 - 12
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -221,7 +221,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
         ProjectInfo projectInfo = this.projectClient.getById(log.getProjectId() + "");
         vo.setRemarkType(projectInfo.getRemarkType() + "");
         if (log != null && (StringUtils.isNotEmpty(log.getPdfUrl()) || StringUtils.isNotEmpty(log.getEVisaPdfUrl()))) {
-            vo.setApprovalFileList(log.getFileName(), StringUtils.isNotEmpty(log.getEVisaPdfUrl()) ? log.getEVisaPdfUrl() : log.getPdfUrl());
+            vo.setApprovalFileList(log.getFileName(), StringUtils.isNotEmpty(log.getEVisaPdfUrl()) ? log.getEVisaPdfUrl() : log.getPdfUrl(), "", "", log.getProjectId() + "", log.getContractId() + "");
+
         }
 
         return vo;
@@ -246,17 +247,17 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     //封面
                     String url = StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl();
                     String s = getHppsToHttp(url);
-                    vo.setApprovalFileList(query.getName(), s);
+                    vo.setApprovalFileList(query.getName(), s, query.getWbsId()+"", query.getClassify() + "", query.getProjectId() + "", query.getContractId() + "");
                 }
                 //不是签章时再查关联资料,因为关联资料都是审批好的pdf,存在关键字,不能再执行签 字/章
                 if (!isTask) {
                     //关联资料
                     if (StringUtils.isNotEmpty(query.getLinkMergePdfUrl())) {
-                        vo.setApprovalFileList("首件关联资料", this.getHppsToHttp(query.getLinkMergePdfUrl()));
+                        vo.setApprovalFileList("首件关联资料", this.getHppsToHttp(query.getLinkMergePdfUrl()), "", "", query.getProjectId() + "", query.getContractId() + "");
                     }
                     InformationQueryFile queryFile = this.informationQueryFileService.getOne(Wrappers.<InformationQueryFile>lambdaQuery().eq(InformationQueryFile::getQueryId, query.getId()));
                     if (queryFile != null) {
-                        vo.setApprovalFileList(queryFile.getName(), getHppsToHttp(queryFile.getPdfUrl()));
+                        vo.setApprovalFileList(queryFile.getName(), getHppsToHttp(queryFile.getPdfUrl()),query.getWbsId()+"", query.getClassify() + "", query.getProjectId() + "", query.getContractId() + "");
                     }
                 }
 
@@ -281,11 +282,11 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     /** 修改需求,任务查看时,附件不在列表中显示,需要拼接在电签后面。如果此处修改影响其他地方,则到时候再说*/
                     if(isTask){
                         String approvalPdf = StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl();
-                        vo.setApprovalFileList(query.getName(), this.getHppsToHttp(approvalPdf));
+                        vo.setApprovalFileList(query.getName(), this.getHppsToHttp(approvalPdf), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
                     }else{
                         String approvalPdf = StringUtils.isNotEmpty(query.getNodePdfUrl()) ? query.getNodePdfUrl() : query.getEVisaPdfUrl();
                         String approvalPdf2 = StringUtils.isNotEmpty(approvalPdf) ? approvalPdf : query.getPdfUrl();
-                        vo.setApprovalFileList(query.getName(), this.getHppsToHttp(approvalPdf2));
+                        vo.setApprovalFileList(query.getName(), this.getHppsToHttp(approvalPdf2), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
                     }
 
                     //试验关联文件合并pdf
@@ -295,7 +296,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                             query.setPdfTrialUrl(replaceHTTPURL);
                         }
                         String trialPdf = StringUtils.isNotEmpty(query.getPdfTrialUrl()) ? query.getPdfTrialUrl() : null;
-                        vo.setApprovalFileList(query.getName() + "(关联试验文件)", getHppsToHttp(trialPdf));
+                        vo.setApprovalFileList(query.getName() + "(关联试验文件)", getHppsToHttp(trialPdf), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
                     }
 
                     //试验关联的工程部位信息合并pdf
@@ -306,9 +307,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                         }
 
                         String trailpdf = StringUtils.isNotEmpty(query.getPdfTrialUrlPosition()) ? query.getPdfTrialUrlPosition() : null;
-                        vo.setApprovalFileList(query.getName() + "(关联试验工程部位信息文件)", getHppsToHttp(trailpdf));
+                        vo.setApprovalFileList(query.getName() + "(关联试验工程部位信息文件)", getHppsToHttp(trailpdf), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
                     }
-
                 }
             } else if (new Integer("2").equals(query.getType())) {
                 //试验
@@ -356,7 +356,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                     }catch (Exception e){
                         e.printStackTrace();
                     }
-                    vo.setApprovalFileList(query.getName(), getHppsToHttp(approvalPdf));
+                    vo.setApprovalFileList(query.getName(), getHppsToHttp(approvalPdf), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
 
                     //试验关联的原材料检测报告合并pdf (wbsId=试验记录id)
                     String sqlRecord = "select old_pdf_url from u_trial_raw_material_self_record where self_record_id =" + query.getWbsId();
@@ -369,7 +369,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                             }
                         }
                         String clPdf = StringUtils.isNotEmpty(recordObj.getOldPdfUrl()) ? recordObj.getOldPdfUrl() : null;
-                        vo.setApprovalFileList(query.getName() + "(原材料检测报告)", getHppsToHttp(clPdf));
+                        vo.setApprovalFileList(query.getName() + "(原材料检测报告)", getHppsToHttp(clPdf), query.getWbsId()+"", query.getClassify()+"", query.getProjectId()+"", query.getContractId()+"");
                     }
                 }
             }
@@ -388,7 +388,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             ProjectInfo projectInfo = this.projectClient.getById(archiveFileList.get(0).getProjectId() + "");
             vo.setRemarkType(projectInfo.getRemarkType() + "");
             for (ArchiveFile archiveFile : archiveFileList) {
-                vo.setApprovalFileList(archiveFile.getFileName(), StringUtils.isEmpty(archiveFile.getPdfFileUrl()) ? archiveFile.getFileUrl() : archiveFile.getPdfFileUrl());
+                vo.setApprovalFileList(archiveFile.getFileName(), StringUtils.isEmpty(archiveFile.getPdfFileUrl()) ? archiveFile.getFileUrl() : archiveFile.getPdfFileUrl(), archiveFile.getId() + "", archiveFile.getClassify() + "", archiveFile.getProjectId() + "", archiveFile.getContractId() + "");
             }
             return vo;
         }

+ 70 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialClassificationTreeServiceImpl.java

@@ -0,0 +1,70 @@
+/*
+ *      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.business.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.springblade.business.entity.TrialClassificationTree;
+import org.springblade.business.vo.TrialClassificationTreeVO;
+import org.springblade.business.mapper.TrialClassificationTreeMapper;
+import org.springblade.business.service.ITrialClassificationTreeService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 德飞试验系统检测分类树 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Service
+public class TrialClassificationTreeServiceImpl extends BaseServiceImpl<TrialClassificationTreeMapper, TrialClassificationTree> implements ITrialClassificationTreeService {
+
+
+
+	@Override
+	public IPage<TrialClassificationTreeVO> selectTrialClassificationTreePage(IPage<TrialClassificationTreeVO> page, TrialClassificationTreeVO trialClassificationTree) {
+		return page.setRecords(baseMapper.selectTrialClassificationTreePage(page, trialClassificationTree));
+	}
+
+	@Override
+	public Long selectAncestors(Long parentId) {
+		return baseMapper.selectAncestors(parentId);
+	}
+
+	@Override
+	public boolean deleteById(Long id) {
+		baseMapper.deleteById1(id);
+		return true;
+	}
+
+	@Override
+	public List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId) {
+		return baseMapper.selectAllNode(id,projectId);
+	}
+
+	@Override
+	public void deleteByGroupType(Integer groupType) {
+		baseMapper.deleteByGroupType(groupType);
+	}
+
+
+}

+ 131 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyAccessoriesServiceImpl.java

@@ -0,0 +1,131 @@
+package org.springblade.business.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.business.entity.InformationQuery;
+import org.springblade.business.entity.TrialCyAccessories;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.service.TrialCyAccessoriesService;
+import org.springblade.business.mapper.TrialCyAccessoriesMapper;
+import org.springblade.business.service.TrialCyFinishTestReportService;
+import org.springblade.business.service.TrialCyThirdReportService;
+import org.springblade.business.utils.FileUtils;
+import org.springblade.common.constant.CommonConstant;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.tool.utils.CollectionUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.core.tool.utils.ResourceUtil;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springblade.system.cache.ParamCache;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @author LHB
+ * @description 针对表【u_trial_cy_accessories(成渝-附件信息)】的数据库操作Service实现
+ * @createDate 2025-08-04 14:39:16
+ */
+@Service
+public class TrialCyAccessoriesServiceImpl extends ServiceImpl<TrialCyAccessoriesMapper, TrialCyAccessories>
+        implements TrialCyAccessoriesService {
+    @Resource
+    private TrialCyFinishTestReportService trialCyFinishTestReportService;
+    @Resource
+    private TrialCyThirdReportService trialCyThirdReportService;
+    @Resource
+    private InformationQueryServiceImpl informationQueryService;
+    @Resource
+    private NewIOSSClient newIOSSClient;
+
+    @Override
+    public Boolean clearTrialAssociation(Long nodeId, Long recordId) {
+
+        baseMapper.clearTrialAssociation(nodeId, recordId);
+        //重新生成pdf
+        List<String> listOne = baseMapper.selectFilePdfList(nodeId, 11);
+        List<String> listTwo = baseMapper.selectFilePdfList(nodeId, 11, 12);
+
+        InformationQuery informationQuery = informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
+                .eq(InformationQuery::getWbsId, nodeId)
+                .ne(InformationQuery::getStatus, 3)
+                .eq(InformationQuery::getType, 1)).stream().findAny().orElse(null);
+
+
+        List<String> pdfList = new ArrayList<>();
+        //成渝自检
+        if (CollectionUtil.isNotEmpty(listOne)) {
+            List<TrialCyFinishTestReport> trialCyFinishTestReports = trialCyFinishTestReportService.getBaseMapper().selectList(Wrappers.<TrialCyFinishTestReport>lambdaQuery()
+                    .in(TrialCyFinishTestReport::getTaskId, listOne));
+            trialCyFinishTestReports.forEach(f -> {
+                if (StringUtils.isNotBlank(f.getAssembleFile())) {
+                    pdfList.add(f.getAssembleFile());
+                }
+            });
+        }
+
+        //外委-第三方
+        if (CollectionUtil.isNotEmpty(listOne)) {
+            List<TrialCyThirdReport> trialCyThirdReports = trialCyThirdReportService.getBaseMapper().selectList(Wrappers.<TrialCyThirdReport>lambdaQuery()
+                    .in(TrialCyThirdReport::getId, listTwo));
+            trialCyThirdReports.forEach(f -> {
+                if (StringUtils.isNotBlank(f.getAssembleFile())) {
+                    pdfList.add(f.getAssembleFile());
+                }
+            });
+        }
+
+        String pdfTrialUrl = informationQuery.getPdfTrialUrl();
+        //删除之前的文件
+        if (StringUtils.isNotBlank(pdfTrialUrl)) {
+            String pdfName = pdfTrialUrl.split("upload")[1];
+            this.newIOSSClient.removeFile("upload" + pdfName);
+        }
+        if (pdfList.size() > 0) {
+            //合并试验自检、第三方、外委的pdf
+            List<String> collect = pdfList.stream().filter(Objects::nonNull).collect(Collectors.toList());
+            if (ObjectUtil.isNotEmpty(collect) && collect.size() > 0) {
+                String filePath = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+                String listPdf = filePath + "/pdf/" + informationQuery.getId() + ".pdf";
+                try {
+                    File tabPDF = ResourceUtil.getFile(listPdf);
+                    if (tabPDF.exists()) {
+                        tabPDF.delete();
+                    }
+                    FileUtils.mergePdfPublicMethods(collect, listPdf);
+                    BladeFile bladeFile = this.newIOSSClient.uploadFile(informationQuery.getId() + ".pdf", listPdf);
+                    if (bladeFile != null) {
+
+                        //修改当前节点的pdfTrialURL地址
+                        informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate()
+                                .set(InformationQuery::getPdfTrialUrl, bladeFile.getLink())
+                                .eq(InformationQuery::getId, informationQuery.getId()));
+                    }
+                } catch (FileNotFoundException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        } else {
+            //修改当前节点的pdfTrialURL地址
+            informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate()
+                    .set(InformationQuery::getPdfTrialUrl, null)
+                    .eq(InformationQuery::getId, informationQuery.getId()));
+        }
+        return true;
+    }
+}
+
+
+
+

+ 29 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyFinishTestReportServiceImpl.java

@@ -0,0 +1,29 @@
+package org.springblade.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.service.TrialCyFinishTestReportService;
+import org.springblade.business.mapper.TrialCyFinishTestReportMapper;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+import org.springframework.stereotype.Service;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_finish_test_report(成渝-获取标段已完成(已签章完成)的检测报告)】的数据库操作Service实现
+* @createDate 2025-08-01 09:05:03
+*/
+@Service
+public class TrialCyFinishTestReportServiceImpl extends ServiceImpl<TrialCyFinishTestReportMapper, TrialCyFinishTestReport>
+    implements TrialCyFinishTestReportService {
+
+    @Override
+    public Page<ThirdReportVo> myPage(Page<ThirdReportVo> page, TrialCyThirdReportQueryVo queryVo) {
+        return baseMapper.myPage(page,queryVo);
+    }
+}
+
+
+
+

+ 86 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyServiceImpl.java

@@ -0,0 +1,86 @@
+package org.springblade.business.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springblade.business.entity.TrialCyFinishTestReport;
+import org.springblade.business.entity.TrialCyTestType;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.service.*;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.manager.entity.ContractInfo;
+import org.springblade.manager.entity.ProjectInfo;
+import org.springblade.manager.feign.ContractClient;
+import org.springblade.manager.feign.ProjectClient;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 成渝数据获取
+ *
+ * @author LHB
+ */
+@Service
+public class TrialCyServiceImpl implements TrialCyService {
+    @Resource
+    private TrialCyAccessoriesService trialCyAccessoriesService;
+    @Resource
+    private TrialCyFinishTestReportService trialCyFinishTestReportService;
+    @Resource
+    private TrialCyTestTypeService trialCyTestTypeService;
+    @Resource
+    private TrialCyThirdReportService trialCyThirdReportService;
+
+    @Resource
+    private ProjectClient projectClient;
+    @Resource
+    private ContractClient contractClient;
+
+    @Override
+    public Boolean isCyAndTestModule(Long projectId, Long contractId) {
+        ProjectInfo byId = projectClient.getById(String.valueOf(projectId));
+        if (!"cqcyfx".equals(byId.getProjectNumber())) {
+            return false;
+        }
+        ContractInfo contractById = contractClient.getContractById(contractId);
+        return contractById.getIsTestModule() == 0;
+    }
+
+    @Override
+    public List<TrialCyTestType> getTree(Long projectId, String parentId) {
+        List<TrialCyTestType> list = trialCyTestTypeService.getTree(projectId, parentId);
+        return list;
+    }
+
+    @Override
+    public Page<ThirdReportVo> getTrialDetectionReport(TrialCyThirdReportQueryVo queryVo) {
+        TrialCyTestType byId = trialCyTestTypeService.getById(queryVo.getNodeId());
+        if(StringUtils.isBlank(byId.getId())){
+            return new Page<>();
+        }
+        queryVo.setNodeId(Long.valueOf(byId.getId()));
+        Page<ThirdReportVo> page = trialCyFinishTestReportService.myPage(new Page<ThirdReportVo>(queryVo.getCurrent(), queryVo.getSize()),queryVo);
+        return page;
+    }
+
+    @Override
+    public Page<ThirdReportVo> getThirdReport(TrialCyThirdReportQueryVo queryVo) {
+        TrialCyTestType byId = trialCyTestTypeService.getById(queryVo.getNodeId());
+        if(StringUtils.isBlank(byId.getId())){
+            return new Page<>();
+        }
+        queryVo.setNodeId(Long.valueOf(byId.getId()));
+        Page<ThirdReportVo> page = trialCyThirdReportService.myPage(new Page<ThirdReportVo>(queryVo.getCurrent(), queryVo.getSize()), queryVo);
+        return page;
+    }
+
+    @Override
+    public Boolean clearTrialAssociation(Long nodeId, Long recordId) {
+        return trialCyAccessoriesService.clearTrialAssociation(nodeId, recordId);
+    }
+}

+ 28 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyTestTypeServiceImpl.java

@@ -0,0 +1,28 @@
+package org.springblade.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.business.entity.TrialCyTestType;
+import org.springblade.business.service.TrialCyTestTypeService;
+import org.springblade.business.mapper.TrialCyTestTypeMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_test_type(成渝-试验检测树)】的数据库操作Service实现
+* @createDate 2025-08-01 09:05:07
+*/
+@Service
+public class TrialCyTestTypeServiceImpl extends ServiceImpl<TrialCyTestTypeMapper, TrialCyTestType>
+    implements TrialCyTestTypeService {
+    @Override
+    public List<TrialCyTestType> getTree(Long projectId, String parentId) {
+        return baseMapper.getTree(projectId, parentId);
+    }
+}
+
+
+
+

+ 29 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialCyThirdReportServiceImpl.java

@@ -0,0 +1,29 @@
+package org.springblade.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.business.entity.TrialCyThirdReport;
+import org.springblade.business.service.TrialCyThirdReportService;
+import org.springblade.business.mapper.TrialCyThirdReportMapper;
+import org.springblade.business.vo.ThirdReportVo;
+import org.springblade.business.vo.TrialCyThirdReportQueryVo;
+import org.springframework.stereotype.Service;
+
+/**
+* @author LHB
+* @description 针对表【u_trial_cy_third_report(成渝-已上传的外委检测报告/第三方检测报告/上传报告)】的数据库操作Service实现
+* @createDate 2025-08-01 09:05:10
+*/
+@Service
+public class TrialCyThirdReportServiceImpl extends ServiceImpl<TrialCyThirdReportMapper, TrialCyThirdReport>
+    implements TrialCyThirdReportService {
+
+    @Override
+    public Page<ThirdReportVo> myPage(Page<ThirdReportVo> page, TrialCyThirdReportQueryVo queryVo) {
+        return baseMapper.myPage(page, queryVo);
+    }
+}
+
+
+
+

+ 218 - 183
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -27,9 +27,7 @@ import org.springblade.business.mapper.EntrustInfoMapper;
 import org.springblade.business.mapper.TrialMaterialMobilizationMapper;
 import org.springblade.business.mapper.TrialSampleInfoMapper;
 import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
-import org.springblade.business.service.IEntrustInfoService;
-import org.springblade.business.service.ITrialNumberRuleService;
-import org.springblade.business.service.ITrialSelfInspectionRecordService;
+import org.springblade.business.service.*;
 import org.springblade.business.utils.FileUtils;
 import org.springblade.business.utils.FileUtils2;
 import org.springblade.business.utils.StringSPUtils;
@@ -100,6 +98,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     private final TrialDetectionDataServiceImpl trialDetectionDataService;
     private final IEntrustInfoService entrustInfoService;
     private final ITrialNumberRuleService trialNumberRuleService;
+    private final TrialCyThirdReportService trialCyThirdReportService;
+    private final TrialCyFinishTestReportService trialCyFinishTestReportService;
+    private final TrialCyAccessoriesService trialCyAccessoriesService;
 
     @Override
     public IPage<TrialSelfInspectionRecordVO> selfPage(IPage<TrialSelfInspectionRecord> page, TrialSelfInspectionRecordPageDTO dto) throws FileNotFoundException {
@@ -118,7 +119,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 List<EntrustInfo> entrustInfos = entrustInfoMapper.selectList(Wrappers.<EntrustInfo>lambdaQuery()
                         .like(EntrustInfo::getEntrustNo, dto.getQueryValue()));
                 List<Long> entrustIds;
-                if(CollectionUtil.isNotEmpty(entrustInfos)){
+                if (CollectionUtil.isNotEmpty(entrustInfos)) {
                     entrustIds = entrustInfos.stream().map(EntrustInfo::getId).collect(Collectors.toList());
                 } else {
                     entrustIds = null;
@@ -126,11 +127,11 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
                 queryWrapper.lambda().and(
                         wq ->
-                            wq.like(TrialSelfInspectionRecord::getTrialProjectName, dto.getQueryValue()).or()
-                                    .like(TrialSelfInspectionRecord::getRecordNo, dto.getQueryValue()).or()
-                                    .like(TrialSelfInspectionRecord::getReportNo, dto.getQueryValue()).or()
-                                    .like(TrialSelfInspectionRecord::getSpecificationNumber, dto.getQueryValue()).or()
-                                    .in(CollectionUtil.isNotEmpty(entrustIds),TrialSelfInspectionRecord::getEntrustId, entrustIds)
+                                wq.like(TrialSelfInspectionRecord::getTrialProjectName, dto.getQueryValue()).or()
+                                        .like(TrialSelfInspectionRecord::getRecordNo, dto.getQueryValue()).or()
+                                        .like(TrialSelfInspectionRecord::getReportNo, dto.getQueryValue()).or()
+                                        .like(TrialSelfInspectionRecord::getSpecificationNumber, dto.getQueryValue()).or()
+                                        .in(CollectionUtil.isNotEmpty(entrustIds), TrialSelfInspectionRecord::getEntrustId, entrustIds)
                 );
             }
             if (org.apache.commons.lang.StringUtils.isNotEmpty(dto.getStartTime()) && org.apache.commons.lang.StringUtils.isNotEmpty(dto.getEndTime())) {
@@ -144,7 +145,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             if (org.apache.commons.lang.StringUtils.isNotEmpty(dto.getQueryStatus())) {
                 queryWrapper.lambda().eq(TrialSelfInspectionRecord::getDetectionResult, dto.getQueryStatus());
             }
-            if (dto.getSortType() !=  null) {
+            if (dto.getSortType() != null) {
                 if (dto.getSortType().equals("1")) {
                     queryWrapper.lambda().orderByAsc(TrialSelfInspectionRecord::getReportNo);
                 } else if (dto.getSortType().equals("2")) {
@@ -209,17 +210,17 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 }
                 //委托单名称 委托单编号
                 EntrustInfo entrustInfo = entrustInfoMapper.selectById(record.getEntrustId());
-                if (entrustInfo != null){
+                if (entrustInfo != null) {
                     record.setEntrustName(entrustInfo.getEntrustName());
                     record.setEntrustNo(entrustInfo.getEntrustNo());
                     //材料id不为空
-                     if(Func.isNotEmpty(entrustInfo.getSampleId())){
-                         TrialSampleInfo sampleInfo = trialSampleInfoMapper.selectById(entrustInfo.getSampleId());
-                         if (Func.isNotEmpty(sampleInfo)){
-                             record.setSpecificationNumber(sampleInfo.getSpecificationNumber());
-                             record.setSpecificationModel(sampleInfo.getSpecificationModel());
-                         }
-                     }
+                    if (Func.isNotEmpty(entrustInfo.getSampleId())) {
+                        TrialSampleInfo sampleInfo = trialSampleInfoMapper.selectById(entrustInfo.getSampleId());
+                        if (Func.isNotEmpty(sampleInfo)) {
+                            record.setSpecificationNumber(sampleInfo.getSpecificationNumber());
+                            record.setSpecificationModel(sampleInfo.getSpecificationModel());
+                        }
+                    }
                 }
                 if (record.getBaseInfo() != null && !record.getBaseInfo().isEmpty()) {
                     try {
@@ -310,7 +311,8 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     }
 
     /**
-     *新增返回该试验材料报告关联的委托单pdf也拼接在后面
+     * 新增返回该试验材料报告关联的委托单pdf也拼接在后面
+     *
      * @param contractId
      * @param nodeId
      * @param type
@@ -318,7 +320,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
      * @throws FileNotFoundException
      */
     private String getMergePdfToTrialNew(Long contractId, Long nodeId, Integer type) throws FileNotFoundException {
-        String sql = "select pdf_url,e_visa_pdf_url from u_information_query where wbs_id='" + nodeId + "' and status in(0,1,2) and contract_id ='" + contractId + "' and classify = '" + type + "'" ;
+        String sql = "select pdf_url,e_visa_pdf_url from u_information_query where wbs_id='" + nodeId + "' and status in(0,1,2) and contract_id ='" + contractId + "' and classify = '" + type + "'";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps.size() >= 1) {
             Map<String, Object> stringObjectMap = maps.get(0);
@@ -330,11 +332,11 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             }
             String entrustPdfUrl = "";
             //关联的委托单pdf
-            String sqlEntrust = "select entrust_id from u_trial_self_inspection_record where is_deleted = 0 and id = "+nodeId ;
+            String sqlEntrust = "select entrust_id from u_trial_self_inspection_record where is_deleted = 0 and id = " + nodeId;
             TrialSelfInspectionRecord record = jdbcTemplate.queryForObject(sqlEntrust, new BeanPropertyRowMapper<>(TrialSelfInspectionRecord.class));
-            if(ObjectUtil.isNotEmpty(record) && ObjectUtil.isNotEmpty(record.getEntrustId()) && record.getEntrustId() != 0){
+            if (ObjectUtil.isNotEmpty(record) && ObjectUtil.isNotEmpty(record.getEntrustId()) && record.getEntrustId() != 0) {
                 //优先查询带电签的,没有电签在查entrust_pdf
-                String sqlEntrustPdf = "SELECT COALESCE(entrust_e_pdf, entrust_pdf) AS pdf_url from u_entrust_info where is_deleted = 0 and id = "+record.getEntrustId();
+                String sqlEntrustPdf = "SELECT COALESCE(entrust_e_pdf, entrust_pdf) AS pdf_url from u_entrust_info where is_deleted = 0 and id = " + record.getEntrustId();
                 try {
                     entrustPdfUrl = jdbcTemplate.queryForObject(sqlEntrustPdf, String.class);
                 } catch (DataAccessException e) {
@@ -353,7 +355,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 //材料检测报告pdf
                 pdfList.add(pdfUrlTrialRawMaterial);
                 //委托单pdf
-                if(ObjectUtil.isNotEmpty(entrustPdfUrl)){
+                if (ObjectUtil.isNotEmpty(entrustPdfUrl)) {
                     pdfList.add(entrustPdfUrl);
                 }
                 String file_path = FileUtils.getSysLocalFileUrl();
@@ -375,10 +377,10 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             }
             assert pdfUrl != null;
             //拼接委托单pdf
-            if(ObjectUtil.isNotEmpty(entrustPdfUrl)){
+            if (ObjectUtil.isNotEmpty(entrustPdfUrl)) {
                 List<String> pdfList = new ArrayList<>();
                 //试验原始pdf
-                if(pdfUrl!=null){
+                if (pdfUrl != null) {
                     pdfList.add(pdfUrl.toString());
                 }
                 //委托单pdf
@@ -398,8 +400,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         pdfUrl = bladeFile.getLink();
                         return pdfUrl.toString();
                     }
-            }}
-            if(ObjectUtil.isNotEmpty(pdfUrl)){
+                }
+            }
+            if (ObjectUtil.isNotEmpty(pdfUrl)) {
                 return pdfUrl.toString();
             }
         }
@@ -1137,7 +1140,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
         //------初始当前填报的表pKeyIds------
         this.initTrialTabIds(dto);
 
-        if(!this.judgingParameters(dto)){
+        if (!this.judgingParameters(dto)) {
             //------初始编号信息------
             this.initBuildNumber(dto);
         }
@@ -1148,7 +1151,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             //如果传递了编号就修改对应记录的值 以第一张表的数据为准
             this.updateRecordNoOrReportNo(obj, dto);
             //------编辑时记录表编号或报告单编号为Null的重新生成------
-            if(!this.judgingParameters(dto)){
+            if (!this.judgingParameters(dto)) {
                 this.reBuildNumber(obj, dto);
             }
 
@@ -1166,29 +1169,29 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
         }
 
         // ---- 修改样品单号信息 --------
-        if(dto!=null && Func.isNotEmpty(dto.getEntrustId())){
+        if (dto != null && Func.isNotEmpty(dto.getEntrustId())) {
             //修改项目节点基础信息
-            jdbcTemplate.update("update u_entrust_info set sample_status=4 where id ='"+dto.getEntrustId()+"'");
+            jdbcTemplate.update("update u_entrust_info set sample_status=4 where id ='" + dto.getEntrustId() + "'");
         }
         String[] strings = dto.getTableType().split(",");
-        if(StringUtils.isNotEmpty(dto.getRecordAutoNumber())||StringUtils.isNotEmpty(dto.getReportAutoNumber())){
-            if (dto.getOldRecordNumber()!=null&&dto.getOldRecordNumber().equals(dto.getRecordNo())||dto.getOldReportNumber()!=null&&dto.getOldReportNumber().equals(dto.getReportNo())) {
-                if(strings.length==1){
-                    if(strings[0].equals("1")){
-                        if(StringUtils.isNotEmpty(dto.getRecordAutoNumber())){
-                            trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()),4,dto.getId(),dto.getRecordAutoNumber());
+        if (StringUtils.isNotEmpty(dto.getRecordAutoNumber()) || StringUtils.isNotEmpty(dto.getReportAutoNumber())) {
+            if (dto.getOldRecordNumber() != null && dto.getOldRecordNumber().equals(dto.getRecordNo()) || dto.getOldReportNumber() != null && dto.getOldReportNumber().equals(dto.getReportNo())) {
+                if (strings.length == 1) {
+                    if (strings[0].equals("1")) {
+                        if (StringUtils.isNotEmpty(dto.getRecordAutoNumber())) {
+                            trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()), 4, dto.getId(), dto.getRecordAutoNumber());
                         }
-                    }else {
-                        if(StringUtils.isNotEmpty(dto.getReportAutoNumber())){
-                            trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()),5,dto.getId(),dto.getReportAutoNumber());
+                    } else {
+                        if (StringUtils.isNotEmpty(dto.getReportAutoNumber())) {
+                            trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()), 5, dto.getId(), dto.getReportAutoNumber());
                         }
                     }
-                }else {
-                    if(StringUtils.isNotEmpty(dto.getRecordAutoNumber())){
-                        trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()),4,dto.getId(),dto.getRecordAutoNumber());
+                } else {
+                    if (StringUtils.isNotEmpty(dto.getRecordAutoNumber())) {
+                        trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()), 4, dto.getId(), dto.getRecordAutoNumber());
                     }
-                    if(StringUtils.isNotEmpty(dto.getReportAutoNumber())){
-                        trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()),5,dto.getId(),dto.getReportAutoNumber());
+                    if (StringUtils.isNotEmpty(dto.getReportAutoNumber())) {
+                        trialNumberRuleService.checkSave(Long.valueOf(dto.getProjectId()), 5, dto.getId(), dto.getReportAutoNumber());
                     }
                 }
             }
@@ -1198,53 +1201,55 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
     /**
      * 取到传入的表单中的报告编号或者记录编号 修改记录表中相应字段的值
+     *
      * @param obj
      * @param dto
      */
     private void updateRecordNoOrReportNo(TrialSelfInspectionRecord obj, TrialSelfInspectionRecordDTO dto) {
-            JSONArray dataArray = dto.getDataInfo().getJSONArray("orderList");
-            //获取第一张表的数据  编号以第一张表为准
-            List<JSONObject> dataList = dataArray.toJavaList(JSONObject.class);
-           // 根据 type 字段进行分组
-             Map<String, List<JSONObject>> groupedByType = dataList.stream()
-            .collect(Collectors.groupingBy(jsonObject -> jsonObject.getString("type")));
-          for (Map.Entry<String, List<JSONObject>> entry : groupedByType.entrySet()) {
-              List<JSONObject> jsonObjects = groupedByType.get(entry.getKey());
-              JSONObject   jsonObject = jsonObjects.get(0);
-              if(entry.getKey().equals("2")&&jsonObjects.size()>1){
-                  jsonObject = jsonObjects.get(1);
-              }
-              String pkeyId = jsonObject.getString("pkeyId");
-              String sql = "select * from m_wbs_tree_private where p_key_id =" + pkeyId;
-              WbsTreePrivate table = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreePrivate.class));
-              String fileUrl = table.getHtmlUrl();
-              try {
-                  InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
-                  String htmlString = IoUtil.readToString(fileInputStream);
-                  htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
-                  Document doc = Jsoup.parse(htmlString);
-                  // 查找所有具有 placeholderxx 属性的元素
-                  //表类型 1,9=记录表 2,10=报告单
-                  if(table.getTableType() == 9 || table.getTableType() == 1){
-                      //记录表  以第一张表为准
-                      this.updateRecordNoOrReportNo(dto, jsonObject, doc, "记录编 号:", "record_no");
-                      this.updateRecordNoOrReportNo(dto, jsonObject, doc, "记录编号:", "record_no");
-                  }else if(table.getTableType() == 10 || table.getTableType() == 2){
-                      //报告单
-                      this.updateRecordNoOrReportNo(dto,jsonObject,doc,"报告编号:","report_no");
-                      //  :不一样 一个中文一个英文
-                      this.updateRecordNoOrReportNo(dto,jsonObject,doc,"报告编号:","report_no");
-                  }
-              } catch (Exception e) {
-                  log.error(e.getMessage());
-              }
-          }
+        JSONArray dataArray = dto.getDataInfo().getJSONArray("orderList");
+        //获取第一张表的数据  编号以第一张表为准
+        List<JSONObject> dataList = dataArray.toJavaList(JSONObject.class);
+        // 根据 type 字段进行分组
+        Map<String, List<JSONObject>> groupedByType = dataList.stream()
+                .collect(Collectors.groupingBy(jsonObject -> jsonObject.getString("type")));
+        for (Map.Entry<String, List<JSONObject>> entry : groupedByType.entrySet()) {
+            List<JSONObject> jsonObjects = groupedByType.get(entry.getKey());
+            JSONObject jsonObject = jsonObjects.get(0);
+            if (entry.getKey().equals("2") && jsonObjects.size() > 1) {
+                jsonObject = jsonObjects.get(1);
+            }
+            String pkeyId = jsonObject.getString("pkeyId");
+            String sql = "select * from m_wbs_tree_private where p_key_id =" + pkeyId;
+            WbsTreePrivate table = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(WbsTreePrivate.class));
+            String fileUrl = table.getHtmlUrl();
+            try {
+                InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
+                String htmlString = IoUtil.readToString(fileInputStream);
+                htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
+                Document doc = Jsoup.parse(htmlString);
+                // 查找所有具有 placeholderxx 属性的元素
+                //表类型 1,9=记录表 2,10=报告单
+                if (table.getTableType() == 9 || table.getTableType() == 1) {
+                    //记录表  以第一张表为准
+                    this.updateRecordNoOrReportNo(dto, jsonObject, doc, "记录编 号:", "record_no");
+                    this.updateRecordNoOrReportNo(dto, jsonObject, doc, "记录编号:", "record_no");
+                } else if (table.getTableType() == 10 || table.getTableType() == 2) {
+                    //报告单
+                    this.updateRecordNoOrReportNo(dto, jsonObject, doc, "报告编号:", "report_no");
+                    //  :不一样 一个中文一个英文
+                    this.updateRecordNoOrReportNo(dto, jsonObject, doc, "报告编号:", "report_no");
+                }
+            } catch (Exception e) {
+                log.error(e.getMessage());
+            }
+        }
 
 
     }
 
     /**
      * 判断入参中用户是否自己手动填写了 报告编号或者记录编号
+     *
      * @param dto
      * @return
      */
@@ -1263,20 +1268,20 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 Document doc = Jsoup.parse(htmlString);
                 //可能出现的几种情况 4种情况 记录编 号: 记录编号: 报告编号: 报告编号: 编号:
                 Elements elementsWithPlaceholderxx = doc.select("[placeholderxx='记录编 号:']");
-                if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+                if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
                     elementsWithPlaceholderxx = doc.select("[placeholderxx='记录编号:']");
-                    if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+                    if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
                         elementsWithPlaceholderxx = doc.select("[placeholderxx='报告编号:']");
-                        if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+                        if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
                             elementsWithPlaceholderxx = doc.select("[placeholderxx='报告编号:']");
-                            if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+                            if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
                                 elementsWithPlaceholderxx = doc.select("[placeholderxx='编号:']");
                             }
                         }
                     }
                 }
                 //没找到直接返回false
-                if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+                if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
                     log.error("方法:private boolean JudgingParameters(TrialSelfInspectionRecordDTO dto)中 未找到元素");
                     return false;
                 }
@@ -1284,9 +1289,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 String key = first.attr("id");
                 //记录编号或者报告编号的值
                 String recordOrReportNo = jsonObject.getString(key);
-                if(recordOrReportNo != null || "".equals(recordOrReportNo)){
+                if (recordOrReportNo != null || "".equals(recordOrReportNo)) {
                     return true;
-                }else {
+                } else {
                     return false;
                 }
             } catch (Exception e) {
@@ -1298,31 +1303,32 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
     /**
      * 修改记录编号或者报告编号的值
+     *
      * @param dto
      * @param jsonObject
      * @param doc
      * @param value
      * @param fileVlue
      */
-    private void updateRecordNoOrReportNo(TrialSelfInspectionRecord dto,JSONObject jsonObject,Document doc,String  value, String fileVlue) {
-        Elements elementsWithPlaceholderxx = doc.select("[placeholderxx="+value+"]");
-        if((elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) && value.equals("报告编号:")){
+    private void updateRecordNoOrReportNo(TrialSelfInspectionRecord dto, JSONObject jsonObject, Document doc, String value, String fileVlue) {
+        Elements elementsWithPlaceholderxx = doc.select("[placeholderxx=" + value + "]");
+        if ((elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) && value.equals("报告编号:")) {
             //特殊情况
             value = "编号:";
-            elementsWithPlaceholderxx = doc.select("[placeholderxx="+value+"]");
+            elementsWithPlaceholderxx = doc.select("[placeholderxx=" + value + "]");
         }
-        if(elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null){
+        if (elementsWithPlaceholderxx.size() == 0 || elementsWithPlaceholderxx == null) {
             return;
         }
         Element first = elementsWithPlaceholderxx.first();
         String key = first.attr("id");
         //记录编号或者报告编号的值
         String recordOrReportNo = jsonObject.getString(key);
-        if(!"".equals(recordOrReportNo) && !(recordOrReportNo == null)){
-            String updateSql = "update u_trial_self_inspection_record set " + fileVlue +"='" + recordOrReportNo + "' where id='" + dto.getId()+"'";
-            if(fileVlue.equals("record_no")){
-               dto.setRecordNo(recordOrReportNo);
-            }else {
+        if (!"".equals(recordOrReportNo) && !(recordOrReportNo == null)) {
+            String updateSql = "update u_trial_self_inspection_record set " + fileVlue + "='" + recordOrReportNo + "' where id='" + dto.getId() + "'";
+            if (fileVlue.equals("record_no")) {
+                dto.setRecordNo(recordOrReportNo);
+            } else {
                 dto.setReportNo(recordOrReportNo);
             }
             jdbcTemplate.execute(updateSql);
@@ -1375,7 +1381,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             for (int i = 0; i < dataArray.size(); i++) {
                 JSONObject jsonObject = dataArray.getJSONObject(i);
                 String type = jsonObject.getString("type");
-                if(ObjectUtil.isEmpty(type)){
+                if (ObjectUtil.isEmpty(type)) {
                     throw new RuntimeException("请点击表单后再进行保存");
                 }
                 if (type.equals("1")) {
@@ -1397,37 +1403,37 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 updateSql = getUpdateSql(dto, pdfURL, listPdf, snowId, "record_pdf_url", 2, "report_pdf_url");
             } else {
                 //一起保存的数据  只改变pdf_url
-                this.update(Wrappers.<TrialSelfInspectionRecord>lambdaUpdate().set(TrialSelfInspectionRecord::getPdfUrl, pdfURL).set(TrialSelfInspectionRecord::getTaskStatus,"未上报").eq(TrialSelfInspectionRecord::getId, dto.getId()));
+                this.update(Wrappers.<TrialSelfInspectionRecord>lambdaUpdate().set(TrialSelfInspectionRecord::getPdfUrl, pdfURL).set(TrialSelfInspectionRecord::getTaskStatus, "未上报").eq(TrialSelfInspectionRecord::getId, dto.getId()));
             }
             if (ObjectUtil.isNotEmpty(updateSql)) {
                 jdbcTemplate.execute(updateSql);
             }
-        } else if (pdfURL!=null&&pdfURL.startsWith("500")) {
-            pdfURL=pdfURL.substring(3);
+        } else if (pdfURL != null && pdfURL.startsWith("500")) {
+            pdfURL = pdfURL.substring(3);
             throw new ServiceException(pdfURL);
         }
     }
 
     @NotNull
-    private String getUpdateSql(TrialSelfInspectionRecordDTO dto, String pdfURL, String listPdf, Long snowId,String param1,int type,String param2) {
+    private String getUpdateSql(TrialSelfInspectionRecordDTO dto, String pdfURL, String listPdf, Long snowId, String param1, int type, String param2) {
         String updateSql;
-        String sqlForAntherPDF = "SELECT "+param1+ " from u_trial_self_inspection_record where id =  " + dto.getId() + " and is_deleted = 0";
+        String sqlForAntherPDF = "SELECT " + param1 + " from u_trial_self_inspection_record where id =  " + dto.getId() + " and is_deleted = 0";
         String AntherPDFUrl = jdbcTemplate.queryForObject(sqlForAntherPDF, new SingleColumnRowMapper<String>(String.class));
-        if(ObjectUtil.isNotEmpty(AntherPDFUrl)){
+        if (ObjectUtil.isNotEmpty(AntherPDFUrl)) {
             //合并后保存  把报告单合并在前面
-            if(type == 1){
+            if (type == 1) {
                 FileUtils.mergePdfPublicMethods(Arrays.asList(AntherPDFUrl, pdfURL), listPdf);
-            }else {
-                FileUtils.mergePdfPublicMethods(Arrays.asList(pdfURL,AntherPDFUrl), listPdf);
+            } else {
+                FileUtils.mergePdfPublicMethods(Arrays.asList(pdfURL, AntherPDFUrl), listPdf);
             }
 
             BladeFile bladeFile = this.newIOSSClient.uploadFile(snowId + ".pdf", listPdf);
-            updateSql = "update u_trial_self_inspection_record set pdf_url = '" + bladeFile.getLink() + "',"+param2+ "= '"+ pdfURL + "' ,task_status='未上报' where id='" + dto.getId()+"'";
+            updateSql = "update u_trial_self_inspection_record set pdf_url = '" + bladeFile.getLink() + "'," + param2 + "= '" + pdfURL + "' ,task_status='未上报' where id='" + dto.getId() + "'";
             //合并后更新queryInfo表的pdfurl
             String updateForQurtyInfo = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' where classify='" + dto.getType() + "' and  wbs_id='" + dto.getId() + "' and contract_id ='" + dto.getContractId() + "' ";
             jdbcTemplate.execute(updateForQurtyInfo);
-        }else {
-            updateSql = "update u_trial_self_inspection_record set "+param2+" = '"+ pdfURL + "' ,task_status='未上报' where id='" + dto.getId()+"'";
+        } else {
+            updateSql = "update u_trial_self_inspection_record set " + param2 + " = '" + pdfURL + "' ,task_status='未上报' where id='" + dto.getId() + "'";
         }
         return updateSql;
     }
@@ -1451,16 +1457,16 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
             //取样信息
             List<TrialSampleInfo> trialSampleInfos = trialSampleInfoMapper.selectList(Wrappers.<TrialSampleInfo>lambdaQuery().in(TrialSampleInfo::getId, ids));
-            List<String> samplingLocations = trialSampleInfos.stream().map(TrialSampleInfo::getSamplingLocation).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
+            List<String> samplingLocations = trialSampleInfos.stream().map(TrialSampleInfo::getSamplingLocation).filter(string -> string != null && !string.isEmpty()).collect(Collectors.toList());
             String samplingLocation = org.apache.commons.lang.StringUtils.join(samplingLocations, "、");
 
-            List<String> calculationUnits = trialSampleInfos.stream().map(TrialSampleInfo::getCalculationUnit).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
+            List<String> calculationUnits = trialSampleInfos.stream().map(TrialSampleInfo::getCalculationUnit).filter(string -> string != null && !string.isEmpty()).collect(Collectors.toList());
             String calculationUnit = org.apache.commons.lang.StringUtils.join(calculationUnits, "、");
 
-            List<String> specificationNumbers = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationNumber).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
+            List<String> specificationNumbers = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationNumber).filter(string -> string != null && !string.isEmpty()).collect(Collectors.toList());
             String specificationNumber = org.apache.commons.lang.StringUtils.join(specificationNumbers, "、");
 
-            List<String> specificationModels = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationModel).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
+            List<String> specificationModels = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationModel).filter(string -> string != null && !string.isEmpty()).collect(Collectors.toList());
             String specificationModel = org.apache.commons.lang.StringUtils.join(specificationModels, "、");
 
             //更新
@@ -1568,7 +1574,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
 
-                    maxRecordNo = recordNos.size()+"";
+                    maxRecordNo = recordNos.size() + "";
                 }
 
             }
@@ -1591,7 +1597,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxReportNo = reportNos.size()+"";
+                    maxReportNo = reportNos.size() + "";
 
                 }
             }
@@ -1644,7 +1650,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxRecordNo = recordNos.size()+"";
+                    maxRecordNo = recordNos.size() + "";
                 }
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
@@ -1684,7 +1690,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxReportNo = reportNos.size()+"";
+                    maxReportNo = reportNos.size() + "";
                 }
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
@@ -1704,8 +1710,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             }
         }
     }
+
     //提前构建记录或者报告编号 供用户保存前提交时使用(新增保存前显示系统引用的记录编号或者报告编号)
-    public HashMap<String,String> buildNumberView(TrialSelfInspectionRecordDTO dto) {
+    public HashMap<String, String> buildNumberView(TrialSelfInspectionRecordDTO dto) {
         StringSPUtils spUtils = new StringSPUtils();
         List<TrialSelfInspectionRecord> result = baseMapper.selectAll(dto.getNodeId(), dto.getContractId(), dto.getType());
         List<TrialSelfInspectionRecord> trialSelfInspectionRecords = result.stream().filter(Objects::nonNull).collect(Collectors.toList());
@@ -1731,7 +1738,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
 
-                    maxRecordNo = recordNos.size()+"";
+                    maxRecordNo = recordNos.size() + "";
                 }
 
             }
@@ -1754,7 +1761,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxReportNo = reportNos.size()+"";
+                    maxReportNo = reportNos.size() + "";
 
                 }
             }
@@ -1768,9 +1775,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 //记录表
                 if (StringUtils.isNotEmpty(maxRecordNo)) {
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
-                    stringStringHashMap.put("type","记录表");
+                    stringStringHashMap.put("type", "记录表");
                     if (trialSelfInspectionRecord != null) {
-                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getRecordNo());
+                        stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getRecordNo());
                         return stringStringHashMap;
                     }
                     String str1 = "JL" +
@@ -1778,16 +1785,16 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                             "-" + year +
                             "-" + spUtils.getStringSP(wbsTreePrivate.getNodeName().trim()) +
                             "-" + maxRecordNo;
-                    stringStringHashMap.put("valueStr",str1);
+                    stringStringHashMap.put("valueStr", str1);
                     return stringStringHashMap;
                 }
 
                 //报告单
                 if (StringUtils.isNotEmpty(maxReportNo)) {
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
-                    stringStringHashMap.put("type","报告单");
+                    stringStringHashMap.put("type", "报告单");
                     if (trialSelfInspectionRecord != null) {
-                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getReportNo());
+                        stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getReportNo());
                         return stringStringHashMap;
                     }
                     String str2 = "BG" +
@@ -1795,7 +1802,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                             "-" + year +
                             "-" + spUtils.getStringSP(wbsTreePrivate.getNodeName().trim()) +
                             "-" + maxReportNo;
-                    stringStringHashMap.put("valueStr",str2);
+                    stringStringHashMap.put("valueStr", str2);
                     return stringStringHashMap;
                 }
             }
@@ -1821,7 +1828,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxRecordNo = recordNos.size()+"";
+                    maxRecordNo = recordNos.size() + "";
                 }
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
@@ -1832,9 +1839,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 } else {
                     //记录表
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
-                    stringStringHashMap.put("type","记录表");
+                    stringStringHashMap.put("type", "记录表");
                     if (trialSelfInspectionRecord != null) {
-                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getRecordNo());
+                        stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getRecordNo());
                         return stringStringHashMap;
                     }
                     String str1 = "JL" +
@@ -1842,7 +1849,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                             "-" + year +
                             "-" + spUtils.getStringSP(wbsTreePrivate.getNodeName().trim()) +
                             "-" + maxRecordNo;
-                    stringStringHashMap.put("valueStr",str1);
+                    stringStringHashMap.put("valueStr", str1);
                     return stringStringHashMap;
                 }
             }
@@ -1868,7 +1875,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                     }*/
-                    maxReportNo = reportNos.size()+"";
+                    maxReportNo = reportNos.size() + "";
                 }
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
@@ -1879,9 +1886,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 } else {
                     //报告单
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
-                    stringStringHashMap.put("type","报告单");
+                    stringStringHashMap.put("type", "报告单");
                     if (trialSelfInspectionRecord != null) {
-                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getReportNo());
+                        stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getReportNo());
                         return stringStringHashMap;
                     }
                     String str2 = "BG" +
@@ -1889,7 +1896,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                             "-" + year +
                             "-" + spUtils.getStringSP(wbsTreePrivate.getNodeName().trim()) +
                             "-" + maxReportNo;
-                    stringStringHashMap.put("valueStr",str2);
+                    stringStringHashMap.put("valueStr", str2);
                     return stringStringHashMap;
                 }
             }
@@ -1904,6 +1911,15 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             endTime = DateUtil.format(DateUtils.addDays(DateUtil.parse(endTime, "yyyy-MM-dd"), 1), "yyyy-MM-dd");
             queryWrapper.lambda().between(TrialSelfInspectionRecord::getReportDate, dto.getStartTime(), endTime);
         }
+        if (dto.getReportType() != null) {
+            if (dto.getReportType() == 0) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 1);
+            } else if (dto.getReportType() == 1) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 2);
+            } else if (dto.getReportType() == 2) {
+                queryWrapper.lambda().eq(TrialSelfInspectionRecord::getType, 3);
+            }
+        }
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getTaskStatus, "已审批");
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getDetectionResult, 1); //合格
         queryWrapper.lambda().eq(TrialSelfInspectionRecord::getDetectionCategory, 1); //自检
@@ -1970,23 +1986,23 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 .eq(InformationQuery::getWbsId, dto.getNodeId())
                 .eq(InformationQuery::getProjectId, dto.getProjectId())
                 .eq(InformationQuery::getContractId, dto.getContractId())
+                .ne(InformationQuery::getStatus, 3)
                 .eq(InformationQuery::getType, 1)).stream().findAny().orElse(null);
 
         if (StringUtils.isNotEmpty(dto.getIds())) {
             if (informationQuery != null) {
                 List<String> pdfList = new ArrayList<>();
                 //------自检------
+                if (informationQuery.getPdfTrialUrl() != null) {
+                    //如果当前存在第三方、外委的pdf,那么拼接
+                    pdfList.add(informationQuery.getPdfTrialUrl());
+                }
                 if (dto.getType().equals(1)) {
-                    if (informationQuery.getPdfTrialUrl() != null) {
-                        //如果当前存在第三方、外委的pdf,那么拼接
-                        pdfList.add(informationQuery.getPdfTrialUrl());
-                    }
-
                     //自检pdf
                     List<TrialSelfInspectionRecord> trialSelfInspectionRecords = baseMapper.selectList(Wrappers.<TrialSelfInspectionRecord>lambdaQuery()
-                            .select(TrialSelfInspectionRecord::getPdfUrl,TrialSelfInspectionRecord::getContractId,TrialSelfInspectionRecord::getId,TrialSelfInspectionRecord::getType)
+                            .select(TrialSelfInspectionRecord::getPdfUrl, TrialSelfInspectionRecord::getContractId, TrialSelfInspectionRecord::getId, TrialSelfInspectionRecord::getType)
                             .in(TrialSelfInspectionRecord::getId, Func.toLongList(dto.getIds())));
-                    if(trialSelfInspectionRecords.size()>0){
+                    if (trialSelfInspectionRecords.size() > 0) {
                         for (TrialSelfInspectionRecord record : trialSelfInspectionRecords) {
                             String pdf = this.getMergePdfToTrialNew(record.getContractId(), record.getId(), record.getType());
                             pdfList.add(pdf);
@@ -1996,11 +2012,6 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 //                    pdfList.addAll(pdfURLs);
                     //------第三方、外委------
                 } else if (dto.getType().equals(2) || dto.getType().equals(3)) {
-                    if (informationQuery.getPdfTrialUrl() != null) {
-                        //如果当前存在试验自检的pdf,那么拼接
-                        pdfList.add(informationQuery.getPdfTrialUrl());
-                    }
-
                     //第三方、外委pdf
                     List<TrialDetectionData> trialDetectionData = trialDetectionDataService.getBaseMapper().selectList(Wrappers.<TrialDetectionData>lambdaQuery().in(TrialDetectionData::getId, Func.toLongList(dto.getIds())));
                     List<String> pdfURLs = new ArrayList<>();
@@ -2015,6 +2026,24 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     pdfList.addAll(pdfURLs);
                 }
 
+                //成渝自检
+                if (dto.getType().equals(11)) {
+                    List<TrialCyFinishTestReport> trialCyFinishTestReports = trialCyFinishTestReportService.getBaseMapper().selectList(Wrappers.<TrialCyFinishTestReport>lambdaQuery().in(TrialCyFinishTestReport::getTaskId, Func.toLongList(dto.getIds())));
+                    trialCyFinishTestReports.forEach(f -> {
+                        if (StringUtils.isNotBlank(f.getAssembleFile())) {
+                            pdfList.add(f.getAssembleFile());
+                        }
+
+                    });
+                } else if (dto.getType().equals(12) || dto.getType().equals(13)) {
+                    List<TrialCyThirdReport> trialCyThirdReports = trialCyThirdReportService.getBaseMapper().selectList(Wrappers.<TrialCyThirdReport>lambdaQuery().in(TrialCyThirdReport::getId, Func.toLongList(dto.getIds())));
+                    trialCyThirdReports.forEach(f -> {
+                        if (StringUtils.isNotBlank(f.getAssembleFile())) {
+                            pdfList.add(f.getAssembleFile());
+                        }
+                    });
+                }
+
                 if (pdfList.size() > 0) {
                     //合并试验自检、第三方、外委的pdf
                     List<String> collect = pdfList.stream().filter(Objects::nonNull).collect(Collectors.toList());
@@ -2029,10 +2058,12 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         BladeFile bladeFile = this.newIOSSClient.uploadFile(informationQuery.getId() + ".pdf", listPdf);
                         if (bladeFile != null) {
                             //修改当前节点的pdfTrialURL地址
-                            if (informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getPdfTrialUrl, bladeFile.getLink()).eq(InformationQuery::getId, informationQuery.getId()))) {
+                            if (informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate()
+                                    .set(InformationQuery::getPdfTrialUrl, bladeFile.getLink())
+                                    .eq(InformationQuery::getId, informationQuery.getId()))) {
                                 for (String recordId : Func.toStrList(dto.getIds())) {
                                     baseMapper.deleteSeletedStatusByNodeId(dto.getNodeId(), dto.getType(), recordId); //先删除对应记录
-                                    baseMapper.insertSeletedStatus(SnowFlakeUtil.getId(), dto.getNodeId(), dto.getType(), recordId); //新增该类型选中的记录信息
+                                    baseMapper.insertSeletedStatus(SnowFlakeUtil.getId(), dto.getNodeId(), dto.getType(), recordId, dto.getTableFileType()); //新增该类型选中的记录信息
                                 }
                                 return true;
                             }
@@ -2087,10 +2118,12 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         BladeFile bladeFile = this.newIOSSClient.uploadFile(informationQuery.getId() + ".pdf", listPdf);
                         if (bladeFile != null) {
                             //修改当前节点最新的pdfTrialURL地址
-                            if (informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getPdfTrialUrl, bladeFile.getLink()).eq(InformationQuery::getId, informationQuery.getId()))) {
+                            if (informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate()
+                                    .set(InformationQuery::getPdfTrialUrl, bladeFile.getLink())
+                                    .eq(InformationQuery::getId, informationQuery.getId()))) {
                                 for (String recordId : recordIds) {
                                     baseMapper.deleteSeletedStatusByNodeId(dto.getNodeId(), dto.getType(), recordId); //先删除对应记录
-                                    baseMapper.insertSeletedStatus(SnowFlakeUtil.getId(), dto.getNodeId(), dto.getType(), recordId); //新增该类型选中的记录信息
+                                    baseMapper.insertSeletedStatus(SnowFlakeUtil.getId(), dto.getNodeId(), dto.getType(), recordId, dto.getTableFileType()); //新增该类型选中的记录信息
                                 }
                                 return true;
                             }
@@ -2100,7 +2133,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             } else {
                 //修改pdfTrialUrl=null
                 if (informationQuery != null) {
-                    informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getPdfTrialUrl, null).eq(InformationQuery::getId, informationQuery.getId()));
+                    informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate()
+                            .set(InformationQuery::getPdfTrialUrl, null)
+                            .eq(InformationQuery::getId, informationQuery.getId()));
                 }
             }
             //删除该类型的所有记录信息
@@ -2113,7 +2148,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     @Override
     public R getSamplePdfUrl(String id, String contrctId) {
         try {
-            String  pdf = this.getMergePdfToTrial(Func.toLong(contrctId), Func.toLong(id));
+            String pdf = this.getMergePdfToTrial(Func.toLong(contrctId), Func.toLong(id));
             return R.data(pdf);
         } catch (FileNotFoundException e) {
             throw new RuntimeException(e);
@@ -2185,28 +2220,28 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
         if (entrustInfo != null && info == null && oldTrialSampleInfo != null) {
             if (entrustInfo.getSampleId() != null && entrustInfo.getSampleId().equals(oldTrialSampleInfo.getId())) {
                 record.setEntrustId(null);
-                baseInfo.setEntrustId( null);
+                baseInfo.setEntrustId(null);
                 baseInfo.setEntrustNo(null);
             }
         }
-        boolean a=true;
-        boolean b=true;
+        boolean a = true;
+        boolean b = true;
         record.setBaseInfo(JSON.toJSONString(baseInfo));
         if (oldRecord == null) {
-            if(StringUtils.isNotEmpty(record.getRecordNo())){
-                if(StringUtils.isNotEmpty(record.getRecordNo())){
-                    a= trialNumberRuleService.checkTrialNumberIsExist(record.getRecordNo(), 4, record.getContractId());
+            if (StringUtils.isNotEmpty(record.getRecordNo())) {
+                if (StringUtils.isNotEmpty(record.getRecordNo())) {
+                    a = trialNumberRuleService.checkTrialNumberIsExist(record.getRecordNo(), 4, record.getContractId());
                 }
             }
-            if(StringUtils.isNotEmpty(record.getRecordNo())){
-                if(StringUtils.isNotEmpty(record.getReportNo())){
-                    b= trialNumberRuleService.checkTrialNumberIsExist(record.getReportNo(), 5, record.getContractId());
+            if (StringUtils.isNotEmpty(record.getRecordNo())) {
+                if (StringUtils.isNotEmpty(record.getReportNo())) {
+                    b = trialNumberRuleService.checkTrialNumberIsExist(record.getReportNo(), 5, record.getContractId());
                 }
             }
-            if(!a){
+            if (!a) {
                 throw new ServiceException("记录编号已存在");
             }
-            if(!b){
+            if (!b) {
                 throw new ServiceException("报告编号已存在");
             }
             this.save(record);
@@ -2231,9 +2266,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (StringUtils.isNotBlank(samplingLocation) || StringUtils.isNotBlank(calculationUnit) || StringUtils.isNotBlank(specificationNumber) || StringUtils.isNotBlank(specificationModel)) {
                     this.update(Wrappers.<TrialSelfInspectionRecord>lambdaUpdate()
                             .set(StringUtils.isNotBlank(samplingLocation), TrialSelfInspectionRecord::getSamplingLocation, samplingLocation)
-                            .set(StringUtils.isNotBlank(calculationUnit),TrialSelfInspectionRecord::getCompany, calculationUnit)
-                            .set(StringUtils.isNotBlank(specificationNumber),TrialSelfInspectionRecord::getSpecificationNumber, specificationNumber)
-                            .set(StringUtils.isNotBlank(specificationModel),TrialSelfInspectionRecord::getSpecificationModel, specificationModel)
+                            .set(StringUtils.isNotBlank(calculationUnit), TrialSelfInspectionRecord::getCompany, calculationUnit)
+                            .set(StringUtils.isNotBlank(specificationNumber), TrialSelfInspectionRecord::getSpecificationNumber, specificationNumber)
+                            .set(StringUtils.isNotBlank(specificationModel), TrialSelfInspectionRecord::getSpecificationModel, specificationModel)
                             .eq(TrialSelfInspectionRecord::getId, record.getId()));
                 }
                 if (entrustInfo == null) {
@@ -2248,9 +2283,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             }
         }
         // ---- 修改样品单号信息 --------
-        if(entrustInfo != null){
+        if (entrustInfo != null) {
             //修改项目节点基础信息
-            jdbcTemplate.update("update u_entrust_info set sample_status=4 where id ='"+entrustInfo.getId()+"'");
+            jdbcTemplate.update("update u_entrust_info set sample_status=4 where id ='" + entrustInfo.getId() + "'");
             if (entrustInfo.getSampleId() != null) {
                 TrialSampleInfo sampleInfo = trialSampleInfoMapper.selectById(entrustInfo.getSampleId());
                 if (sampleInfo != null) {
@@ -2269,9 +2304,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     if (StringUtils.isNotBlank(samplingLocation) || StringUtils.isNotBlank(calculationUnit) || StringUtils.isNotBlank(specificationNumber) || StringUtils.isNotBlank(specificationModel)) {
                         this.update(Wrappers.<TrialSelfInspectionRecord>lambdaUpdate()
                                 .set(StringUtils.isNotBlank(samplingLocation), TrialSelfInspectionRecord::getSamplingLocation, samplingLocation)
-                                .set(StringUtils.isNotBlank(calculationUnit),TrialSelfInspectionRecord::getCompany, calculationUnit)
-                                .set(StringUtils.isNotBlank(specificationNumber),TrialSelfInspectionRecord::getSpecificationNumber, specificationNumber)
-                                .set(StringUtils.isNotBlank(specificationModel),TrialSelfInspectionRecord::getSpecificationModel, specificationModel)
+                                .set(StringUtils.isNotBlank(calculationUnit), TrialSelfInspectionRecord::getCompany, calculationUnit)
+                                .set(StringUtils.isNotBlank(specificationNumber), TrialSelfInspectionRecord::getSpecificationNumber, specificationNumber)
+                                .set(StringUtils.isNotBlank(specificationModel), TrialSelfInspectionRecord::getSpecificationModel, specificationModel)
                                 .eq(TrialSelfInspectionRecord::getId, record.getId()));
                     }
                 }
@@ -2289,16 +2324,16 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             recordDTO.setTrialUserName(AuthUtil.getNickName());
             this.trialDeviceUseService.addDeviceUseInfo(recordDTO, record.getId());
         }
-            if(dto.getOldRecordNumber()!=null&&dto.getOldRecordNumber().equals(dto.getRecordNo())){
-                if(StringUtils.isNotEmpty(dto.getRecordAutoNumber())){
-                    trialNumberRuleService.checkSave(dto.getContractId(),4,record.getId(),dto.getRecordAutoNumber());
-                }
+        if (dto.getOldRecordNumber() != null && dto.getOldRecordNumber().equals(dto.getRecordNo())) {
+            if (StringUtils.isNotEmpty(dto.getRecordAutoNumber())) {
+                trialNumberRuleService.checkSave(dto.getContractId(), 4, record.getId(), dto.getRecordAutoNumber());
             }
-            if(dto.getOldReportNumber()!=null&&dto.getOldReportNumber().equals(dto.getReportNo())){
-                if(StringUtils.isNotEmpty(dto.getReportAutoNumber())){
-                    trialNumberRuleService.checkSave(dto.getContractId(),5,record.getId(),dto.getReportAutoNumber());
-                }
+        }
+        if (dto.getOldReportNumber() != null && dto.getOldReportNumber().equals(dto.getReportNo())) {
+            if (StringUtils.isNotEmpty(dto.getReportAutoNumber())) {
+                trialNumberRuleService.checkSave(dto.getContractId(), 5, record.getId(), dto.getReportAutoNumber());
             }
+        }
 
         return record.getId();
     }

+ 166 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSystemDockingServiceImpl.java

@@ -0,0 +1,166 @@
+/*
+ *      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.business.service.impl;
+
+import com.aliyun.oss.OSSClient;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import org.springblade.business.dto.TrialSystemDockingDTO1;
+import org.springblade.business.entity.TrialSystemDocking;
+import org.springblade.business.utils.FileUtils;
+import org.springblade.business.vo.TrialSystemDockingVO;
+import org.springblade.business.mapper.TrialSystemDockingMapper;
+import org.springblade.business.service.ITrialSystemDockingService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.oss.model.BladeFile;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.List;
+
+/**
+ * 德飞试验系统对接表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-08-15
+ */
+@Service
+public class TrialSystemDockingServiceImpl extends BaseServiceImpl<TrialSystemDockingMapper, TrialSystemDocking> implements ITrialSystemDockingService {
+
+
+    @Autowired
+	private  NewIOSSClient newIOSSClient;
+    @Autowired
+    private JdbcTemplate jdbcTemplate;
+
+	@Override
+	public IPage<TrialSystemDockingVO> selectTrialSystemDockingPage(IPage<TrialSystemDockingVO> page, TrialSystemDockingVO trialSystemDocking) {
+		List<TrialSystemDockingVO> trialSystemDockingVOS = baseMapper.selectTrialSystemDockingPage(page, trialSystemDocking);
+		return page.setRecords(trialSystemDockingVOS);
+	}
+
+	@Async("taskExecutor1")
+	@Transactional
+	public void syncUpdateFile(List<TrialSystemDocking> list) {
+		String file_path = FileUtils.getSysLocalFileUrl()+"/trial/";
+		list.parallelStream().forEach(tsd -> {
+			if(tsd.getFileUrl()!=null){
+				try {
+					String localFilePath = file_path + tsd.getId() + ".pdf";
+					//下载文件到本地路径
+					boolean b = downloadFileFromUrl(tsd.getFileUrl(), localFilePath);
+					if(b){
+						String fileName=tsd.getProjectId()+"|"+tsd.getId() + ".pdf";
+						BladeFile bladeFile = newIOSSClient.uploadFile(fileName, localFilePath);
+						if(bladeFile!=null){
+							tsd.setFileUrlOss(bladeFile.getLink());
+							tsd.setIsUpdateOss(1);
+							try {
+								FileUtils.removeFile(localFilePath);
+							} catch (Exception e) {
+								System.err.println("删除本地文件失败: " + localFilePath + ", 错误: " + e.getMessage());
+							}
+
+						}else {
+							tsd.setIsUpdateOss(0);
+						}
+					}else{
+						tsd.setIsUpdateOss(0);
+					}
+				} catch (Exception e) {
+					tsd.setIsUpdateOss(3);
+				}
+
+			}
+		});
+		this.updateBatchById(list);
+	}
+
+	@Override
+	public void updatedelete(List<Long> longList) {
+		for (Long id : longList) {
+			String sql="delete from u_trial_system_docking where id="+id+" or data_id="+id;
+			jdbcTemplate.execute(sql);
+		}
+	}
+
+	@Override
+	@Async("taskExecutor1")
+	@Transactional
+	public void syncUpdateFile1(TrialSystemDocking trialSystemDocking) {
+		String file_path = FileUtils.getSysLocalFileUrl()+"/trial/";
+		try {
+			String localFilePath = file_path + trialSystemDocking.getId() + ".pdf";
+			//下载文件到本地路径
+			boolean b = downloadFileFromUrl(trialSystemDocking.getFileUrl(), localFilePath);
+			if(b){
+				String fileName=trialSystemDocking.getProjectId()+"/"+trialSystemDocking.getId() + ".pdf";
+				BladeFile bladeFile = newIOSSClient.uploadFile(fileName, localFilePath);
+				if(bladeFile!=null){
+					trialSystemDocking.setFileUrlOss(bladeFile.getLink());
+					trialSystemDocking.setIsUpdateOss(1);
+					try {
+						FileUtils.removeFile(localFilePath);
+					} catch (Exception e) {
+						System.err.println("删除本地文件失败: " + localFilePath + ", 错误: " + e.getMessage());
+					}
+				}else {
+					trialSystemDocking.setIsUpdateOss(3);
+				}
+			}else{
+				trialSystemDocking.setIsUpdateOss(0);
+			}
+		} catch (Exception e) {
+			trialSystemDocking.setIsUpdateOss(3);
+		}
+		this.updateById(trialSystemDocking);
+	}
+
+	public boolean downloadFileFromUrl(String fileUrl, String localPath) {
+		try {
+			URL url = new URL(fileUrl);
+			HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+			connection.setRequestMethod("GET");
+			connection.setConnectTimeout(5000);
+			connection.setReadTimeout(5000);
+
+			try (InputStream inputStream = connection.getInputStream();
+				 FileOutputStream outputStream = new FileOutputStream(localPath)) {
+
+				byte[] buffer = new byte[4096];
+				int bytesRead;
+				while ((bytesRead = inputStream.read(buffer)) != -1) {
+					outputStream.write(buffer, 0, bytesRead);
+				}
+				outputStream.flush();
+				return true;
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+}

+ 136 - 0
blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java

@@ -18,6 +18,7 @@ import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SystemUtils;
 import org.springblade.common.vo.DataVO;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.tool.utils.IoUtil;
 import org.springblade.system.cache.ParamCache;
 
@@ -32,7 +33,9 @@ import java.awt.geom.AffineTransform;
 import java.awt.image.AffineTransformOp;
 import java.awt.image.BufferedImage;
 import java.io.*;
+import java.net.URL;
 import java.net.URLEncoder;
+import java.nio.file.*;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -604,4 +607,137 @@ public class FileUtils {
         String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path2, "");
         return path;
     }
+
+    /**
+     * 获取本地文件,若不存在则从URL下载
+     */
+    public static Path getOrDownloadFile(String localPath) throws IOException {
+        Path path = Paths.get(localPath);
+
+        // 如果本地文件不存在,则从URL下载
+        if (!Files.exists(path)) {
+            System.out.println("本地文件不存在,开始下载...");
+            // 确保父目录存在
+            Path parentDir = path.getParent();
+            if (parentDir != null && !Files.exists(parentDir)) {
+                Files.createDirectories(parentDir);
+            }
+
+            // 从URL下载文件
+            try (InputStream in = CommonUtil.getOSSInputStream(getNetUrl(localPath))) {
+                Files.copy(in, path);
+                System.out.println("文件下载成功: " + path);
+            } catch (IOException e) {
+                throw new IOException("下载文件失败: " + e.getMessage(), e);
+            }
+        }
+        return path;
+    }
+
+    /**
+     * 生成带后缀的副本路径
+     */
+    public static Path generateCopyPath(Path originalPath, Long pKeyId) {
+        String suffix = "_" + pKeyId + "_copy";
+        String fileName = originalPath.getFileName().toString();
+        int dotIndex = fileName.lastIndexOf('.');
+
+        // 处理带扩展名和不带扩展名的文件
+        String newName = (dotIndex > 0)
+                ? fileName.substring(0, dotIndex) + suffix + fileName.substring(dotIndex)
+                : fileName + suffix;
+
+        return originalPath.resolveSibling(newName);
+    }
+
+    public static void removeFile(String localFilePath) {
+        try {
+            java.nio.file.Files.deleteIfExists(java.nio.file.Paths.get(localFilePath));
+        } catch (Exception e) {
+            // 记录日志但不中断主流程
+            System.err.println("删除本地文件失败: " + localFilePath + ", 错误: " + e.getMessage());
+        }
+    }
+
+    /**
+     * 获取文件绝对路径并复制文件
+     * @param sourcePath 源文件路径(相对或绝对)
+     */
+    public static String copyFileWithAbsolutePath(String sourcePath) {
+        try {
+            // 1. 获取源文件的绝对路径
+            File sourceFile = new File(sourcePath);
+            if(!sourceFile.exists()){
+                String path = getNetUrl(sourcePath);
+                InputStream ossInputStream = CommonUtil.getOSSInputStream(getNetUrl(sourcePath));
+            }
+
+            String absolutePath = sourceFile.getAbsolutePath();
+            System.out.println("源文件绝对路径: " + absolutePath);
+
+            // 2. 验证文件存在且可读
+            if (!sourceFile.exists()) {
+                System.err.println("错误: 源文件不存在");
+                throw new ServiceException("错误: 源文件不存在");
+            }
+            if (!sourceFile.canRead()) {
+                System.err.println("错误: 无法读取源文件");
+
+                throw new ServiceException("错误: 源文件不存在");
+            }
+
+            // 3. 创建目标文件路径(在相同目录,文件名添加 _copy)
+            String parentDir = sourceFile.getParent();
+            String fileName = sourceFile.getName();
+
+            // 提取文件名和扩展名
+            String baseName;
+            String extension = "";
+            int dotIndex = fileName.lastIndexOf('.');
+            if (dotIndex > 0) {
+                baseName = fileName.substring(0, dotIndex);
+                extension = fileName.substring(dotIndex);
+            } else {
+                baseName = fileName;
+            }
+
+            // 生成唯一的目标文件名(避免覆盖)
+            File destFile;
+            int copyCounter = 1;
+            do {
+                String newFileName = baseName + "_copy" +
+                        (copyCounter > 1 ? "_" + copyCounter : "") +
+                        extension;
+                destFile = new File(parentDir, newFileName);
+                copyCounter++;
+            } while (destFile.exists());
+
+            System.out.println("目标文件路径: " + destFile.getAbsolutePath());
+
+            // 4. 执行文件复制(使用NIO方法)
+            Path source = sourceFile.toPath();
+            Path destination = destFile.toPath();
+
+            // 复制文件并保留属性
+            Files.copy(source, destination,
+                    StandardCopyOption.COPY_ATTRIBUTES,
+                    StandardCopyOption.REPLACE_EXISTING);
+
+            System.out.println("文件复制成功!");
+            return destFile.getAbsolutePath();
+        } catch (InvalidPathException e) {
+            System.err.println("路径无效: " + e.getMessage());
+            throw new ServiceException("路径无效");
+        } catch (FileAlreadyExistsException e) {
+            System.err.println("文件已存在: " + e.getMessage());
+            throw new ServiceException("文件已存在");
+        } catch (AccessDeniedException e) {
+            System.err.println("访问被拒绝: " + e.getMessage());
+            throw new ServiceException("访问被拒绝");
+        } catch (IOException e) {
+            System.err.println("IO错误: " + e.getMessage());
+            e.printStackTrace();
+            throw new ServiceException("IO错误");
+        }
+    }
 }

+ 1 - 1
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/Archive2Controller.java

@@ -59,7 +59,7 @@ public class Archive2Controller {
     @Resource(name = "archivePoolExecutor")
     private ThreadPoolExecutor archExecutor;
 
-    @Scheduled(cron = "0/30 * * * * ?")
+    //@Scheduled(cron = "0/30 * * * * ?")
     public void SignTaskBatchPng() {
         //执行代码
         log.info("分解pdf专图片");

+ 181 - 0
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/testTaskInfo.java

@@ -0,0 +1,181 @@
+package org.springblade.evisa.controller;
+
+import io.swagger.annotations.Api;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.PDPage;
+import org.apache.pdfbox.rendering.PDFRenderer;
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
+import org.springblade.common.utils.CommonUtil;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.launch.StartEventListener;
+import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.IoUtil;
+import org.springblade.evisa.utils.FileUtils;
+import org.springblade.evisa.vo.ArchivesSplitInfoVO;
+import org.springblade.evisa.vo.TaskArchiveSplitVO;
+import org.springblade.resource.feign.NewIOSSClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+
+/**
+ * 清表基础数据表 控制器
+ *
+ * @author BladeX
+ * @since 2022-05-18
+ */
+@RestController
+@AllArgsConstructor
+@Api(value = "电签类", tags = "电签类接口")
+@Slf4j
+public class testTaskInfo {
+
+    private final StringRedisTemplate RedisTemplate;
+
+    private final JdbcTemplate jdbcTemplate;
+
+    private final NewIOSSClient newIOSSClient;
+
+    // 线程池
+    @Resource(name = "archivePoolExecutor")
+    private ThreadPoolExecutor archExecutor;
+    @Autowired
+    private StartEventListener startEventListener;
+
+    //@Scheduled(cron = "0/20 * * * * ?")
+    public void SignTaskBatchPng() {
+        //执行代码
+        log.info("分解pdf专图片");
+     
+        String sql = "select * from u_information_query_zhu where is_deleted=0 and wbs_id=1932616157764780032 ";
+        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(sql);
+        if (mapList != null && mapList.size() >= 1) {
+            for (Map<String, Object> dataInfo : mapList) {
+
+                String ndid=dataInfo.get("id")+"";
+                String contractId=dataInfo.get("contract_id")+"";
+                String projectId=dataInfo.get("project_id")+"";
+                String classify=dataInfo.get("classify")+"";
+                String wbs_id=dataInfo.get("wbs_id")+"";
+
+
+                if (archExecutor.getQueue().size() <= 30) {
+                    Boolean aBoolean = RedisTemplate.hasKey("taskIdxx-" + ndid);
+                    if (!aBoolean) {
+                        RedisTemplate.opsForValue().setIfAbsent("taskIdxx-" + ndid, "1", 600, TimeUnit.SECONDS);
+                        CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
+                            try {
+                                signTaskBatchpngToHtml(ndid,contractId,projectId,classify,wbs_id);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }, archExecutor);
+                    }
+                }
+            }
+        }
+        System.out.println("队列数量_img" + archExecutor.getQueue().size());
+        System.out.println("活跃数量_img" + archExecutor.getActiveCount());
+        System.out.println("总共数量_img" + archExecutor.getTaskCount());
+        System.out.println("完成数量_img" + archExecutor.getCompletedTaskCount());
+    }
+
+    // 分解第一页的任务
+
+    public void signTaskBatchpngToHtml(String ndid,String contractId,String projectId,String classify,String wbs_id) {
+        //
+
+        String taownInfo = "";
+        if(classify.equals("1")){
+            taownInfo="1,2,3";
+        }
+        if(classify.equals("2")){
+            taownInfo="4,5,6";
+        }
+        String  node_info = "select * from m_wbs_tree_contract where is_deleted=0 and table_owner in("+taownInfo+") and p_id = '" + wbs_id + "'";
+        List<Map<String, Object>> nodeInfoList = jdbcTemplate.queryForList(node_info);
+        if(nodeInfoList!=null && nodeInfoList.size()>=1){
+          String priIds = nodeInfoList.stream().map(m -> m.get("is_type_private_pid")).map(Object::toString).collect(Collectors.joining(","));
+            String qweq = nodeInfoList.get(0).get("ancestors_p_id")+"";
+            System.out.println("qweq"+qweq);
+            List<String> str = Func.toStrList(qweq);
+
+            for(int i=1;i<=5;i++){
+                String anId = str.get(str.size() - i-1);
+                String sqldat ="";
+                if(i==5){
+                    sqldat= " SELECT c.p_id, c.aaCount,(SELECT b.id from u_information_query a ,u_task b where a.id=b.form_data_id and a.wbs_id=c.p_id and b.contract_id="+contractId+"  and  a.is_deleted=0 and b.is_deleted=0 ORDER BY a.`status` desc LIMIT 1) as taskId from ("+
+                            "select p_id,count(1) as aaCount from m_wbs_tree_contract where is_deleted=0 and contract_id = '" + contractId + "' and table_owner in ( " + taownInfo + " ) and is_type_private_pid in("+priIds+") and p_id<>"+wbs_id+" group by p_id "+
+                            " ) c ";
+                }else{
+                    sqldat= " SELECT c.p_id, c.aaCount,(SELECT b.id from u_information_query a ,u_task b where a.id=b.form_data_id and a.wbs_id=c.p_id and a.is_deleted=0 and b.contract_id="+contractId+"  and b.is_deleted=0 ORDER BY a.`status` desc LIMIT 1) as taskId from ("+
+                            "select p_id,count(1) as aaCount from m_wbs_tree_contract where is_deleted=0 and contract_id = '" + contractId + "' and table_owner in ( " + taownInfo + " ) and is_type_private_pid in("+priIds+") and ancestors_p_id like '%"+anId+"%' and p_id<>"+wbs_id+" group by p_id "+
+                            " ) c ";
+                }
+
+                List<Map<String, Object>> noInfoList = jdbcTemplate.queryForList(sqldat);
+                if(noInfoList!=null && noInfoList.size()>=1){
+                    for(Map<String, Object> noInfo : noInfoList) {
+                        Integer exceptxx = Integer.parseInt(noInfo.get("aaCount")+"");
+                        String taskId = noInfo.get("taskId")+"";
+                        if(exceptxx >= nodeInfoList.size() && taskId.length()>4){
+                            long newPkId = SnowFlakeUtil.getId();
+                            long projInstand = SnowFlakeUtil.getId();
+                            String dataInfo = " insert into u_task(id,process_definition_id,process_instance_id,project_id,contract_id,start_time,end_time,report_user,report_user_name,task_name,task_content,task_user,fixed_flow_id,form_data_id,batch,type,approval_type,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,trial_self_inspection_record_id,archive_ids,attachment_pdf_url,task_create_timestamp,meter_task_type,meter_task_repeal_desc,task_common_money,is_build_audit) " +
+                                    "SELECT "+newPkId+",process_definition_id,"+projInstand+",project_id,contract_id,start_time,end_time,report_user,report_user_name,task_name,task_content,task_user,fixed_flow_id,"+ndid+",batch,type,approval_type,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,trial_self_inspection_record_id,archive_ids,attachment_pdf_url,task_create_timestamp,meter_task_type,meter_task_repeal_desc,task_common_money,is_build_audit from u_task where id="+taskId;
+
+                            // 添加任务
+
+                            String peall = "SELECT a.* from u_task_parallel a ,u_task b  where a.process_instance_id=b.process_instance_id and b.id='"+taskId+"' and a.is_deleted=0 and b.is_deleted=0 ";
+                            List<Map<String, Object>> mapList = jdbcTemplate.queryForList(peall);
+                            if(mapList!=null && mapList.size()>=1){
+                                for (Map<String, Object> mapData : mapList){
+                                    String pallId= mapData.get("id")+"";
+                                    long projInstaxnd = SnowFlakeUtil.getId();
+                                    String datadx = " insert into u_task_parallel(id,process_instance_id,parallel_process_instance_id,e_visa_status,e_visa_content,task_user,task_user_name,initiative,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,sort,exe_count) " +
+                                             " SELECT "+projInstaxnd+","+projInstand+","+projInstaxnd+",e_visa_status,e_visa_content,task_user,task_user_name,initiative,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,sort,exe_count from u_task_parallel where id='"+pallId+"'";
+
+                                    jdbcTemplate.execute(datadx);
+                                }
+                            }
+
+                            jdbcTemplate.execute(dataInfo);
+                            String updateSql = "update u_information_query_zhu set is_deleted=1 where id="+ndid;
+                            jdbcTemplate.execute(updateSql);
+                            // 修改完成情况
+                            RedisTemplate.delete("taskIdxx-" + ndid);
+                            return;
+                        }
+                    }
+                }
+            }
+        }
+
+        String updatel = "update u_information_query_zhu set is_deleted=5 where id="+ndid;
+        jdbcTemplate.execute(updatel);
+        RedisTemplate.delete("taskIdxx-" + ndid);
+    }
+
+}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov