# TaCreditCard.java

    package cloud.wconnect.finance.entity.ta;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableField;
    import com.baomidou.mybatisplus.annotation.TableId;
    import com.baomidou.mybatisplus.annotation.TableName;
    import lombok.*;
    import lombok.experimental.Accessors;

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

    /**
     * <p>
     *
     * </p>
     *
     * @author zc
     * @since 2023-07-07
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    @TableName("ta_credit_card")
    public class TaCreditCard implements Serializable {

        private static final long serialVersionUID = 1L;

        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        /**
         * 资产id
         */
        @TableField("hotel_id")
        private Integer propertyId;

        /**
         * 房间号
         */
        private String roomNo;

        /**
         * 客人标识
         */
        private String name;

        /**
         * 入住日期
         */
        private Long arrivalDate;

        /**
         * 退房日期
         */
        private Long departureDate;

        /**
         * 信用卡类型
         */
        private String cardType;

        /**
         * 信用卡号后四位
         */
        private String cardNo;

        /**
         * 房间费用
         */
        private BigDecimal roomRevenue;

        /**
         * F&B费用
         */
        private BigDecimal fbRevenue;

        /**
         * 税费用
         */
        private BigDecimal nonRevenue;

        /**
         * 总费用
         */
        private BigDecimal totalCharged;

        /**
         * 数据日期，在 PMS 系统中操作的日期
         */
        private Long dataDate;

        /**
         * 创建时间
         */
        private Long createdTime;

        /**
         * 是否可选择，true：是；false：否
         */
        private Boolean canChoose;

        /**
         * 摘要[room_no,name,arrival_date,departure_date,card_type,card_no,room_revenue,fb_revenue,non_revenue,total_charged]
         */
        private String infoSign;

        /**
         * 获取对比 Portal 字符串
         *
         * @return arrivalDate + cardNo
         * @author zc
         * @date 2023/7/22
         */
        public String getContrastPortalStr() {
            return this.arrivalDate + "&" + this.cardNo;
        }

        /**
         * 获取已存在 Credit Card 字符串
         *
         * @return roomNo + arrivalDate + cardNo
         * @author zc
         * @date 2023/7/24
         */
        public String getExistStr() {
            return this.roomNo + "&" + this.arrivalDate + "&" + this.cardNo;
        }

        /**
         * 拼接对比 OTA 的字符串
         *
         * @return 对比字符串
         * @author zc
         * @date 2023/07/25
         */
        public String getContrastOtaStr() {
            return this.arrivalDate + "&" + this.departureDate + "&" + (this.name == null ? "" : this.name.replaceAll("\\s", ""));
        }
    }