| | |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | | <select id="exportList" resultType="com.ruoyi.system.vo.system.TaskListVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber |
| | | from t_task t1 |
| | | left join t_location t2 on t1.location_id = t2.id |
| | | left join t_location_type t3 on t2.location_type = t3.id |
| | | left join sys_user t4 on t1.patrol_inspector = t4.user_id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.patrolInspectorIds != null and query.patrolInspectorIds.size()>0"> |
| | | AND t4.user_id IN |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.taskIds != null and query.taskIds.size()>0"> |
| | | AND t1.id IN |
| | | <foreach collection="query.taskIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.locationIds != null and query.locationIds.size()>0"> |
| | | AND t1.location_id IN |
| | | <foreach collection="query.locationIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |