From ad935c07a6cabf05fed9c615c7bd4f67f6d65293 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 04 Jun 2026 23:37:33 +0800
Subject: [PATCH] feat(common): 添加通用列表类型处理器支持数据库存储

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java
index 2d1a8e3..c939bc2 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java
@@ -547,8 +547,8 @@
 		if (bladeFile == null || StringUtil.isBlank(bladeFile.getLink())) {
 			throw new RuntimeException("附件上传失败");
 		}
-		Integer resultType = parseResultType(taskEntity != null ? taskEntity.getPatrolTaskType() : null);
-		Attach attach = buildAttachInfo(taskEntity, reportFile, bladeFile, resultType, desiredName);
+		// Integer resultType = parseResultType(taskEntity != null ? taskEntity.getPatrolTaskType() : null);
+ 		Attach attach = buildAttachInfo(taskEntity, reportFile, bladeFile, taskEntity.getPatrolTaskType(), desiredName);
 		Boolean saved = attachClient.saveAttachInfo(attach);
 		if (!Boolean.TRUE.equals(saved)) {
 			log.error("附件信息保存失败,报告文件:" + desiredName);
@@ -567,7 +567,7 @@
 	 * @param desiredName 期望文件名
 	 * @return 附件信息
 	 */
-	private Attach buildAttachInfo(GdPatrolTaskEntity taskEntity, File reportFile, BladeFile bladeFile, Integer resultType, String desiredName) {
+	private Attach buildAttachInfo(GdPatrolTaskEntity taskEntity, File reportFile, BladeFile bladeFile, List<List<String>> resultType, String desiredName) {
 		Attach attach = new Attach();
 		attach.setDomainUrl(bladeFile.getDomain());
 		attach.setLink(bladeFile.getLink());
@@ -575,7 +575,7 @@
 		attach.setOriginalName(bladeFile.getOriginalName());
 		attach.setAttachSize(reportFile.length());
 		attach.setExtension(FileUtil.getFileExtension(reportFile.getName()));
-		attach.setResultType(resultType);
+		attach.setResultType(JSON.toJSONString(resultType));
 		attach.setPatrolTaskId(String.valueOf(taskEntity != null ? taskEntity.getId() : null));
 		Long createUser = taskEntity != null ? taskEntity.getCreateUser() : null;
 		Long updateUser = taskEntity != null ? taskEntity.getUpdateUser() : null;
@@ -660,9 +660,9 @@
 		} else if (StringUtil.isNotBlank(gdPatrolTaskVO.getTaskNo())) {
 			param.setName(gdPatrolTaskVO.getTaskNo());
 		}
-		if (StringUtil.isNotBlank(gdPatrolTaskVO.getPatrolTaskType())) {
-			param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
-		}
+		// if (StringUtil.isNotBlank(gdPatrolTaskVO.getPatrolTaskType())) {
+		// 	param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
+		// }
 		if ((gdPatrolTaskVO.getId() != null)) {
 			param.setPatrolTaskId(String.valueOf(gdPatrolTaskVO.getId()));
 		}
@@ -690,8 +690,8 @@
 		// 机构
 		param.setDeptId(gdPatrolTaskVO.getCreateDept());
 		// 巡检类型
-		// param.setInspectionTypeArr(gdPatrolTaskVO.getPatrolTaskType());
-		param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
+		param.setInspectionTypeArr(gdPatrolTaskVO.getPatrolTaskType());
+		// param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
 		// 机巢名称
 		param.setAirportName(gdPatrolTaskVO.getDeviceName());
 		param.setStatus("待执行");

--
Gitblit v1.9.3