|
@@ -137,9 +137,11 @@
|
|
<select id="getPushDingdingUserList" resultType="java.util.Map">
|
|
<select id="getPushDingdingUserList" resultType="java.util.Map">
|
|
SELECT a.company_id as companyId, a.dingding_userid as dingdingUserid
|
|
SELECT a.company_id as companyId, a.dingding_userid as dingdingUserid
|
|
FROM user AS a left join time_type on time_type.company_id = a.company_id
|
|
FROM user AS a left join time_type on time_type.company_id = a.company_id
|
|
|
|
+ left join company on a.company_id = company.id
|
|
WHERE a.dingding_userid is not null and time_type.alert_time = #{alertTime}
|
|
WHERE a.dingding_userid is not null and time_type.alert_time = #{alertTime}
|
|
AND a.is_active = 1
|
|
AND a.is_active = 1
|
|
AND a.report_status=0
|
|
AND a.report_status=0
|
|
|
|
+ AND company.expiration_date >= NOW()
|
|
AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND ((report.`create_date` = DATE_FORMAT(date_sub(NOW(),interval 1 day), '%Y-%m-%d') and time_type.alert_type=1)or(report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d') and time_type.alert_type=0)))
|
|
AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND ((report.`create_date` = DATE_FORMAT(date_sub(NOW(),interval 1 day), '%Y-%m-%d') and time_type.alert_type=1)or(report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d') and time_type.alert_type=0)))
|
|
<if test="date != null">
|
|
<if test="date != null">
|
|
and not exists (select 1 from leave_sheet where owner_id = a.id and start_date <= #{date} and end_date >= #{date} and leave_sheet.status = 0)
|
|
and not exists (select 1 from leave_sheet where owner_id = a.id and start_date <= #{date} and end_date >= #{date} and leave_sheet.status = 0)
|