parent
60ba036449
commit
64681d728f
@ -0,0 +1,39 @@ |
||||
import { Injectable } from '@angular/core'; |
||||
import {HttpClient} from '@angular/common/http'; |
||||
import {CommonsService} from './commons.service'; |
||||
import {environment} from '../../environments/environment'; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class FleetOilCardCarService { |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
private common: CommonsService |
||||
) { } |
||||
|
||||
/** |
||||
* 删除用户 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public delete(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCardCar/delete', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 查询车辆列表 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getCarList(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCardCar/getCarList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,39 @@ |
||||
import { Injectable } from '@angular/core'; |
||||
import {HttpClient} from '@angular/common/http'; |
||||
import {CommonsService} from './commons.service'; |
||||
import {environment} from '../../environments/environment'; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class FleetOilCardUserService { |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
private common: CommonsService |
||||
) { } |
||||
|
||||
/** |
||||
* 删除用户 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public delete(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCardUser/delete', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 查询用户列表 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getUserList(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCardUser/getUserList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
} |
@ -0,0 +1,148 @@ |
||||
import { Injectable } from '@angular/core'; |
||||
import {HttpClient} from '@angular/common/http'; |
||||
import {CommonsService} from './commons.service'; |
||||
import {environment} from '../../environments/environment'; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class FleetOilCardService { |
||||
|
||||
constructor( |
||||
private http: HttpClient, |
||||
private common: CommonsService |
||||
) { } |
||||
|
||||
/** |
||||
* 车队油卡生成 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public generateCard(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/generateCard', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 油卡充值 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public recharge(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/recharge', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 回收余额 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public recycleAmount(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/recycleAmount', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 查询油卡列表 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getCardList(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCard/getCardList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 查询油卡记录列表 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getRecordList(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCard/getRecordList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 查询订单列表 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public getCardOrderList(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCard/getCardOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 导出油卡订单 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public exportCardOrder(param: object, callBack) { |
||||
this.http.get(environment.baseUrl + 'fleetOilCard/exportCardOrder' + this.common.getWhereCondition(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 设置联系人 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public setContact(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/setContact', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 禁用 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public disabled(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/disabled', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 启用 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public enable(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/enable', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 导出油卡 |
||||
* |
||||
* @param param 参数对象 |
||||
* @param callBack 回调 |
||||
*/ |
||||
public exportCard(param: object, callBack) { |
||||
this.http.post(environment.baseUrl + 'fleetOilCard/exportCard', param).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue