| | |
| | | FROM |
| | | t_mental_analysis_time_config tc |
| | | LEFT JOIN toc_customer u ON tc.counselling_info_id = u.customer_id |
| | | LEFT JOIN t_counselling_special_time_config stc ON stc.counselling_info_id = u.customer_id |
| | | <where> |
| | | AND u.status_flag = 1 |
| | | <if test="workStatus != null"> |
| | | AND u.work_status = #{workStatus} |
| | | </if> |
| | | <if test="mentalAnalysisStatus != null"> |
| | | AND u.mental_analysis_status = #{mentalAnalysisStatus} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="appointmentDay != null and appointmentDay != ''"> |
| | | AND u.customer_id NOT IN ( |
| | | SELECT counselling_info_id FROM t_counselling_special_time_config stc |
| | | SELECT counselling_info_id FROM t_mental_analysis_special_time_config stc |
| | | WHERE stc.special_day <![CDATA[ <> ]]> #{appointmentDay} AND stc.is_cancel_day = 1 |
| | | ) |
| | | </if> |