package com.brilliance.isc.swift.objmtconvert.model.busvalidator.mt4xx;

import com.brilliance.isc.swift.objmtconvert.model.AbsMTValidator;
import com.brilliance.isc.swift.objmtconvert.model.busvalidator.ValidatorMethod;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;

import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field32A;
import com.prowidesoftware.swift.model.mt.mt4xx.MT412;

import java.util.List;

/**
 * @author zh
 * @create 2023-03-03-10:27
 */
public class MT412Validator extends AbsMTValidator {

    public MT412Validator(String mtStr, MtResult mtResult)
    {
        super(mtStr,mtResult);
    }

    @Override
    public void bussinessValidator() {
        //  MtResult mtResult=getMtResult();
        List<Tag> tags = this.getAbstractMT().getSwiftMessage().getBlock4().getTags();
        String msgType = "MT412";
        mtResult = ValidatorMethod.mt4xxField202132(tags,mtResult,msgType);
        MT412 mt412 = (MT412) this.getAbstractMT();
        List<Field32A> listField32A = mt412.getField32A();
        mtResult = ValidatorMethod.mt4xxField32(listField32A, null, null, mtResult,msgType);
        // return mtResult;
    }
}
