From 656d6f8029f8bf9b2daa9dcc89101a879a70b860 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期三, 03 十二月 2025 23:10:05 +0800
Subject: [PATCH] feat:优先添加执行人
---
ruoyi-system/src/main/resources/mapper/system/SysTaskAttachmentMapper.xml | 40 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysTaskAttachmentMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysTaskAttachmentMapper.xml
index 49220e7..c017f7b 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysTaskAttachmentMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysTaskAttachmentMapper.xml
@@ -14,10 +14,13 @@
<result property="attachmentCategory" column="attachment_category" />
<result property="uploadTime" column="upload_time" />
<result property="uploadBy" column="upload_by" />
+ <result property="syncedToImageData" column="synced_to_image_data" />
+ <result property="syncTime" column="sync_time" />
+ <result property="imageDataId" column="image_data_id" />
</resultMap>
<sql id="selectSysTaskAttachmentVo">
- select attachment_id, task_id, file_name, file_path, file_size, file_type, attachment_category, upload_time, upload_by
+ select attachment_id, task_id, file_name, file_path, file_size, file_type, attachment_category, upload_time, upload_by, synced_to_image_data, sync_time, image_data_id
from sys_task_attachment
</sql>
@@ -55,6 +58,9 @@
<if test="attachmentCategory != null and attachmentCategory != ''">attachment_category,</if>
<if test="uploadTime != null">upload_time,</if>
<if test="uploadBy != null and uploadBy != ''">upload_by,</if>
+ <if test="syncedToImageData != null">synced_to_image_data,</if>
+ <if test="syncTime != null">sync_time,</if>
+ <if test="imageDataId != null">image_data_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">#{taskId},</if>
@@ -65,6 +71,9 @@
<if test="attachmentCategory != null and attachmentCategory != ''">#{attachmentCategory},</if>
<if test="uploadTime != null">#{uploadTime},</if>
<if test="uploadBy != null and uploadBy != ''">#{uploadBy},</if>
+ <if test="syncedToImageData != null">#{syncedToImageData},</if>
+ <if test="syncTime != null">#{syncTime},</if>
+ <if test="imageDataId != null">#{imageDataId},</if>
</trim>
</insert>
@@ -79,6 +88,9 @@
<if test="attachmentCategory != null and attachmentCategory != ''">attachment_category = #{attachmentCategory},</if>
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="uploadBy != null and uploadBy != ''">upload_by = #{uploadBy},</if>
+ <if test="syncedToImageData != null">synced_to_image_data = #{syncedToImageData},</if>
+ <if test="syncTime != null">sync_time = #{syncTime},</if>
+ <if test="imageDataId != null">image_data_id = #{imageDataId},</if>
</trim>
where attachment_id = #{attachmentId}
</update>
@@ -97,4 +109,30 @@
<delete id="deleteSysTaskAttachmentByTaskId" parameterType="Long">
delete from sys_task_attachment where task_id = #{taskId}
</delete>
+
+ <!-- 鏌ヨ寰呭悓姝ョ殑浠诲姟闄勪欢鍒楄〃 -->
+ <select id="selectPendingSyncAttachments" resultMap="SysTaskAttachmentResult">
+ SELECT
+ a.attachment_id,
+ a.task_id,
+ a.file_name,
+ a.file_path,
+ a.file_size,
+ a.file_type,
+ a.attachment_category,
+ a.upload_time,
+ a.upload_by,
+ a.synced_to_image_data,
+ a.sync_time,
+ a.image_data_id
+ FROM sys_task_attachment a
+ INNER JOIN sys_task t ON a.task_id = t.task_id
+ INNER JOIN sys_task_emergency e ON t.task_id = e.task_id
+ WHERE t.task_type = 'EMERGENCY_TRANSFER'
+ AND e.dispatch_sync_status = 2
+ AND e.legacy_dispatch_ord_id IS NOT NULL
+ AND e.legacy_service_ord_id IS NOT NULL
+ AND (a.synced_to_image_data = 0 OR a.synced_to_image_data IS NULL)
+ ORDER BY a.upload_time ASC
+ </select>
</mapper>
--
Gitblit v1.9.1