function buildData(model) {
    this.model = model;
}

buildData.prototype.buildEngp = function(){
    console.log("44444")
    console.log(this.model)
    let cbsMap = {};
    this.model.liaall.rec.objtyp = "GID";
    this.model.liaall.rec.ownref = this.model.gidgrp.rec.ownref;
    this.model.liaall.rec.branchInr = this.model.gidgrp.rec.branchInr;
    this.model.liaall.rec.detchgcod = this.model.gidgrp.rec.detchgcod;
    this.model.liaall.rec.paytyp = this.model.gidgrp.rec.paytyp;
    this.model.liaall.rec.swftyp = this.model.gidgrp.rec.swftyp;
    this.model.liaall.rec.valdat = this.model.gidgrp.rec.valdat;
    this.model.liaall.rec.gartyp = this.model.gidgrp.rec.gartyp;

    // cbsMap.NOM1 = {
    //     "cur":this.model.gidgrp.cbs.nom1.cur,
    //     "amt":this.model.gidgrp.cbs.nom1.amt,
    // };

    // cbsMap.OPN1 = {};
    
    // cbsMap.OPN2 = {
    //     "cur":this.model.gidgrp.cbs.opn2.cur,
    //     "amt":this.model.gidgrp.cbs.opn2.amt,
    // };

    // cbsMap.MAX = {
    //     "cur":this.model.gidgrp.cbs.max.cur,
    //     "amt":this.model.gidgrp.cbs.max.amt,
    // };

    // cbsMap.MAX2 = {
    //     "cur":this.model.gidgrp.cbs.max2.cur,
    //     "amt":this.model.gidgrp.cbs.max2.amt,
    // };

    Object.keys(this.model.gidgrp.cbs).forEach(key=>{
        cbsMap[key.toUpperCase()]= {...this.model.gidgrp.cbs[key]};
    })

    this.model.liaall.cbsMap = cbsMap;

    let ptsptaList = [];
    if (this.model.gidgrp.apl.pts.extkey !== "") {
        ptsptaList.push(this.model.gidgrp.apl.pts);
    }
    if (this.model.gidgrp.adv.pts.extkey !== "") {
        ptsptaList.push(this.model.gidgrp.adv.pts);
    }
    if (this.model.gidgrp.ben.pts.extkey !== "") {
        ptsptaList.push(this.model.gidgrp.ben.pts);
    }
    this.model.liaall.ptsList = ptsptaList;
    this.model.liaall.setglg.setgll = [];
    this.model.liaall.setfog.setfol = [];
    this.model.liaall.setfeg.setfel = [];


    this.model.liaall.transName = this.model.gidgrp.transName;
    // if (!!window.sessionStorage.userId) {
    //     this.model.liaall.userId = window.sessionStorage.userId;
    // } else {
    //     this.model.liaall.userId = "ZL";
    // }
    this.model.liaall.userId = "742549";

}

export default buildData;