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


import com.brilliance.isc.swift.objmtconvert.model.AbsMTValidator;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.brilliance.isc.swift.objmtconvert.util.Constans;
import com.brilliance.isc.swift.objmtconvert.util.Language;
import com.prowidesoftware.swift.model.field.Field32B;
import com.prowidesoftware.swift.model.field.Field33A;
import com.prowidesoftware.swift.model.field.Field33B;
import com.prowidesoftware.swift.model.mt.mt7xx.MT752;
import com.prowidesoftware.swift.model.mt.mt7xx.MT756;

import java.util.Objects;

/**
 * MT750
 * @author wanggang
 * @Date 2023-3-3
 */
public class MT756Validator extends AbsMTValidator {

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

    @Override
    public void bussinessValidator() {
        //   MtResult mtResult = getMtResult();
        MT756 mt756= (MT756)this.getAbstractMT();
        String field32Currency = "";
        Field32B field32B = mt756.getField32B();
        if(field32B!=null){
            field32Currency = field32B.getCurrency();
        }
        Field33A field33A = mt756.getField33A();
        if(field33A!=null){
            String field33Currency = field33A.getCurrency();
            if(!field33Currency.equals(field32Currency)){
                mtResult.addDescription(Language.getLanguage("MT756_C1","【MT756】"));
            }
        }
        //  return  mtResult;
    }

}
