| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="legacySynced" column="legacy_synced" /> |
| | | <result property="creatorName" column="creator_name" /> |
| | | <result property="assigneeName" column="assignee_name" /> |
| | | <result property="deptName" column="dept_name" /> |
| | |
| | | t.destination_longitude, t.destination_latitude, t.estimated_distance, |
| | | 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.create_time, t.update_time, t.create_by, t.update_by, t.remark, t.del_flag, t.legacy_synced, |
| | | u1.nick_name as creator_name, u2.nick_name as assignee_name, d.dept_name, |
| | | tv.id as tv_id, tv.task_id as tv_task_id, tv.vehicle_id as tv_vehicle_id, |
| | | v.vehicle_no as tv_vehicle_no, v.vehicle_type as tv_vehicle_type, |
| | |
| | | <select id="selectMaxTaskCodeByDatePrefix" parameterType="String" resultType="String"> |
| | | select max(task_code) |
| | | from sys_task |
| | | where task_code like concat(#{datePrefix}, '%') and del_flag = '0' |
| | | where task_code like concat(#{datePrefix}, '%') |
| | | </select> |
| | | |
| | | <select id="selectOverdueTasks" resultMap="SysTaskResult"> |
| | |
| | | <if test="creatorId != null">creator_id,</if> |
| | | <if test="assigneeId != null">assignee_id,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="plannedStartTime!=null">planned_start_time,</if> |
| | | <if test="plannedEndTime!=null">planned_end_time,</if> |
| | | <if test="plannedStartTime!=null">planned_start_time,</if> |
| | | <if test="plannedEndTime!=null">planned_end_time,</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="plannedStartTime!=null">#{plannedStartTime},</if> |
| | | <if test="plannedEndTime!=null">#{plannedEndTime},</if> |
| | | <if test="actualStartTime!=null">#{actualStartTime},</if> |
| | | <if test="actualEndTime!=null">#{actualEndTime},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | now(), |
| | | <if test="createBy != null">#{createBy},</if> |
| | |
| | | where task_id = #{taskId} |
| | | </update> |
| | | |
| | | <select id="selectActiveTasksByVehicleId" parameterType="Long" resultMap="SysTaskResult"> |
| | | select t.task_id, t.task_code, t.task_type, t.task_status, t.task_description, |
| | | t.departure_address, t.destination_address, |
| | | t.planned_start_time, t.actual_start_time, |
| | | t.create_time, t.update_time |
| | | from sys_task t |
| | | inner join sys_task_vehicle tv on t.task_id = tv.task_id |
| | | where tv.vehicle_id = #{vehicleId} |
| | | and t.del_flag = '0' |
| | | and t.task_status not in ('PENDING', 'COMPLETED', 'CANCELLED') |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <delete id="deleteSysTaskByTaskId" parameterType="Long"> |
| | | update sys_task set del_flag = '2', update_time = now() where task_id = #{taskId} |
| | | </delete> |