|
|
@@ -85,7 +85,8 @@
|
|
|
AND aco.appointment_date BETWEEN #{reqVO.appointmentDate[0]} AND #{reqVO.appointmentDate[1]}
|
|
|
</if>
|
|
|
<if test="reqVO.warningDay != null and reqVO.warningDay.length >= 2">
|
|
|
- AND (CASE WHEN aco.appointment_date - aco.warning_date > 0 THEN aco.appointment_date - aco.warning_date ELSE 0 END) BETWEEN #{reqVO.warningDay[0]} AND #{reqVO.warningDay[1]}
|
|
|
+ AND aco.warning_date IS NOT NULL
|
|
|
+ AND GREATEST(TRUNC(aco.warning_date) - TRUNC(SYSDATE), 0) BETWEEN #{reqVO.warningDay[0]} AND #{reqVO.warningDay[1]}
|
|
|
</if>
|
|
|
<if test="reqVO.unitContact != null and reqVO.unitContact != ''">AND aco.unit_contact = #{reqVO.unitContact}</if>
|
|
|
<if test="reqVO.unitPhone != null and reqVO.unitPhone != ''">AND aco.unit_phone = #{reqVO.unitPhone}</if>
|
|
|
@@ -162,7 +163,8 @@
|
|
|
AND aco.appointment_date BETWEEN #{reqVO.appointmentDate[0]} AND #{reqVO.appointmentDate[1]}
|
|
|
</if>
|
|
|
<if test="reqVO.warningDay != null and reqVO.warningDay.length >= 2">
|
|
|
- AND (CASE WHEN aco.appointment_date - aco.warning_date > 0 THEN aco.appointment_date - aco.warning_date ELSE 0 END) BETWEEN #{reqVO.warningDay[0]} AND #{reqVO.warningDay[1]}
|
|
|
+ AND aco.warning_date IS NOT NULL
|
|
|
+ AND GREATEST(TRUNC(aco.warning_date) - TRUNC(SYSDATE), 0) BETWEEN #{reqVO.warningDay[0]} AND #{reqVO.warningDay[1]}
|
|
|
</if>
|
|
|
<if test="reqVO.unitContact != null and reqVO.unitContact != ''">AND aco.unit_contact = #{reqVO.unitContact}</if>
|
|
|
<if test="reqVO.unitPhone != null and reqVO.unitPhone != ''">AND aco.unit_phone = #{reqVO.unitPhone}</if>
|