| | |
| | | <result property="assigneeName" column="assignee_name" /> |
| | | <result property="deptName" column="dept_name" /> |
| | | <result property="vehicleNo" column="vehicle_no" /> |
| | | <result property="isHeadPush" column="is_head_push" /> |
| | | <collection property="assignedVehicles" ofType="SysTaskVehicle"> |
| | | <result property="id" column="tv_id" /> |
| | | <result property="taskId" column="tv_task_id" /> |
| | |
| | | t.planned_start_time, t.planned_end_time, |
| | | t.actual_start_time, t.actual_end_time, t.creator_id, t.assignee_id, t.dept_id, |
| | | t.create_time, t.update_time, t.create_by, t.update_by, t.remark, t.del_flag, t.legacy_synced, |
| | | t.is_head_push, |
| | | u1.nick_name as creator_name, u2.nick_name as assignee_name, d.dept_name, |
| | | ( |
| | | select v2.vehicle_no |
| | |
| | | |
| | | <select id="selectTaskByVehicleIdAndDate" resultMap="SysTaskResult"> |
| | | select tv.task_id, t.actual_start_time, |
| | | IFNULL(t.actual_end_time, NOW()) as t.actual_end_time |
| | | IFNULL(t.actual_end_time, NOW()) as actual_end_time |
| | | from sys_task_vehicle tv |
| | | inner join sys_task t on tv.task_id = t.task_id |
| | | where tv.vehicle_id = #{vehicleId} |
| | | and t.del_flag = '0' |
| | | and ( |
| | | (t.actual_end_time is not null and t.actual_start_time > #{startTime} and t.actual_end_time < #{endTime} ) |
| | | or (t.actual_end_time is null and t.actual_start_time > ${endTime} ) |
| | | (t.actual_start_time <= #{endTime} and (t.actual_end_time is null or t.actual_end_time >= #{startTime})) |
| | | ) |
| | | order by t.actual_start_time |
| | | </select> |
| | |
| | | <if test="creatorId != null">creator_id,</if> |
| | | <if test="assigneeId != null">assignee_id,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="isHeadPush != null">is_head_push,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | update_time, |
| | | <if test="createBy != null">create_by,</if> |
| | |
| | | <if test="creatorId != null">#{creatorId},</if> |
| | | <if test="assigneeId != null">#{assigneeId},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="isHeadPush != null">#{isHeadPush},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | now(), |
| | | <if test="createBy != null">#{createBy},</if> |
| | |
| | | <if test="actualEndTime != null">actual_end_time = #{actualEndTime},</if> |
| | | <if test="creatorId != null">creator_id = #{creatorId},</if> |
| | | <if test="assigneeId != null">assignee_id = #{assigneeId},</if> |
| | | |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="isHeadPush != null">is_head_push = #{isHeadPush},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |