package com.brilliance.isc.swift.objmtconvert.model.mt2xx.tag.tag204;

import com.brilliance.isc.swift.objmtconvert.model.AbsMTCreator;
import com.brilliance.isc.swift.objmtconvert.model.AbsTagCreate;
import com.brilliance.isc.swift.objmtconvert.model.mt2xx.mt2XXAbsCreator.MT204AbsCreator;
import com.brilliance.isc.swift.objmtconvert.model.mt2xx.MT204Creator;

import java.util.List;

/**
 * @Description：
 * @Author：夏猛
 * @CreateTime：2023/2/24 16:24
 **/
public class TagCycleCreator extends AbsTagCreate {
    private MT204Creator mT204Creator;

    public TagCycleCreator(AbsMTCreator absMTCreator)
    {
        super(absMTCreator);
        this.mT204Creator= (MT204Creator) absMTCreator;
    }

    public  void creator()
    {
        List<MT204AbsCreator> tagList = mT204Creator.getCycleDomain();
        for (MT204AbsCreator abs204:tagList) {
            mT204Creator.set("20",abs204.getTransactionReferenceNumberB());
            mT204Creator.set("21",abs204.getRelatedReference());
            mT204Creator.set("32B",abs204.getCurrencyCodeAmount().getTagResult().getValue());
            mT204Creator.set("53"+abs204.getDebitInstitution().getTagResult().getTagEnd(),abs204.getDebitInstitution().getTagResult().getValue());
            mT204Creator.set("72",abs204.getSendertoReceiverInformationB());
        }


    }


}
