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 GcdBizInfoVo extends BizInfoVo {


    // GCTP\PRECHKDAT
    private Date prechkdat;

    /**
     * 保函开立类型 -- gidgrp/rec/hndtyp
     */
    private String hndtyp = NULLSTR;
    /**
     *Reimbursement Information -- gidgrp/Aplcntrec/rmbflg
     */
    private String rmbflg;

    /**
     * 包含类型 -- gidgrp/rec/gartyp
     */
    private String gartyp;
    /**
     * 是否对外担保  -- GIDGRP\\REC\\FINGUA
     */
    private String fingua;
    /**
     * 特殊保函类型 -- GIDGRP\\GHD\\SEGTYP
     */
    private String segtyp;
    /**
     * 保函修改状态 -- GIDGRP\\GHD\\AMESTA
     */
    private String amesta;

    /**
     * 来源系统 -- \GIDGRP\REC\FROMFLG
     */

    private String fromflg;
    /**
     * 第三方系统编号
     */
    // \GIDGRP\REC\OTHERSNO
    private String othersno;
    /**
     * Guarantee Send to -- \GIDGRP\REC\SNDTO
     */
    private String sndto;
    /**
     * Bilingual Guarantee -- \GIDGRP\REC\secuilflg
     */
    private String secuilflg;
    /**
     * Legal Undertaking Form -- GIDGRP\REC\LEGFRM
     */
    private String legfrm = NULLSTR;
    /**
     * 是否以SWIFT开出 -- GITP\REC\SWIFTFLG
     */
    private String swiftflg;
    /**
     *Reason of Cancelation -- GIDGRP\REC\PURCAN
     */
    private String purcan = NULLSTR;
    /**
     * Liability until -- GIDGRP\REC\LIAFLG
     */
    private String liaflg = NULLSTR;
    /**
     * Liability until -- GIDGRP\REC\LIADAT
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date liadat = NULLDATE;
    /**
     * Guarantee Language -- GIDGRP\REC\GIDUIL
     */
    private String giduil;
    /**
     * Purpose of Message (for outgoing) -- GIDGRP\REC\PURPOS
     */
    private String purpos;
    /**
     * Declaration of Indemnity -- GIDGRP\REC\REVFLG
     */
    private String revflg;
    /**
     * Confirmation Status -- GIDGRP\REC\CNFSTA
     */
    private String cnfsta;
    //GETAMEVO//GITAMEPVO//SWIADD//AMEACCFLG
    private String amemsgdonflg = NULLSTR;

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

    // GIDGRP\APLCNT
    private int aplcnt;
    /**
     * Reduced Amount to be Paid -- GIDGRP\REC\REDAMT
     */
    private BigDecimal redamt = Decimals.ZERO_SCALE2;
    /**
     *   GCDGRP//REC//DOCPRBROL
     */
    //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;
    /**
     * GIDGRP//ADA//ROLSETFLG
     */
    private  String rolsetflg = NULLSTR;
    /**
     *Currency Outstanding Amount -- GIDGRP//REC//OUTCUR
     */
    private String outcur = NULLSTR;
    /**
     * Unlimited Guarantee -- GIDGRP\REC\EXPFLG
     */
    private String expflg;
    /**
     * Date Guarantee Closed -- GIDGRP\REC\CLSDAT
     */
    private Date clsdat;

    /**
     * Date Guarantee Closed -- GIDGRP\REC\FEECOLDAT
     */
    private Date feecoldat;
    /**
     * Confirmation Date - GIDGRP\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;

    /**
     *Reimbursement Narrative -- gitp/rmbnar
     */
    private String rmbnar;
    /**
     * 海关保函inr
     */
    private String ghdinr;
    /**
     * TODO
     */
    private String gidinr;
    /**
     * 银关保涵专用 -- gitp/ameflg
     */
    private String ameflg;
    /**
     * TODO
     */
    private String clisetopt;
    /**
     * TODO
     */
    private String dspflg;
    /**
     * TODO
     */
    private BigDecimal ameamt;
    /**
     * TODO
     */
    private String nxtflg;
    /**
     * TODO
     */
    private String payrol;
    /**
     * TODO
     */
    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;

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

    //Giteng以及Gitenc新增
    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;

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

    //gitset中的报文类型
    private String swftyp = NULLSTR;

    private Date credat = NULLDATE;
    private String fenlishi = NULLSTR;

    //新增报送字段

    /**
     * 对外担保类型
     */
    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;

    /**
     * 申报类型
     */
    private String szflg = NULLSTR;
    private String acttyp = NULLSTR;

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


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

    private CipmodVo cipmodVo;

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

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

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

    // gid ownref
    private String gidownref;


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

}
