嗨森逛PC管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
high-web/src/app/services/oil-price/oil-price-task.service.ts

64 lines
1.6 KiB

import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {CommonsService} from '../commons.service';
import {environment} from '../../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class OilPriceTaskService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* 批量增加任务
*
* @param paramsObject 对象
* @param callBack 回调
*/
public batchAddTask(paramsObject: object, callBack) {
this.http.post(environment.baseUrl + 'gasOilPriceTask/batchAddTask', paramsObject).subscribe(data => {
callBack(data);
});
}
/**
* 删除任务
*
* @param id 任务id
* @param callBack 回调
*/
public delTask(id: number, callBack) {
this.http.post(environment.baseUrl + 'gasOilPriceTask/delTask', { taskId: id }).subscribe(data => {
callBack(data);
});
}
/**
* 批量增加任务
*
* @param paramsObject 对象
* @param callBack 回调
*/
public getTaskDetail(id: number, callBack) {
this.http.get(environment.baseUrl + 'gasOilPriceTask/getTaskDetail?taskId=' + id).subscribe(data => {
callBack(data);
});
}
/**
* 批量增加任务
*
* @param paramsObject 对象
* @param callBack 回调
*/
public getTaskList(param: object, callBack) {
this.http.get(environment.baseUrl + 'gasOilPriceTask/getTaskList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}