import { Http,Util } from '@/utils';
import EntityService from '../entity-service';



/**
 * 领料单服务对象基类
 *
 * @export
 * @class EMItemPUseServiceBase
 * @extends {EntityServie}
 */
export default class EMItemPUseServiceBase extends EntityService {

    /**
     * Creates an instance of  EMItemPUseServiceBase.
     * 
     * @param {*} [opts={}]
     * @memberof  EMItemPUseServiceBase
     */
    constructor(opts: any = {}) {
        super(opts);
    }

    /**
     * 初始化基础数据
     *
     * @memberof EMItemPUseServiceBase
     */
    public initBasicData(){
        this.APPLYDEKEY ='emitempuse';
        this.APPDEKEY = 'emitempuseid';
        this.APPDENAME = 'emitempuses';
        this.APPDETEXT = 'emitempusename';
        this.APPNAME = 'eamweb';
        this.SYSTEMNAME = 'eam_practice05';
    }

// 实体接口

    /**
     * Select接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().get(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().get(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().get(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}/select`,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().get(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}/select`,isloading);
        }
            return Http.getInstance().get(`/emitempuses/${context.emitempuse}/select`,isloading);
    }

    /**
     * Update接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().put(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().put(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().put(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().put(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().put(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().put(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().put(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().put(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().put(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().put(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().put(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().put(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().put(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,data,isloading);
        }
        let masterData:any = {};
        Object.assign(data,masterData);
            let res:any = await  Http.getInstance().put(`/emitempuses/${context.emitempuse}`,data,isloading);
            return res;
    }

    /**
     * CheckKey接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().post(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().post(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().post(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().post(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().post(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
        }
            return Http.getInstance().post(`/emitempuses/${context.emitempuse}/checkkey`,data,isloading);
    }

    /**
     * GetDraft接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && true){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.emstore && context.emstorepart && true){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/getdraft`,isloading);
        }
        if(context.pfunit && context.emitem && true){
            return Http.getInstance().get(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.pfemp && context.emitem && true){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.emstore && context.emitem && true){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.emstorepart && context.emitem && true){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.emservice && context.emitem && true){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.pfteam && context.emequip && true){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/getdraft`,isloading);
        }
        if(context.emeqtype && context.emequip && true){
            return Http.getInstance().get(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/getdraft`,isloading);
        }
        if(context.pfteam && true){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emitempuses/getdraft`,isloading);
        }
        if(context.pfemp && true){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitempuses/getdraft`,isloading);
        }
        if(context.pfdept && true){
            return Http.getInstance().get(`/pfdepts/${context.pfdept}/emitempuses/getdraft`,isloading);
        }
        if(context.emstore && true){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitempuses/getdraft`,isloading);
        }
        if(context.emstorepart && true){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitempuses/getdraft`,isloading);
        }
        if(context.emservice && true){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitempuses/getdraft`,isloading);
        }
        if(context.empurplan && true){
            return Http.getInstance().get(`/empurplans/${context.empurplan}/emitempuses/getdraft`,isloading);
        }
        if(context.emitem && true){
            return Http.getInstance().get(`/emitems/${context.emitem}/emitempuses/getdraft`,isloading);
        }
        if(context.emequip && true){
            return Http.getInstance().get(`/emequips/${context.emequip}/emitempuses/getdraft`,isloading);
        }
        let res:any = await  Http.getInstance().get(`/emitempuses/getdraft`,isloading);
        res.data.emitempuse = data.emitempuse;
        return res;
    }

    /**
     * Remove接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().delete(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().delete(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().delete(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().delete(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().delete(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().delete(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().delete(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().delete(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().delete(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().delete(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().delete(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().delete(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
            return Http.getInstance().delete(`/emitempuses/${context.emitempuse}`,isloading);

    }

    /**
     * Get接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().get(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().get(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().get(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().get(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().get(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().get(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}`,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().get(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}`,isloading);
        }
            let res:any = await Http.getInstance().get(`/emitempuses/${context.emitempuse}`,isloading);
            return res;

    }

    /**
     * Save接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emstore && context.emstorepart && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfunit && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfemp && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emstore && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emstorepart && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emservice && context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfteam && context.emequip && context.emitempuse){
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emeqtype && context.emequip && context.emitempuse){
            return Http.getInstance().post(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfteam && context.emitempuse){
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfemp && context.emitempuse){
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.pfdept && context.emitempuse){
            return Http.getInstance().post(`/pfdepts/${context.pfdept}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emstore && context.emitempuse){
            return Http.getInstance().post(`/emstores/${context.emstore}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emstorepart && context.emitempuse){
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emservice && context.emitempuse){
            return Http.getInstance().post(`/emservices/${context.emservice}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.empurplan && context.emitempuse){
            return Http.getInstance().post(`/empurplans/${context.empurplan}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emitem && context.emitempuse){
            return Http.getInstance().post(`/emitems/${context.emitem}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        if(context.emequip && context.emitempuse){
            return Http.getInstance().post(`/emequips/${context.emequip}/emitempuses/${context.emitempuse}/save`,data,isloading);
        }
        let masterData:any = {};
        Object.assign(data,masterData);
            let res:any = await  Http.getInstance().post(`/emitempuses/${context.emitempuse}/save`,data,isloading);
            return res;
    }

    /**
     * Create接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.emstore && context.emstorepart && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses`,data,isloading);
        }
        if(context.pfunit && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.pfemp && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.emstore && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.emstorepart && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.emservice && context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.pfteam && context.emequip && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses`,data,isloading);
        }
        if(context.emeqtype && context.emequip && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses`,data,isloading);
        }
        if(context.pfteam && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfteams/${context.pfteam}/emitempuses`,data,isloading);
        }
        if(context.pfemp && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfemps/${context.pfemp}/emitempuses`,data,isloading);
        }
        if(context.pfdept && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/pfdepts/${context.pfdept}/emitempuses`,data,isloading);
        }
        if(context.emstore && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstores/${context.emstore}/emitempuses`,data,isloading);
        }
        if(context.emstorepart && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emstoreparts/${context.emstorepart}/emitempuses`,data,isloading);
        }
        if(context.emservice && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emservices/${context.emservice}/emitempuses`,data,isloading);
        }
        if(context.empurplan && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/empurplans/${context.empurplan}/emitempuses`,data,isloading);
        }
        if(context.emitem && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emitems/${context.emitem}/emitempuses`,data,isloading);
        }
        if(context.emequip && true){
            if(!data.srffrontuf || data.srffrontuf !== "1"){
                data[this.APPDEKEY] = null;
            }
            if(data.srffrontuf){
                delete data.srffrontuf;
            }
            return Http.getInstance().post(`/emequips/${context.emequip}/emitempuses`,data,isloading);
        }
        let masterData:any = {};
        Object.assign(data,masterData);
        if(!data.srffrontuf || data.srffrontuf !== "1"){
            data[this.APPDEKEY] = null;
        }
        if(data.srffrontuf){
            delete data.srffrontuf;
        }
        let tempContext:any = JSON.parse(JSON.stringify(context));
        let res:any = await Http.getInstance().post(`/emitempuses`,data,isloading);
        return res;
    }

    /**
     * FetchDefault接口方法
     *
     * @param {*} [context={}]
     * @param {*} [data={}]
     * @param {boolean} [isloading]
     * @returns {Promise<any>}
     * @memberof EMItemPUseServiceBase
     */
    public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
        if(context.emstore && context.emstorepart && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emstore && context.emstorepart && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstores/${context.emstore}/emstoreparts/${context.emstorepart}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfunit && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfunits/${context.pfunit}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfemp && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emstore && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstores/${context.emstore}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emstorepart && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emservice && context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emservices/${context.emservice}/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfteam && context.emequip && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emequips/${context.emequip}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emeqtype && context.emequip && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emeqtypes/${context.emeqtype}/emequips/${context.emequip}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfteam && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfteams/${context.pfteam}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfemp && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfemps/${context.pfemp}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.pfdept && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/pfdepts/${context.pfdept}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emstore && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstores/${context.emstore}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emstorepart && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emstoreparts/${context.emstorepart}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emservice && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emservices/${context.emservice}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.empurplan && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/empurplans/${context.empurplan}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emitem && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emitems/${context.emitem}/emitempuses/fetchdefault`,tempData,isloading);
        }
        if(context.emequip && true){
            let tempData:any = JSON.parse(JSON.stringify(data));
            return Http.getInstance().get(`/emequips/${context.emequip}/emitempuses/fetchdefault`,tempData,isloading);
        }
        let tempData:any = JSON.parse(JSON.stringify(data));
        return Http.getInstance().get(`/emitempuses/fetchdefault`,tempData,isloading);
    }
}