import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {SERVER_API_URL, SERVER_API_URL_SCHOOL} from '../app.constants';
import {Observable} from 'rxjs/Rx';
import {CommonService} from '../shared/common/common.service';
import {data_type} from '../infomationResource/information.constans';

@Injectable()
export class InformationProjectService {

    constructor(private http: HttpClient, private commonSer: CommonService) {
    }

    /***合同管理***/
    //修改合同
    updateContractManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractManager/updateContractManager', data);
    }

    //删除合同
    deleteContractManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractManager/deleteContractManager', data);
    }

    //合同分页查询
    selectContractManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractManager/selectContractManager', data);
    }

    //新增合同
    addContractManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractManager/addContractManager', data);
    }

    /***end***/

    /***付款信息***/
    //付款信息查询
    selectContractPay(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractPay/selectContractPay', data);
    }

    //删除支付信息
    deleteContractPay(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractPay/deleteContractPay', data);
    }

    //支付信息修改
    updateContractPay(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractPay/updateContractPay', data);
    }

    //支付信息增加
    msgPageWarningMsg(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/contractPay/addContractPay', data);
    }

    /***end***/

    /***服务人员***/
    //修改
    updateServiceUser(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceUser/updateServiceUser', data);
    }

    //删除
    deleteServiceUser(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceUser/deleteServiceUser', data);
    }

    //查询
    selectServiceUser(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceUser/selectServiceUser', data);
    }

    //增加
    addServiceUser(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceUser/addServiceUser', data);
    }

    /***end***/

    /***服务单位***/
    //修改
    updateServiceCompany(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceCompany/updateServiceCompany', data);
    }

    //删除
    deleteServiceCompany(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceCompany/deleteServiceCompany', data);
    }

    //查询
    selectServiceCompany(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceCompany/selectServiceCompany', data);
    }

    //增加
    addServiceCompany(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceCompany/addServiceCompany', data);
    }

    /***end***/

    /***服务团队***/
    //修改
    updateServiceTeam(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceTeam/updateServiceTeam', data);
    }

    //删除
    deleteServiceTeam(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceTeam/deleteServiceTeam', data);
    }

    //查询
    selectServiceTeam(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceTeam/selectServiceTeam', data);
    }

    //增加
    addServiceTeam(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/serviceTeam/addServiceTeam', data);
    }

    /***end***/

    /***费用管理***/
    //修改
    updateCostManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/costManager/updateCostManager', data);
    }

    //删除
    deleteCostManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/costManager/deleteCostManager', data);
    }

    //查询
    selectCostManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/costManager/selectCostManager', data);
    }

    //增加
    addCostManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/costManager/addCostManager', data);
    }

    /***end***/
    /***项目管理***/
    //修改
    updateProjectManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectManager/updateProjectManager', data);
    }

    //删除
    deleteProjectManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectManager/deleteProjectManager', data);
    }

    //查询
    selectProjectManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectManager/selectProjectManager', data);
    }

    //增加
    addProjectManager(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectManager/addProjectManager', data);
    }

    /***end***/
    /***招标信息***/
    //修改
    updateProjectTender(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectTender/updateProjectTender', data);
    }

    //删除
    deleteProjectTender(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectTender/deleteProjectTender', data);
    }

    //查询
    selectProjectTender(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectTender/selectProjectTender', data);
    }

    //增加
    addProjectTender(data): Observable<any> {
        return this.http.post(SERVER_API_URL + '/projectTender/addProjectTender', data);
    }

    /***end***/
}
