package com.ssm.manage.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ssm.manage.page.BasePage;
import com.ssm.manage.utils.DateUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

@Setter
@Getter
@ToString
public class StoreDailyRequest extends BasePage {
    private String docId;
    private List<Long> cashIds;
    private Long storeId;
    private Long roleId;
    private String dateStr;
    private Integer isCancel;
    private Integer state;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

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

    @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 Date cashDate;
//    private Date rechargeDate;

    //收银单人头数
    private Integer cashPeopleNum;
    //收银服务金额
    private BigDecimal cashMoney;
    //充值金额
    private BigDecimal rechargeMoney;
    //充值单数
    private Integer rechargeOrderNum;
    //还款金额
    private BigDecimal repayMoney;
    //退款金额
    private BigDecimal refundMoney;
    //新会员数(当天新增会员数)
    private Integer newMemberNum;
    //会员总数
    private Integer memberNum;
    //充值负卡金结存金额
    private BigDecimal recNegativeMoney;
    //0上月 1昨天 2当天 3本月
    private Integer type;
    //总店查询所有分店时使用
    private List<Long> storeIds;
    //是否总店 1是 其他不是
    private Integer isHead;

    private List<String> ids;

    //汇总查询门店id
    private List<Long> selectStoreIds;


    private String tableDate;


    @JsonIgnore
    public String getTab(){
        return DateUtils.YMFormat(date);
    }
}
