package com.yuchen.saas.park.api.vo.property;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkunion.park.service.common.utils.AmtUtil;
import lombok.Data;

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

/**
 * 预存款抵扣欠费
 */
@Data
public class PropertyPrepaymentConfirmVo {

    /**
     * 房源id
     */
    private Long houseId;
    /**
     * 房间代码
     */
    private String resourceCode;
    /**
     * 客户id
     */
    private Long customerId;
    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 实扣金额总计
     */
    private BigDecimal deductAmt;
    /**
     * 收款日期
     */
    private Date recordTime;
    /**
     * 收费项目汇总
     */
    private List<PropertyPrepaymentConfirmListVo> confirmListVos;

    /**
     * 预付款抵扣明细
     */
    private Deduct deduct = new Deduct();

    @Data
    public class Deduct {
        /**
         * 客户名称
         */
        private String customerName;
        /**
         * 房间代码
         */
        private String resourceCode;
        /**
         * 预存款账户名称
         */
        private String feeItemName;
        /**
         * 可抵充项目，多个逗号分隔
         */
        private String feeNameStr;
        /**
         * 预存款余额; 单位：分
         */
        @JsonIgnore
        private Long balanceAmtFen;
        public BigDecimal getBalanceAmt() {
            return AmtUtil.fenToYuanObj(this.balanceAmtFen);
        }
        /**
         * 应扣金额 (未缴金额汇总); 单位：分
         */
        @JsonIgnore
        private Long arrearsAmtFen;
        public BigDecimal getArrearsAmt() {
            return AmtUtil.fenToYuanObj(this.arrearsAmtFen);
        }
        /**
         * 实扣金额 (预存款抵充额汇总); 单位：分
         */
        @JsonIgnore
        private Long deductAmtFen;
        public BigDecimal getDeductAmtFen() {
            return AmtUtil.fenToYuanObj(this.deductAmtFen);
        }

    }

}


