From caf56217dc2bf898b63b0e1f31a7098202c32825 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 15 十一月 2025 16:50:17 +0800
Subject: [PATCH] Merge branch 'feature_gps'

---
 app/api/mileageStats.js |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/app/api/mileageStats.js b/app/api/mileageStats.js
index e69de29..3388dbc 100644
--- a/app/api/mileageStats.js
+++ b/app/api/mileageStats.js
@@ -0,0 +1,67 @@
+import request from '@/utils/request'
+
+// 鏌ヨ杞﹁締閲岀▼缁熻鍒楄〃
+export function listMileageStats(query) {
+  return request({
+    url: '/system/mileageStats/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ杞﹁締閲岀▼缁熻璇︾粏
+export function getMileageStats(statsId) {
+  return request({
+    url: '/system/mileageStats/' + statsId,
+    method: 'get'
+  })
+}
+
+// 鏂板杞﹁締閲岀▼缁熻
+export function addMileageStats(data) {
+  return request({
+    url: '/system/mileageStats',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼杞﹁締閲岀▼缁熻
+export function updateMileageStats(data) {
+  return request({
+    url: '/system/mileageStats',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎杞﹁締閲岀▼缁熻
+export function delMileageStats(statsIds) {
+  return request({
+    url: '/system/mileageStats/' + statsIds,
+    method: 'delete'
+  })
+}
+
+// 鎵嬪姩璁$畻鎸囧畾杞﹁締鎸囧畾鏃ユ湡鐨勯噷绋嬬粺璁�
+export function calculateMileage(vehicleId, statDate) {
+  return request({
+    url: '/system/mileageStats/calculate',
+    method: 'post',
+    params: {
+      vehicleId: vehicleId,
+      statDate: statDate
+    }
+  })
+}
+
+// 鎵归噺璁$畻鎸囧畾鏃ユ湡鎵�鏈夎溅杈嗙殑閲岀▼缁熻
+export function batchCalculateMileage(statDate) {
+  return request({
+    url: '/system/mileageStats/batchCalculate',
+    method: 'post',
+    params: {
+      statDate: statDate
+    }
+  })
+}

--
Gitblit v1.9.1