| | |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | 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.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitde, |
| | | c.latitude as sub1_latitude, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | |
| | | 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 c.user_id = #{userId} |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and a.create_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and a.create_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and c.user_id = #{userId} |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and a.create_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and a.create_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | </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 |
| | | <where> |
| | | <if test="userId != null and userId != ''"> |
| | | and c.user_id = #{userId} |
| | | </if> |
| | | <if test="id != null and id != ''"> |
| | | and c.id = #{id} |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and a.create_time >= to_timestamp(#{params.beginTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and a.create_time <= to_timestamp(#{params.endTime},'yyyy-MM-DD HH24:MI:ss') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="selectArdAppTaskById" parameterType="String" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | |
| | | 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, |
| | | 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_latitde, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice |
| | | 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 |
| | |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub_id, |
| | | b.task_id as sub_task_id, |
| | | b.pic_url as sub_pic_url |
| | | 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} |
| | |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | c.id as sub_id, |
| | | c.name as sub_name, |
| | | c.longitude as sub_longitude, |
| | | c.latitude as sub_latitde, |
| | | c.altitude as sub_altitude, |
| | | c.user_id as sub_user_id, |
| | | c.text as sub_text, |
| | | c.voice as sub_voice, |
| | | c.status as sub_status, |
| | | c.clock_in_pic_url as sub_clock_in_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_detail c on c.task_id = a.id |
| | | where a.id = #{id} |
| | |
| | | </delete> |
| | | |
| | | <insert id="batchArdAppTaskDetail"> |
| | | insert into ard_app_task_detail( id, name, longitude, latitude, altitude, user_id, text, voice, task_id,status,clock_in_pic_url) values |
| | | insert into ard_app_task_detail( id, name, longitude, latitude, altitude, user_id, text, voice, |
| | | task_id,status,clock_in_pic_url) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.id}, #{item.name}, #{item.longitude}, #{item.latitude}, #{item.altitude}, #{item.userId}, |
| | | #{item.text}, #{item.voice}, #{item.taskId}, #{item.status}, #{item.clockInPicUrl}) |
| | |
| | | where task_detail_id = #{taskDetailId} |
| | | </delete> |
| | | <select id="selectArdAppTaskDetailById" parameterType="String" resultType="ArdAppTaskDetail"> |
| | | select |
| | | c.id, |
| | | select c.id, |
| | | c.name, |
| | | c.longitude, |
| | | c.latitude, |