package com.brilliance.isc.vo.lg;

import com.brilliance.mda.runtime.mda.util.Decimals;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.vo.CipmodVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

import static com.brilliance.mda.runtime.mda.Constants.NULLDATE;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class NcdBizInfoVo extends BizInfoVo {

    private String hndtyp = NULLSTR;

    private String rmbflg;

    // \\NIDGRP\\REC\\GARTYP
    private String gartyp;

    // \\NIDGRP\\REC\\FINGUA
    private String fingua;

    // \\NIDGRP\\GHD\\SEGTYP
    private String segtyp;

    //\\NIDGRP\\GHD\\AMESTA;
    private String amesta;

    // \NIDGRP\REC\FROMFLG
    private String fromflg;

    // \NIDGRP\REC\OTHERSNO
    private String othersno;

    // \NIDGRP\REC\SNDTO
    private String sndto;

    private String secuilflg;

    // NIDGRP\REC\LEGFRM
    private String legfrm = NULLSTR;

    // GITP\REC\SWIFTFLG
    private String swiftflg;

    // NIDGRP\REC\PURCAN
    private String purcan = NULLSTR;

    // NIDGRP\REC\LIAFLG
    private String liaflg = NULLSTR;

    // NIDGRP\REC\LIADAT
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date liadat = NULLDATE;

    // NIDGRP\REC\NIDUIL
    private String giduil;

    // NIDGRP\REC\PURPOS
    private String purpos;

    // NIDGRP\REC\REVFLG
    private String revflg;

    // NIDGRP\REC\CNFSTA
    private String cnfsta;

    //GETAMEVO//GITAMEPVO//SWIADD//AMEACCFLG
    private String amemsgdonflg = NULLSTR;

    //GETAMEVO//GITAMEPVO//PRTFLG
    private String prtflg;

    // NIDGRP\APLCNT
    private int aplcnt;

    // NIDGRP\REC\REDAMT
    private BigDecimal redamt = Decimals.ZERO_SCALE2;

    //GCDGRP//REC//DOCPRBROL
    private String docprbrol = NULLSTR;

    //TRNMODVO//SWIADD//PURPOSAME
    private String purposame = NULLSTR;

    //GETAMEVO//GITAMEPVO//AMEACCFLG
    private String ameaccflg;

    //GCDGRP//REC//PTYTYP
    private  String ptytyp = NULLSTR;

    //NIDGRP//ADA//ROLSETFLG
    private  String rolsetflg = NULLSTR;

    //NIDGRP//REC//OUTCUR
    private String outcur = NULLSTR;

    // NIDGRP\REC\EXPFLG
    private String expflg;

    //Date Guarantee Closed
    // NIDGRP\REC\CLSDAT
    private Date clsdat;

    //Date Guarantee Closed
    // NIDGRP\REC\FEECOLDAT
    private Date feecoldat;

    //Confirmation Date
    // NIDGRP\REC\CNFDAT
    private Date cnfdat;

    // GCTP\CRE732FLG
    private String cre732flg = NULLSTR;

    // GITSET\CLMRMBFLG
    private String clmrmbflg = NULLSTR;

    // GITSET\SETMOD\DOCAMT
    private BigDecimal docamt = Decimals.ZERO_SCALE2;

    // GITSET\SETMOD\DOCCUR
    private  String doccur = NULLSTR;


    private String rmbnar;

    private String ghdinr;

    private String ameflg;

    private String clisetopt;

    private String dspflg;

    private BigDecimal ameamt;

    private String nxtflg;

    private String payrol;

    private BigDecimal chgamt = Decimals.ZERO_SCALE2;

    private Date chgdat;

    //Gitcrj新增
    private String Rejtypsel;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date newexpdat;

    //Request of Amendment send to
    private  String ramrol;

    private String nidinr;

    //Gitset新增
    private String cannowflg = NULLSTR;
    private String paypsb = NULLSTR;
    private String frepayflg = NULLSTR;

    //Niteng新增
    private String Zhqtyp = NULLSTR;

    //fremsg相关
    private String sndmt;
    private  String msgrol = NULLSTR;
    private  String ccrol = NULLSTR;
    private  String reldir = NULLSTR;
    private  String fulmt = NULLSTR;
    private  String relmt = NULLSTR;

    //nitenc相关
    //nitenc/trnmod/diapic/cod；nitenc/trnmod/diapic/dat
    //Coded Reason；Date of Diary
    private String cod = NULLSTR;
    private Date dat = NULLDATE;

    //***** XXXSET 交易引入字段 start *********
    private CipmodVo cipmod;
    /**
     * trnmod/swftyp报文类型
     */
    private String swftyp;

    /**
     * 收款直接参与者行号 trnmod.reconebch
     */
    private String reconebch;
    /**
     * 收款直接参与者名称 trnmod.reconebchnam
     */
    private String reconebchnam;
    /**
     * 附言  trnmod.commen
     */
    private String commen;
    /**
     * 收款人名称 trnmod.pyenam
     */
    private String pyenam;
    /**
     * 收款人地址 trnmod.pyeadr
     */
    private String pyeadr;

    //***** XXXSET 交易引入字段 end *********

    /**
     * 是否分离式保函
     */
    private String  fenlishi;

    private Date credat;

    //新增报送字段

    /**
     * 对外担保类型
     */
    private String  cfaguatyp = NULLSTR;

    /**
     *债权人国别
     */
    private String stacty = NULLSTR;

    /**
     * 担保生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date orddat = NULLDATE;

    /**
     * 担保合同编号
     */
    private String orcref = NULLSTR;

    /**
     * 到期类型
     */
    private String exptyp = NULLSTR;
    //cfa--//Liability Type - Local Undertaking Seq. C C责任日期类型
    private String liatypc = NULLSTR;

    //预计核验日期
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date prechkdat;

    /**
     * 索赔需要使用的是否走cips标记
     */
    private String cmtflg;

    /**
     * 索赔注销的时候选择的处理方式
     */
    private String rebkpflg;

    //默认对手费用收取角色
    private String feecorrol = NULLSTR;

    // nid opndat
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    protected Date nidopndat = null;

    // nid ownref
    private String nidownref;

    @Override
    public void reset() {
        if (redamt == null) {
            redamt = Decimals.ZERO_SCALE2;
        }
        if(cipmod == null){
            cipmod = new CipmodVo();
        }
    }

}
