package com.brilliance.isc.swift.objmtconvert.model.mt9xx.tag.tag935;

import com.brilliance.isc.swift.objmtconvert.model.AbsMTCreator;
import com.brilliance.isc.swift.objmtconvert.model.AbsTagCreate;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.MT935Creator;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.mt9XXAbsCreator.MT935AbsCreator;

import java.util.List;

/**
 * @author gechengyang
 * @date 2023/2/18
 */
public class TagCycleCreator extends AbsTagCreate {

     private MT935Creator mt935Creator;

    public TagCycleCreator(AbsMTCreator absMTCreator)
    {
        super(absMTCreator);
        this.mt935Creator= (MT935Creator) absMTCreator;
    }


    public  void creator()
    {
        List<MT935AbsCreator> tagList = mt935Creator.getMt935AbsCreators();
        if(tagList!=null){
            for (MT935AbsCreator abs935:tagList) {
                mt935Creator.set("23",abs935.getFurtherIdentification());
                mt935Creator.set("25",abs935.getAccountIdentification());
                mt935Creator.set("30",abs935.getEffectiveDateOfNewRate());
                mt935Creator.set("37H",abs935.getNewInterestRate(),true);
            }
        }

    }
}
