Sfoglia il codice sorgente

Merge branch 'test-merge' of http://219.151.181.73:3000/zhuwei/bladex into test-merge

lvy 1 mese fa
parent
commit
d2ce515d39
23 ha cambiato i file con 1414 aggiunte e 130 eliminazioni
  1. 2 0
      blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java
  2. 53 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO.java
  3. 11 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO1.java
  4. 79 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO.java
  5. 48 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO1.java
  6. 69 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialClassificationTree.java
  7. 101 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSystemDocking.java
  8. 50 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialClassificationTreeVO.java
  9. 84 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSystemDockingVO.java
  10. 3 3
      blade-service/blade-business/src/main/java/org/springblade/business/controller/NeiYeController.java
  11. 207 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialClassificationTreeController.java
  12. 166 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialSystemDockingController.java
  13. 50 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.java
  14. 45 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialClassificationTreeMapper.xml
  15. 43 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.java
  16. 37 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSystemDockingMapper.xml
  17. 54 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialClassificationTreeService.java
  18. 50 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialSystemDockingService.java
  19. 70 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialClassificationTreeServiceImpl.java
  20. 164 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSystemDockingServiceImpl.java
  21. 9 0
      blade-service/blade-business/src/main/java/org/springblade/business/utils/FileUtils.java
  22. 1 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml
  23. 18 127
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsSynchronousServiceImpl.java

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

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

+ 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;
+}

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

@@ -0,0 +1,79 @@
+/*
+ *      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
+	 */
+	@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;
+
+}

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

@@ -0,0 +1,101 @@
+/*
+ *      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 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;
+
+}

+ 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;
+
+}

+ 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;
+
+
+}

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

@@ -130,7 +130,7 @@ public class NeiYeController {
                 queryVO.setSelectType(2);
             }
             //有些填报节点的MajorDataType为0
-            if (queryVO.getSelectType() == 1) {
+            if (queryVO.getSelectType() != null && queryVO.getSelectType() == 1) {
                 //非填报节点
                 if (node.getParentId() == 0) {
                     queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractIdTwo("", contractType, contractId, queryVO.getDateIsComplete());
@@ -611,7 +611,7 @@ public class NeiYeController {
 
 
     /**
-     * 导出行政区划数据
+     * 导出业内台账
      */
     @PostMapping("export")
     @ApiOperationSupport(order = 11)
@@ -623,7 +623,7 @@ public class NeiYeController {
         //获取数据
         if(iPageR.isSuccess()){
             List<NeiYeLedgerVO> list = iPageR.getData().getRecords();
-            ExcelUtil.export(response, "内台账" + org.springblade.core.tool.utils.DateUtil.time(), "行政区划数据表", list, NeiYeLedgerVO.class);
+            ExcelUtil.export(response, "内台账" + org.springblade.core.tool.utils.DateUtil.time(), "行政区划数据表", list, NeiYeLedgerVO.class);
         }
     }
 }

+ 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);
+	}
+}

+ 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, String> map = list1.stream().collect(Collectors.toMap(TrialSystemDocking::getId, TrialSystemDocking::getReportName));
+		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);
+	}
+
+}

+ 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>

+ 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>

+ 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);
+}

+ 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);
+	}
+
+
+}

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

@@ -0,0 +1,164 @@
+/*
+ *      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.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;
+
+	@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) {
+		if (longList != null && !longList.isEmpty()) {
+			this.update(new UpdateWrapper<TrialSystemDocking>()
+					.set("is_deleted", 1)
+					.in("id", longList));
+		}
+	}
+
+	@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;
+		}
+	}
+
+}

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

@@ -649,4 +649,13 @@ public class FileUtils {
 
         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());
+        }
+    }
 }

+ 1 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreePrivateMapper.xml

@@ -210,6 +210,7 @@
             is_concrete        = #{wbsTP.isConcrete},
             is_expernode       = #{wbsTP.isExpernode},
             is_add_conceal     = #{wbsTP.isAddConceal},
+            table_file_type     = #{wbsTP.tableFileType},
             status             = 1,
             is_deleted         = 0
             <if test="wbsTP.className!=null and wbsTP.className!=''">

+ 18 - 127
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsSynchronousServiceImpl.java

@@ -522,6 +522,8 @@ public class WbsSynchronousServiceImpl {
                             editData.addAll(addPrivateNodes);
                             editData.addAll(editPrivateNodes);
                             wbsSynchronousEViSaService.saveFormula(wbsTreeSynchronousRecord, editData);
+                            //现在电签使用的是模糊匹配 如果电签匹配方式改为精确匹配 则需要使用该功能
+                            updateEViSa(collect, wbsTreeSynchronousRecord.getTemplateId(), projectInfo.getId(), templateNodes, editPrivateNodes);
                             //排序
                         case 7:
                             //元素配置
@@ -531,8 +533,6 @@ public class WbsSynchronousServiceImpl {
                         case 4:
                             //默认值  如果有数据 与节点绑定
                         case 6:
-                            //现在电签使用的是模糊匹配 如果电签匹配方式改为精确匹配 则需要使用该功能
-//                            updateEViSa(collect, wbsTreeSynchronousRecord.getTemplateId(), projectInfo.getId(), templateNodes, editPrivateNodes);
                             break;
                         default:
                             break;
@@ -1183,8 +1183,6 @@ public class WbsSynchronousServiceImpl {
 
             //模板的主键ids
             List<Long> tempPKeyIds = new ArrayList<>();
-            List<Long> editPKeyIds = new ArrayList<>();
-
 
             for (WbsTreePrivate tempPrivate : treePrivates) {
                 for (WbsTreePrivate editPrivate : editPrivateNodes) {
@@ -1205,9 +1203,8 @@ public class WbsSynchronousServiceImpl {
                     .eq(TextdictInfo::getProjectId, templateId)
                     .eq(TextdictInfo::getIsDeleted, 0)
                     .in(TextdictInfo::getTabId, tempPKeyIds)
-                    .in(TextdictInfo::getType, 4));
-            //当前值同步默认值
-//                    .in(TextdictInfo::getType, 2, 4, 6));
+                    //当前值同步默认值
+                    .in(TextdictInfo::getType, 2, 4, 6));
             if (CollectionUtil.isEmpty(tempTextDictInfo)) {
                 throw new ServiceException("源数据无电签及默认值配置");
             }
@@ -1216,27 +1213,23 @@ public class WbsSynchronousServiceImpl {
 
             List<TextdictInfo> tempViSa = new ArrayList<>();
             //电签
-            if (collect.contains(3)) {
-                //个人电签
-                List<TextdictInfo> tempMyViSa = tempTextDictInfoMap.get(2);
-                if (CollectionUtil.isNotEmpty(tempMyViSa)) {
-                    tempViSa.addAll(tempMyViSa);
-
-                }
-                //企业电签
-                List<TextdictInfo> tempEnterViSa = tempTextDictInfoMap.get(6);
-                if (CollectionUtil.isNotEmpty(tempEnterViSa)) {
-                    tempViSa.addAll(tempEnterViSa);
-                }
+            List<TextdictInfo> tempMyViSa = tempTextDictInfoMap.get(2);
+            if (CollectionUtil.isNotEmpty(tempMyViSa)) {
+                tempViSa.addAll(tempMyViSa);
 
             }
-            //默认值
-            if (collect.contains(5)) {
-                List<TextdictInfo> tempDefault = tempTextDictInfoMap.get(4);
-                if (CollectionUtil.isNotEmpty(tempDefault)) {
-                    tempViSa.addAll(tempDefault);
-                }
+            //企业电签
+            List<TextdictInfo> tempEnterViSa = tempTextDictInfoMap.get(6);
+            if (CollectionUtil.isNotEmpty(tempEnterViSa)) {
+                tempViSa.addAll(tempEnterViSa);
             }
+            //默认值
+//            if (collect.contains(5)) {
+//                List<TextdictInfo> tempDefault = tempTextDictInfoMap.get(4);
+//                if (CollectionUtil.isNotEmpty(tempDefault)) {
+//                    tempViSa.addAll(tempDefault);
+//                }
+//            }
 
 
             List<TextdictInfo> addData = new ArrayList<>();
@@ -1270,108 +1263,6 @@ public class WbsSynchronousServiceImpl {
     }
 
 
-    /**
-     * 20250414-lhb-新增
-     * 创建祖级路径
-     * <p>
-     * 该方法用于构建给定节点的祖先路径标识符(PId)字符串
-     * 它通过追溯节点的父节点,直到达到根节点或满足特定条件为止
-     *
-     * @param node    WbsTreeContract类型的节点,表示需要构建路径的起始节点
-     * @param nodeMap 一个映射,其键为节点ID,值为WbsTreeContract类型的节点对象,用于快速查找节点
-     * @return 返回一个字符串,表示构建的祖先路径标识符序列,以逗号分隔
-     */
-    private String createAncestorsPId(WbsTreePrivate node, Map<Long, WbsTreePrivate> nodeMap) {
-        // 初始化路径列表,用于存储祖先节点的ID
-        List<Long> path = new ArrayList<>();
-        // 从给定的节点开始
-        WbsTreePrivate current = node;
-        // 初始化访问集合,用于检测循环引用
-        Set<Long> visited = new HashSet<>();
-
-        while (true) {
-            // 检查当前节点是否为根节点或无效节点
-            if (current == null || current.getPId() == null ||
-                    current.getPId() == 0 || current.getPId().equals(current.getPKeyId())) {
-                break;
-            }
-
-            // 检测循环引用
-            if (visited.contains(current.getPId())) {
-                break;
-            }
-            // 将当前节点的ID添加到已访问集合中
-            visited.add(current.getPKeyId());
-
-            // 从映射中获取当前节点的父节点
-            current = nodeMap.get(current.getPId());
-            // 如果父节点存在,则将其ID添加到路径列表的开头
-            if (current != null) {
-                path.add(0, current.getPKeyId());
-            }
-
-            // 安全限制,防止路径过长导致性能问题
-            if (path.size() > 50) {
-                break;
-            }
-        }
-        // 将根节点ID(0)添加到路径的最前面,表示路径的起点
-        path.add(0, 0L);
-        // 将路径列表转换为字符串并返回
-        return String.join(",", path.stream().map(String::valueOf).toArray(String[]::new));
-    }
-
-    /**
-     * 20250414-lhb-新增
-     * 创建祖级路径
-     * <p>
-     * 该方法用于构建给定节点的祖先路径标识符(PId)字符串
-     * 它通过追溯节点的父节点,直到达到根节点或满足特定条件为止
-     *
-     * @param node    WbsTreeContract类型的节点,表示需要构建路径的起始节点
-     * @param nodeMap 一个映射,其键为节点ID,值为WbsTreeContract类型的节点对象,用于快速查找节点
-     * @return 返回一个字符串,表示构建的祖先路径标识符序列,以逗号分隔
-     */
-    private String createAncestorsPId(WbsTreeContract node, Map<Long, WbsTreeContract> nodeMap) {
-        // 初始化路径列表,用于存储祖先节点的ID
-        List<Long> path = new ArrayList<>();
-        // 从给定的节点开始
-        WbsTreeContract current = node;
-        // 初始化访问集合,用于检测循环引用
-        Set<Long> visited = new HashSet<>();
-
-        while (true) {
-            // 检查当前节点是否为根节点或无效节点
-            if (current == null || current.getPId() == null ||
-                    current.getPId() == 0 || current.getPId().equals(current.getPKeyId())) {
-                break;
-            }
-
-            // 检测循环引用
-            if (visited.contains(current.getPId())) {
-                break;
-            }
-            // 将当前节点的ID添加到已访问集合中
-            visited.add(current.getPKeyId());
-
-            // 从映射中获取当前节点的父节点
-            current = nodeMap.get(current.getPId());
-            // 如果父节点存在,则将其ID添加到路径列表的开头
-            if (current != null) {
-                path.add(0, current.getPKeyId());
-            }
-
-            // 安全限制,防止路径过长导致性能问题
-            if (path.size() > 50) {
-                break;
-            }
-        }
-        // 将根节点ID(0)添加到路径的最前面,表示路径的起点
-        path.add(0, 0L);
-        // 将路径列表转换为字符串并返回
-        return String.join(",", path.stream().map(String::valueOf).toArray(String[]::new));
-    }
-
 
     /**
      * 获取指定节点的所有最新节点