wlzboy
5 天以前 fe33646ee6e2d1e57f2b51812e94983a0e9efb04
ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -88,16 +88,15 @@
    </select>
    <select id="selectTaskTimeIntervals" resultMap="TaskTimeIntervalResult">
        select tv.task_id, t.create_time as start_time,
        select tv.task_id, t.actual_start_time as start_time,
               IFNULL(t.actual_end_time, NOW()) as 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.create_time &lt; #{endTime}
          and t.actual_end_time &gt; #{startTime}
        order by t.create_time
          and (t.actual_start_time &lt;= #{endTime} and (t.actual_end_time is null or t.actual_end_time &gt;= #{startTime}))
        order by t.actual_start_time
    </select>
        
    <insert id="insertVehicleMileageStats" parameterType="VehicleMileageStats" useGeneratedKeys="true" keyProperty="statsId">