package com.hzs.bonus.bonus.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hzs.common.core.annotation.BigDecimalFormat;
import com.hzs.common.core.annotation.Excel;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * @Description: 返回后端用户端查询奖金明细vo
 * @Author: sui q
 * @Time: 2022/12/20 9:56
 * @Classname: MemberBonusDetailVO
 * @PackageName: com.hzs.member.bonus.vo
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class MemberBonusDetailSerVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 结算期数
     */
    @Excel(name = "结算期数")
    private Integer period;
    /**
     * 结算日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结算时间", dateFormat = "yyyy-MM-dd")
    private Date settleDate;
    /**
     * 订单主键
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Long pkOrder;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderCode;

    /**
     * 订单类型 来源于专区设置
     */
    @JsonIgnore
    @Transaction(transactionKey = EnumsPrefixConstants.ORDER_TYPE)
    private Integer orderType;

    @Excel(name = "订单类型")
    private String orderTypeVal;

    /**
     * 来源国家名称
     */
    @Excel(name = "来源国家")
    private String sourceCountryName;

    /**
     * 来源会员编号
     */
    @Excel(name = "来源编号")
    private String sourceMemberCode;

    /**
     * 来源会员姓名
     */
    @Excel(name = "来源姓名")
    private String sourceMemberName;

    /**
     * 汇率 来源于汇率
     */
    @JsonIgnore
    private Integer pkRate;

    /**
     * 汇率
     */
    private BigDecimal outExchangeRate;

    /**
     * 订单金额
     */
    @Excel(name = "来源金额", scale = 2)
    private BigDecimal orderAmount;

    /**
     * 订单业绩
     */
    @Excel(name = "来源业绩", scale = 2)
    private BigDecimal orderAchieveOri;

    /**
     * 订单金额
     */
    @Excel(name = "来源金额($)", scale = 2)
    private BigDecimal orderAmountDollar;

    /**
     * 订单业绩
     */
    @Excel(name = "来源业绩($)", scale = 2)
    private BigDecimal orderAchieve;

    /**
     * 结算国家
     */
    @Excel(name = "结算国家")
    private String settleCountry;

    /**
     * 会员编号
     */
    @Excel(name = "收益编号")
    private String memberCode;

    /**
     * 会员名称
     */
    @Excel(name = "收益姓名")
    private String memberName;

    /**
     * 结算等级
     */
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_GRADE)
    @JsonIgnore
    private Integer pkSettleGrade;

    @Excel(name = "结算等级")
    private String pkSettleGradeVal;

    /**
     * 真实奖衔
     */
    @Transaction(transactionKey = EnumsPrefixConstants.KEY_AWARD)
    @JsonIgnore
    private Integer pkAwards;

    @Excel(name = "真实奖衔")
    private String pkAwardsVal;

    /**
     * 轮
     */
    @Excel(name = "直推轮数")
    private Integer round;

    /**
     * 次
     */
    @Excel(name = "直推次数")
    private Integer second;

    /**
     * 当前碰次
     */
    @Excel(name = "当前碰次")
    private Integer currentTouch;

    /**
     * 拓展碰次
     */
    @Excel(name = "拓展碰次")
    private Integer expandTouch;

    /**
     * 当前代数
     */
    @Excel(name = "当前代数")
    private Integer currentGeneration;

    /**
     * 辅导代数
     */
    @Excel(name = "辅导代数")
    private Integer coachGeneration;

    @Excel(name = "拓展无封", scale = 2)
    private BigDecimal expandNoCappingOri;

    @Excel(name = "拓展封顶", scale = 2)
    private BigDecimal expandCappingOri;

    @Excel(name = "拓展正常减半", scale = 2)
    private BigDecimal expandNormalHalfOri;

    @Excel(name = "拓展实际减半", scale = 2)
    private BigDecimal expandNormalRealOri;
    /**
     * 税前收益
     */
    @Excel(name = "税前收益", scale = 2)
    private BigDecimal pretaxIncomeOri;

    /**
     * 实际收益
     */
    @Excel(name = "实际收益", scale = 2)
    private BigDecimal realIncomeOri;

    /**
     * 拓展无封 (拓展收益按等级正常比例结算，拓展收益按等级正常比例结算 无封顶)
     */
    @Excel(name = "拓展无封($)", scale = 2)
    private BigDecimal expandNoCapping;
    /**
     * 拓展封顶 (拓展收益按等级正常比例结算，不按4-N结算，根据配置的封顶值限制最大收益)
     */
    @Excel(name = "拓展封顶($)", scale = 2)
    private BigDecimal expandCapping;
    /**
     * 拓展正常减半 (拓展收益按等级正常比例结算，不按4-N结算，根据配置的封顶值限制最大收益，拓展封顶（￥）/2)
     */
    @Excel(name = "拓展正常减半($)", scale = 2)
    private BigDecimal expandNormalHalf;
    /**
     * 拓展实际减半 (拓展收益按4-结算，根据配置的封顶值限制最大收益，税前收益（￥）/2)
     */
    @Excel(name = "拓展实际减半($)", scale = 2)
    private BigDecimal expandNormalReal;

    /**
     * 税前收益
     */
    @Excel(name = "税前收益($)", scale = 2)
    private BigDecimal pretaxIncome;

    /**
     * 实际收益
     */
    @Excel(name = "实际收益($)", scale = 2)
    private BigDecimal realIncome;

    /**
     * 计算业绩
     */
    private BigDecimal calAchieve;

    /**
     * 收益类型
     */
    @JsonIgnore
    private Integer pkBonusItems;

    /**
     * 收益类型
     */
    @Excel(name = "收益类型")
    private String bonusName;

    /**
     * 收益状态
     */
    @Transaction(transactionKey = EnumsPrefixConstants.BONUS_INCOME_STATUS)
    @JsonIgnore
    private Integer incomeStatus;

    @Excel(name = "收益状态")
    private String incomeStatusVal;

    /**
     * 体系名称
     */
    @Excel(name = "隶属体系")
    private String vertexName;

    /**
     * 团队名称
     */
    @Excel(name = "隶属团队")
    private String teamName;

    /**
     * 备注
     */
    @Excel(name = "奖金说明")
    private String remark;

    /**
     * 团队编号
     */
    private String teamCode;

    /**
     * 扣除个税
     */
    private BigDecimal incomeTax;

    /**
     * 计算比例
     */
    private BigDecimal calValue;

    /**
     * 辅导无封
     */
    private BigDecimal coachNoCapping;
    private BigDecimal coachNoCappingOri;

    /**
     * 辅导封顶
     */
    private BigDecimal coachCapping;
    private BigDecimal coachCappingOri;

    /**
     * 辅导正常减半
     */
    private BigDecimal coachNormalHalf;
    private BigDecimal coachNormalHalfOri;

    /**
     * 辅导实际减半
     */
    private BigDecimal coachNormalReal;
    private BigDecimal coachNormalRealOri;

    /**
     * 收益占比
     */
    @Excel(name = "收益占比(%)", scale = 2)
    private BigDecimal incomeRatio;

    /**
     * 收益拨比
     */
    @Excel(name = "收益拨比(%)", scale = 2)
    private BigDecimal incomeDialRatio;

    /**
     * 订单拨比
     */
    @Excel(name = "订单拨比(%)", scale = 2)
    private BigDecimal orderDialRatio;

}
