const system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class ChanceCtl extends CtlBase {
    constructor() {
        super();
        this.chanceSve = system.getObject("service.chance.chanceSve");
    }

    /**
     * 保存线索
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async saveClue(pobj, pobj2, req) {
        return await this.chanceSve.saveClue(pobj);
    }

    /**
     * 关闭商机
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async closeClue(pobj, pobj2, req) {
        return await this.chanceSve.closeClue(pobj);
    }

    /**
     * 列表商机
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async listClue(pobj, pobj2, req) {
        return await this.chanceSve.listClue(pobj);
    }

    /**
     * 列表商机字典
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async clueStatusDict(pobj, pobj2, req) {
        return await this.chanceSve.clueStatusDict(pobj);
    }

    /**
     * 关闭商机字典
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async closeReasonDict(pobj, pobj2, req) {
        return await this.chanceSve.closeReasonDict(pobj);
    }

    /**
     * 根据线索ID查询详细
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async getClueById(pobj, pobj2, req) {
        return await this.chanceSve.getClueById(pobj);
    }

    /**
     * 保存跟进进度
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async saveCfollowLog(pobj, pobj2, req) {
        return await this.chanceSve.saveCfollowLog(pobj);
    }

    /**
     * 保存方案
     * @param params
     * @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|*|undefined>}
     */
    async saveCscheme(pobj, pobj2, req) {
        return await this.chanceSve.saveCscheme(pobj);
    }
}
module.exports = ChanceCtl;