|
@@ -29,6 +29,7 @@
|
|
<result column="corpwx_userid" property="corpwxUserid" />
|
|
<result column="corpwx_userid" property="corpwxUserid" />
|
|
<result column="inactive_date" property="inactiveDate" />
|
|
<result column="inactive_date" property="inactiveDate" />
|
|
<result column="position" property="position" />
|
|
<result column="position" property="position" />
|
|
|
|
+ <result column="report_status" property="reportStatus" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<resultMap id="BaseResultMap2" type="com.management.platform.entity.User">
|
|
<resultMap id="BaseResultMap2" type="com.management.platform.entity.User">
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
@@ -38,7 +39,7 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, inactive_date, position
|
|
|
|
|
|
+ id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, inactive_date, position,report_status
|
|
</sql>
|
|
</sql>
|
|
<!--单独分页获取人员-->
|
|
<!--单独分页获取人员-->
|
|
<select id="getUserByDepartment" resultType="java.util.Map">
|
|
<select id="getUserByDepartment" resultType="java.util.Map">
|
|
@@ -91,7 +92,15 @@
|
|
WHERE a.company_id = #{companyId}
|
|
WHERE a.company_id = #{companyId}
|
|
AND (a.wx_openid IS NOT NULL or corpwx_userid is not null)
|
|
AND (a.wx_openid IS NOT NULL or corpwx_userid is not null)
|
|
AND a.is_active = 1
|
|
AND a.is_active = 1
|
|
- AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d'))
|
|
|
|
|
|
+ AND a.report_status =0
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="alertType!=null and alertType==1">
|
|
|
|
+ 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'))
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d'))
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@@ -100,7 +109,8 @@
|
|
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
|
|
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 NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d'))
|
|
|
|
|
|
+ AND a.report_status=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)))
|
|
order by a.company_id
|
|
order by a.company_id
|
|
</select>
|
|
</select>
|
|
<!--获取项目的参与人的推送id -->
|
|
<!--获取项目的参与人的推送id -->
|