package com.brilliance.isc.convert.mt9xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.commontag.DcDateCurAmtTagXXX;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.MT971Creator;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.mt9XXAbsCreator.MT971AbsCreator;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.brilliance.isc.swift.objmtconvert.util.JsonUtil;
import org.junit.Test;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * @author hedonghao
 * @date 2023/2/24
 */
public class Mt971Test {
    @Test
    public void mt971_Test() {
        MT971Creator mt971Creator = new MT971Creator("971");
        //20
        mt971Creator.setTranReferenceNum("OPIYT");//16x
        //循环1
        List<MT971AbsCreator> list = new LinkedList<>();
        MT971AbsCreator abs971 = new MT971AbsCreator();
        //25
        abs971.setAccountIdentifi("POUYRR");//35x
        DcDateCurAmtTagXXX dcDateCurAmt62F = new DcDateCurAmtTagXXX("62");//1!a6!n3!a15d
        dcDateCurAmt62F.setDcMark("D");
        dcDateCurAmt62F.setDate("256314");
        dcDateCurAmt62F.setCurrency("LOP");
        dcDateCurAmt62F.setAmount(new BigDecimal(2500));
        abs971.setDcDateCurAmt62F(dcDateCurAmt62F);
        list.add(abs971);
        mt971Creator.setCycleDomain(list);
        MtCreatorManager.packMT(mt971Creator);
    }
}
