From a80b4a7eb099390bb53c967126fa97b30568e1a3 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期二, 01 四月 2025 10:01:38 +0800
Subject: [PATCH] 修改
---
src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml b/src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml
index e9c7928..dee1b77 100644
--- a/src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml
+++ b/src/main/resources/mapper/progressTrack/DjJdgzTrackRecordDao.xml
@@ -6,10 +6,14 @@
UPDATE dj_jdgz_track_record
SET CURRENT_STATUS = 0
WHERE LEVEL3_NETWORK_ID = (
- SELECT LEVEL3_NETWORK_ID FROM dj_jdgz_track_record WHERE id = ${id}
+ SELECT LEVEL3_NETWORK_ID
+ FROM dj_jdgz_track_record
+ WHERE id = ${id}
)
AND create_date >= (
- SELECT create_date FROM dj_jdgz_track_record WHERE id = ${id}
+ SELECT create_date
+ FROM dj_jdgz_track_record
+ WHERE id = ${id}
);
</update>
@@ -88,7 +92,7 @@
and c.TEAMGROUP_ID = ${teamId}
</if>
<if test="cabinId!=null">
- and c.cabin_id LIKE '%${cabinId}%'
+ and c.cabin_id = ${cabinId}
</if>
<if test="type!=null and type!=''">
and c.type = #{type}
@@ -109,10 +113,10 @@
</select>
<select id="getHistory" resultType="com.example.server.progressTrack.model.DjJdgzTrackRecord">
select GENERAL_REPAIR_UNIT || ',' || GENERAL_REPAIR_UNIT_DIRECTOR || ',' ||
- GENERAL_REPAIR_UNIT_CONTACT AS generalRepair,
- REPAIR_UNIT || ',' || REPAIR_UNIT_DIRECTOR || ',' || REPAIR_UNIT_CONTACT AS `repair`,
- track_person || ',' || track_person_unit || ',' || track_person_contact AS trackPerson,
- tracked_person || ',' || tracked_person_unit || ',' || tracked_person_contact AS trackedPerson,
+ GENERAL_REPAIR_UNIT_CONTACT AS generalRepair,
+ REPAIR_UNIT || ',' || REPAIR_UNIT_DIRECTOR || ',' || REPAIR_UNIT_CONTACT AS `repair`,
+ track_person || ',' || track_person_unit || ',' || track_person_contact AS trackPerson,
+ tracked_person || ',' || tracked_person_unit || ',' || tracked_person_contact AS trackedPerson,
track_method,
track_location,
CURRENT_STATUS,
@@ -196,7 +200,7 @@
dj_jdgz_track_record where is_delete = 0 )
and a.is_delete = 0
<if test="userId!=null">
- AND a.TEAMGROUP_ID in (select teamgroup from sys_user where is_delete=0 and user_id=#{userId})
+ AND a.TEAMGROUP_ID in (select teamgroup from sys_user where is_delete=0 and id=#{userId})
</if>
AND b.IS_DELETE = 0
AND c.IS_DELETE = 0
@@ -451,5 +455,38 @@
ORDER BY
a.REQUIRED_COMPLETION_TIME
</select>
+ <select id="getReportRecord" resultType="com.example.server.progressTrack.Dto.ReportRecordDto">
+ select a.NAME,b.PROCESS_NAME
+ from dj_jdgz_network_level3 a,
+ dj_jdgz_network_level3_list b,
+ dj_jdgz_network_level1 c
+ where a.IS_DELETE = 0
+ and a.LEVEL1_NETWORK_ID = ${level1NetworkId}
+ and a.TEAMGROUP_ID = ${teamgroupId}
+ and a.LEVEL1_NETWORK_ID = c.id
+ and b.IS_DELETE = 0
+ and b.NETWORK_ID = a.id
+ and c.IS_DELETE = 0
+ <if test="column==2">
+ and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null)
+ and b.REQUIRED_COMPLETION_TIME >= ( SELECT date( 'now', '-' || c.advent_day || ' days' ) )
+ </if>
+ <if test="column==3">
+ and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null)
+ and b.REQUIRED_COMPLETION_TIME < ( SELECT date( 'now', '-' || c.advent_day || ' days' ) )
+ </if>
+ <if test="column==4">
+ and (b.CURRENT_STATUS = 0 or b.CURRENT_STATUS is null)
+ and b.REQUIRED_COMPLETION_TIME < ( SELECT datetime( 'now' ) )
+ </if>
+ <if test="column==5">
+ and b.CURRENT_STATUS = 1
+ AND b.REQUIRED_COMPLETION_TIME <= b.ACTUAL_COMPLETION
+ </if>
+ <if test="column==6">
+ and b.CURRENT_STATUS = 1
+ AND b.REQUIRED_COMPLETION_TIME > b.ACTUAL_COMPLETION
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.1