| | |
| | | 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 |
| | | } |
| | | }) |
| | | } |