增加app任务详情查看时间和查看位置
修复用户不按部门过滤的问题
| | |
| | | package com.ruoyi.app.task.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.app.taskdetail.domain.ArdAppTaskDetailPic; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | /** app任务详情图片信息 */ |
| | | private List<ArdAppTaskDetailPic> ardAppTaskDetailPic; |
| | | /** 首次查看时间 */ |
| | | @Excel(name = "首次查看时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date viewTime; |
| | | /** 首次查看位置 */ |
| | | @Excel(name = "首次查看位置") |
| | | private String viewPosition; |
| | | |
| | | public Date getViewTime() { |
| | | return viewTime; |
| | | } |
| | | |
| | | public void setViewTime(Date viewTime) { |
| | | this.viewTime = viewTime; |
| | | } |
| | | |
| | | public String getViewPosition() { |
| | | return viewPosition; |
| | | } |
| | | |
| | | public void setViewPosition(String viewPosition) { |
| | | this.viewPosition = viewPosition; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | |
| | | * @return app任务管理 |
| | | */ |
| | | public ArdAppTask selectArdAppTaskById(String id); |
| | | public ArdAppTask selectArdAppTaskByIdWithPic(String id); |
| | | public ArdAppTask selectArdAppTaskByIdWithDetail(String id); |
| | | /** |
| | | * 通过任务详情ID查询任务详情 |
| | | * |
| | | * @param id app任务详情主键 |
| | | * @return app任务详情 |
| | | */ |
| | | public ArdAppTaskDetail selectArdAppTaskDetailById(String id); |
| | | /** |
| | | * 查询app任务管理列表 |
| | |
| | | <result property="taskId" column="sub1_task_id"/> |
| | | <result property="status" column="sub1_status"/> |
| | | <result property="clockInPicUrl" column="sub1_clock_in_pic_url"/> |
| | | <result property="viewTime" column="sub1_view_time"/> |
| | | <result property="viewPosition" column="sub1_view_position"/> |
| | | </resultMap> |
| | | <resultMap type="ArdAppTaskPic" id="ArdAppTaskPicResult"> |
| | | <result property="id" column="sub2_id"/> |
| | |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | | </sql> |
| | | |
| | | <sql id="selectArdAppTaskDto"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice, |
| | | c.status as sub1_status, |
| | | c.clock_in_pic_url as sub1_clock_in_pic_url, |
| | | c.view_time as sub1_view_time, |
| | | c.view_position as sub1_view_position |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | </sql> |
| | | <select id="selectArdAppTaskList" parameterType="ArdAppTask" resultMap="ArdAppTaskResult"> |
| | | <include refid="selectArdAppTaskVo"/> |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | <select id="selectArdAppTaskListWithDetail" parameterType="ArdAppTask" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice, |
| | | c.status as sub1_status, |
| | | c.clock_in_pic_url as sub1_clock_in_pic_url |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | <include refid="selectArdAppTaskDto"/> |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and c.user_id = #{userId} |
| | |
| | | </where> |
| | | </select> |
| | | <select id="selectArdAppTaskListWithDetailById" parameterType="ArdAppTask" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice, |
| | | c.status as sub1_status, |
| | | c.clock_in_pic_url as sub1_clock_in_pic_url |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | <include refid="selectArdAppTaskDto"/> |
| | | <where> |
| | | <if test="id != null and id != ''"> |
| | | and a.id = #{id} |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskById" parameterType="String" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | where a.id = #{id} |
| | | </select> |
| | | <select id="selectArdAppTaskByIdWithPic" parameterType="String" resultMap="ArdAppTaskArdAppTaskPicResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | where a.id = #{id} |
| | | </select> |
| | | <select id="selectArdAppTaskByIdWithDetail" parameterType="String" resultMap="ArdAppTaskArdAppTaskDetailResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice, |
| | | c.status as sub1_status, |
| | | c.clock_in_pic_url as sub1_clock_in_pic_url |
| | | from ard_app_task a |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | <include refid="selectArdAppTaskDto"/> |
| | | where a.id = #{id} |
| | | </select> |
| | | |
| | |
| | | <if test="clockInPicUrl != null">clock_in_pic_url = #{clockInPicUrl},</if> |
| | | <if test="text != null">text = #{text},</if> |
| | | <if test="voice != null">voice = #{voice},</if> |
| | | <if test="viewTime != null">view_time = #{viewTime},</if> |
| | | <if test="viewPosition != null">view_position = #{vviewPosition},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | c.voice, |
| | | c.status, |
| | | c.clock_in_pic_url |
| | | c.view_time, |
| | | c.view_position |
| | | from ard_app_task_detail c |
| | | where c.id = #{id} |
| | | </select> |
| | |
| | | AND u.create_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD') |
| | | </if> |
| | | <if test="appUserType!=null and appUserType!=''"> AND u.app_user_type = #{appUserType}</if> |
| | | <if test="deptId != null ">and (d.dept_id = #{deptId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </select> |