select c.id, c.type, c.name, c.text, c.voice, d.dept_id, u.user_id, c.create_by, c.create_time, c.update_by, c.update_time from ard_app_task c left join sys_dept d on d.dept_id = c.dept_id left join sys_user u on u.user_id = c.user_id select a.id, a.type, 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, c.clock_in_time as sub1_clock_in_time, c.view_flag as sub1_view_flag, c.task_id as sub1_task_id 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 insert into ard_app_task id, type, name, text, voice, dept_id, user_id, create_by, create_time, update_by, update_time, #{id}, #{type}, #{name}, #{text}, #{voice}, #{deptId}, #{userId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, update ard_app_task type = #{type}, name = #{name}, text = #{text}, voice = #{voice}, dept_id = #{deptId}, user_id = #{userId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, where id = #{id} delete from ard_app_task where id = #{id} delete from ard_app_task where id in #{id} delete from ard_app_task_pic where task_id in #{taskId} delete from ard_app_task_pic where task_id = #{taskId} insert into ard_app_task_pic( id, task_id, pic_url) values ( #{item.id}, #{item.taskId}, #{item.picUrl}) delete from ard_app_task_detail where task_id in #{taskId} delete from ard_app_task_detail where task_id = #{taskId} insert into ard_app_task_detail( id, name, longitude, latitude, altitude, user_id, text, voice, task_id,status,clock_in_pic_url) values ( #{item.id}, #{item.name}, #{item.longitude}, #{item.latitude}, #{item.altitude}, #{item.userId}, #{item.text}, #{item.voice}, #{item.taskId}, #{item.status}, #{item.clockInPicUrl}) update ard_app_task_detail status = #{status}, clock_in_pic_url = #{clockInPicUrl}, text = #{text}, voice = #{voice}, view_time = #{viewTime}, view_flag = #{viewFlag}, view_position = #{viewPosition}, clock_in_time = #{clockInTime}, task_id = #{taskId}, where id = #{id} update ard_app_task_detail view_flag = #{viewFlag}, where task_id = #{taskId} update ard_app_task_detail set view_time=#{viewTime}, view_position=#{viewPosition} where task_id = #{taskId} and user_id = #{userId} insert into ard_app_task_detail_pic( id, task_detail_id, pic_url) values ( #{item.id}, #{item.taskDetailId}, #{item.picUrl}) delete from ard_app_task_detail_pic where task_detail_id = #{taskDetailId}