package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ssm.manage.entity.RechargeAccountGive;
import com.ssm.manage.entity.Salesman;
import com.ssm.manage.entity.UploadFiles;
import com.ssm.manage.page.BasePage;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.servlet.http.HttpSession;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class RefundOrderResquest extends BasePage {
    private Integer orderType;
    /**
     * 主键ID
     */
    @Id
    private Long id;
    private String strDate;
    private Long roleId;

    /**
     * 退款单据号
     */
    @Column(name = "refund_num")
    private String refundNum;

    /**
     * 类别0:充值/1:疗程/2:收银
     */
    private Integer type;

    /**
     * 退款单据时间
     */
    @Column(name = "refund_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundDate;

    /**
     * 门店编码
     */
    @Column(name = "store_id")
    private Long storeId;

    /**
     * 门店名称
     */
    @Column(name = "store_name")
    private String storeName;

    /**
     * 会员编码
     */
    @Column(name = "member_id")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(name = "member_name")
    private String memberName;

    /**
     * 会员身份证号
     */
    @Column(name = "member_identity_card")
    private String memberIdentityCard;

    /**
     * 手机
     */
    @Column(name = "mobile_phone")
    private String mobilePhone;

    /**
     * 退款金额
     */
    @Column(name = "refund_money")
    private BigDecimal refundMoney;

    /**
     * 补偿金额
     */
    private BigDecimal compensation;

    /**
     * 状态 0:添加/1:送审/2:回收/3:审核/4:反审核
     */
    private Integer state;





    /**
     * 实际退款金额
     */
    @Column(name = "actual_refund_money")
    private BigDecimal actualRefundMoney;

    /**
     * 充值退款金额
     */
    @Column(name = "rec_refund_money")
    private BigDecimal recRefundMoney;

    /**
     * 充值赠送退款金额
     */
    @Column(name = "refund_gift_money")
    private BigDecimal refundGiftMoney;

    /**
     * 疗程退款金额
     */
    @Column(name = "course_refund_money")
    private BigDecimal courseRefundMoney;

    /**
     * 来源单号
     */
    @Column(name = "source_doc_num")
    private String sourceDocNum;

    /**
     * 退款方式
     */
    @Column(name = "refund_type")
    private String refundType;

    /**
     * 退款账户
     */
    @Column(name = "refund_account")
    private String refundAccount;

    /**
     * 收款人
     */
    private String payee;

    /**
     * 退款原因
     */
    @Column(name = "refund_reason")
    private String refundReason;

    private String rechargeRequest;

    private String courseListRequest;

    private String cashRequestList;

    private String cashRoomRequestList;

    // 文件
    private List<MultipartFile> files;

    private List<UploadFiles> uploadFiles;
    private List<Salesman> salesmens;

    private String staffPhone;
    private HttpSession session;

    private String dateStr;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;


    private List<Long> storeList;

    /**
     * 查询方式，0=指定查询，1=自动查询
     */
    private Integer selectType;

    private List<RechargeAccountGive> rechargeAccountGiveList;
}
