| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, project_id, status, cleaner_id, location_id, patrol_inspector, implement_time, task_type, patrol_inspector_dept |
| | | id |
| | | , create_time, update_time, create_by, update_by, disabled, project_id, status, cleaner_id, location_id, patrol_inspector, implement_time, task_type, patrol_inspector_dept |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.LocationListTaskVO"> |
| | | <select id="pageList" 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 |
| | |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | <if test="query.startTime != null and query.startTime != ''"> |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | | <select id="taskProgress" resultType="com.ruoyi.system.vo.system.ProgressListVO"> |
| | | select t1.*,t2.nick_name as nickName,t2.phonenumber,t3.template_name as templateName,count(*) as num2, |
| | | SUM(CASE WHEN t1.status = 5 or t1.status=6 THEN 1 ELSE 0 END) AS num3 |
| | | |
| | | from t_task t1 |
| | | left join sys_user t2 on t1.user_id = t2.user_id |
| | | left join t_template t3 on t1.template_id = t3.id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.templateIds != null and query.templateIds.size()>0"> |
| | | AND t1.template_id IN |
| | | <foreach collection="query.templateIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.patrolInspectorIds != null and query.patrolInspectorIds.size()>0"> |
| | | AND t1.user_id IN |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | group by t1.user_id,t1.template_id |
| | | </select> |
| | | |
| | | </mapper> |