|
@@ -61,19 +61,35 @@
|
|
|
AND ev.is_deleted = 0
|
|
|
WHERE ej.job_status = 'ARCHIVED'
|
|
|
AND ej.is_deleted = '0'
|
|
|
- AND ev.enfore_job_id IS NULL
|
|
|
and (
|
|
|
- <trim prefixOverrides="or">
|
|
|
- <if test="pm.startDate1 != null and pm.startDate1 != ''">
|
|
|
- or ( ej.finish_time BETWEEN #{pm.startDate1} AND #{pm.endDate1} and ev.create_time <![CDATA[ > ]]> '2024-12-23 00:00:00' and ej.enforce_result = 'PASS')
|
|
|
- </if>
|
|
|
- <if test="pm.startDate2 != null and pm.startDate2 != ''">
|
|
|
- or ( ej.finish_time BETWEEN #{pm.startDate2} AND #{pm.endDate2} and ev.create_time<![CDATA[ > ]]> '2024-12-28 00:00:00' and ej.enforce_result = 'PASS')
|
|
|
- </if>
|
|
|
- <if test="pm.endDate3 != null and pm.endDate3 != ''">
|
|
|
- or ( ej.finish_time BETWEEN '2024-12-18 00:00:00' AND #{pm.endDate3} and ev.create_time <![CDATA[ > ]]> DATE_ADD(ej.finish_time, INTERVAL 10 DAY) )
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
+ case when ev.enfore_job_id is not null then(
|
|
|
+ <trim prefixOverrides="or">
|
|
|
+ <if test="pm.startDate1 != null and pm.startDate1 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN #{pm.startDate1} AND #{pm.endDate1} and ev.create_time <![CDATA[ > ]]> '2024-12-23 00:00:00' and ej.enforce_result in ('PASS','NOT_PASS'))
|
|
|
+ </if>
|
|
|
+ <if test="pm.startDate2 != null and pm.startDate2 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN #{pm.startDate2} AND #{pm.endDate2} and ev.create_time<![CDATA[ > ]]> '2024-12-28 00:00:00' and ej.enforce_result in ('PASS','NOT_PASS'))
|
|
|
+ </if>
|
|
|
+ <if test="pm.endDate3 != null and pm.endDate3 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN '2024-12-18 00:00:00' AND #{pm.endDate3} and ev.create_time <![CDATA[ > ]]> DATE_ADD(ej.finish_time, INTERVAL 10 DAY) )
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ )
|
|
|
+ else
|
|
|
+ (
|
|
|
+ <trim prefixOverrides="or">
|
|
|
+ <if test="pm.startDate1 != null and pm.startDate1 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN #{pm.startDate1} AND #{pm.endDate1} and sysdate() <![CDATA[ > ]]> '2024-12-23 00:00:00' and ej.enforce_result in ('PASS','NOT_PASS'))
|
|
|
+ </if>
|
|
|
+ <if test="pm.startDate2 != null and pm.startDate2 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN #{pm.startDate2} AND #{pm.endDate2} and sysdate()<![CDATA[ > ]]> '2024-12-28 00:00:00' and ej.enforce_result in ('PASS','NOT_PASS'))
|
|
|
+ </if>
|
|
|
+ <if test="pm.endDate3 != null and pm.endDate3 != ''">
|
|
|
+ or ( ej.finish_time BETWEEN '2024-12-18 00:00:00' AND #{pm.endDate3} and sysdate() <![CDATA[ > ]]> DATE_ADD(ej.finish_time, INTERVAL 10 DAY) )
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ )
|
|
|
+ end
|
|
|
)
|
|
|
GROUP BY
|
|
|
ej.enforce_org_id
|