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.common.vo.PtsptaVo;
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 NidBizInfoVo 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;

    private String beyzd3;

    private String beyzd6;

    // \NIDGRP\REC\RTNFILESTYLE
    private String rtnfilestyle;

    // \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
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date clsdat;

    //Date Guarantee Closed
    // NIDGRP\REC\FEECOLDAT
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date feecoldat;

    //Confirmation Date
    // NIDGRP\REC\CNFDAT
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    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 ncdinr;

    private String ameflg;

    private String clisetopt;

    private String dspflg;

    private BigDecimal ameamt;

    private String nxtflg;

    private String payrol;

    private BigDecimal chgamt = Decimals.ZERO_SCALE2;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    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;

    //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 PtsptaVo othmsg;
    private PtsptaVo othcc;
    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;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date dat = NULLDATE;

    //Country or Region Code
    private String payeecountcode;

    private String delto;

    private String deltoc;

    private String deltoadr;

    private String deltoadrc;

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

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

    //新增报送字段

    /**
     * 被担保人社会机构代码
     */

    private String grtjuscod;

    /**
     * 对外担保类型
     */
    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;
    private String opnsta;
    private String ghdflg=NULLSTR;

    // 云平台保函消息类型
    private String msgTyp;

    //来源自动收费
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date beginDate = null;

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

    private BigDecimal ratcal = BigDecimal.ZERO;

    private BigDecimal untamt = BigDecimal.ZERO;

    private BigDecimal minamt = BigDecimal.ZERO;

    private BigDecimal maxamt = BigDecimal.ZERO;

    private String modflg = NULLSTR;

    private BigDecimal feeamt = BigDecimal.ZERO;

    private String pertyp = NULLSTR;

    private String guaflg = NULLSTR;

    private String countrycode = NULLSTR;
    @Override
    public void reset() {
        if (redamt == null) {
            redamt = Decimals.ZERO_SCALE2;
        }
    }
}
