wlzboy
2025-12-06 847a7773ef1a8ad418c6934d35b5f205a97c04d0
ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -83,7 +83,7 @@
               s.non_task_mileage, s.task_ratio, s.gps_point_count, s.task_count, s.segment_count, 
               s.data_source, s.create_time, s.update_time
        from tb_vehicle_mileage_stats s
        where s.vehicle_id = #{vehicleId} and s.stat_date = #{statDate}
        where s.vehicle_id = #{vehicleId} and DATE(s.stat_date) = DATE(#{statDate})
        limit 1
    </select>
@@ -130,6 +130,17 @@
            <if test="dataSource != null">#{dataSource},</if>
            NOW()
         </trim>
        ON DUPLICATE KEY UPDATE
            vehicle_no = VALUES(vehicle_no),
            total_mileage = VALUES(total_mileage),
            task_mileage = VALUES(task_mileage),
            non_task_mileage = VALUES(non_task_mileage),
            task_ratio = VALUES(task_ratio),
            gps_point_count = VALUES(gps_point_count),
            task_count = VALUES(task_count),
            segment_count = VALUES(segment_count),
            data_source = VALUES(data_source),
            update_time = NOW()
    </insert>
    <update id="updateVehicleMileageStats" parameterType="VehicleMileageStats">