package com.brilliance.isc.bo.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

/**
 *
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Fremsg {
    private static Logger log = LoggerFactory.getLogger(Fremsg.class);

    private  String troflg = NULLSTR;
    private  String sndmt = NULLSTR;
    private  String msgrol = NULLSTR;
    private  String reldir = NULLSTR;
    private  String ccrol = NULLSTR;

    public void regDocFRE() {
//        String bch = NULLSTR;
//        String grp = NULLSTR;
//        IModule mod = null;
//        String namOri = NULLSTR;
//        IPanel panOri = null;
//        String namCC = NULLSTR;
//        IPanel panCC = null;
//        if( MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"99")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"95")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"96")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"92")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"30")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"SUS")== 0 || MdaUtils.compareTo(nctfreStoreVo.getFremsg().getSndmt(),"59")== 0 )
//        {
//            bch = Strings.mid(Utils.recGetObj(ctx.absGet(Mtabut.class).getRec()),1,2);
//            grp = "\\" + bch + "DGRP";
//            mod = MdaDriver.getModule(this,grp);
//            // original
//            if( ptsptaToolComponent.ptsIsRolSet( mod, this.getMsgrol() ) || ( ! MdaUtils.isEmpty(this.getOthmsg().getPts().getAdrblk()) ) )
//            {
//                namOri = "\\" + bch + "TFREL1";
//                panOri = Systems.getPanel(namOri);
//               trndocService.defDocEot ( "TRN", "FRE1", namOri, "LET001", 0, this.getMsgptainr(), Platform.recGetPath(mod), Systems.getDescription(panOri), this.getMsgrol(), this.getOthmsg().getPts().getAdrblk() );
//                /**
//                 $elcflgGrp = "\\\\" + $BCH + "DGRP\\\\REC\\\\ELCFLG"
//                 $elcflg = GetContent( $elcflgGrp )
//                 $error = ErrorCode
//                 if $elcflg == "Y" then
//                 \\TRNMOD\\TRNDOC.DefDocEot ( "TRN", "FRE3", "\\\\DITADVC1", "ELC", 0, MSGPTAINR, RecGetPath( $Mod ), "ccms.303.001.02", MSGROL, "" )
//                 endif
//                 **/
//                // copy
//                // can only be able to show, if an original is sent
//                if( Dynamic.ptsIsRolSet( mod, nctfreStoreVo.getFremsg().getCcrol() ) || ( ! MdaUtils.isEmpty(nctfreStoreVo.getFremsg().getOthcc().getPts().getAdrblk()) ) )
//                {
//                    namCC = "\\" + bch + "TFREL2";
//                    panCC = Systems.getPanel(namCC);
//                    ctx.absGet(Trnmod.class).getTrndoc().defDocEot ( "TRN", "FRE2", namCC, "LET001", 0, this.getCcptainr(), Platform.recGetPath(mod), Systems.getDescription(panCC), this.getCcrol(), this.getOthcc().getPts().getAdrblk() );
//                }
//            }
//        }
    }
}
