package cn.superdesk.uniorder.dto.param.thirdpart.qchjc.accounting;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class QchjcAccountingScoreCustomerParam {
    @ApiModelProperty(value = "对账单-结算金额 - 之前的 - 取该对账单中所有积分类型为非`微信支付`的结算金额总和,目前创建对账单成功时服务端默认`微信支付`流水不参与结算,其他积分类型的流水参与结算,未来由业务操作人员选择结算积分类型来计算")
    @NotNull(message = "不能为空")
    @DecimalMin(value = "0",message = "金额需大于等于0.00")
    private BigDecimal accountingAmount;
    @ApiModelProperty(value = "对账单-编号")
    @NotBlank(message = "不能为空")
    private String accountingOrderSn;
    @ApiModelProperty(value = "对账状态:0-未确认;1-已确认;-1-已取消;")
    @NotNull(message = "不能为空")
    @Range(min = 1, max = 1,message = "只接收已对账的对账单同步，请检查对账单状态")
    private Integer accountingStatus;


    @ApiModelProperty(value = "系统信息-创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "不能为空")
    private Date createTime;
    @ApiModelProperty(value = "系统信息-创建人(申请人)Id")
    @NotNull(message = "不能为空")
    private String createUserId;
    @NotBlank(message = "不能为空")
    private String createUserName;

    @ApiModelProperty(value = "账单周期 基于(对映订单里四个时间):1-发货时间;2-下单时间;3-完成时间;4-结算时间;")
    @NotNull(message = "不能为空")
    private Integer dateType;
    @ApiModelProperty(value = "账单周期-开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "不能为空")
    private Date    startTime;
    @ApiModelProperty(value = "账单周期-结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "不能为空")
    private Date    endTime;

    @ApiModelProperty(value = "开票状态:0-未开票;1-已开票;2-部分开票;")
    @NotNull(message = "不能为空")
    @Range(min = 0,max = 0,message = "开票状态必须为待开票")
    private Integer invoiceStatus;

    @ApiModelProperty("订单dto为引用值 List<QchjcOrderDto>")
    @NotEmpty(message = "不能为空")
    @Valid
    private List<QchjcOrderParam> orderSelected;

    @ApiModelProperty(value = "支付状态:1-已支付;2-未支付;")
    @NotNull(message = "不能为空")
    @Range(max = 1, min = 1, message = "支付状态必须为已支付")
    private Integer payStatus;
    @ApiModelProperty(value = "对账单-购方信息-地址")
    private String purchaseAddress;
    @ApiModelProperty(value = "对账单-购方信息-邮箱")
    private String purchaseEmail;
    @ApiModelProperty(value = "对账单-购方信息-电话")
    private String purchasePhone;
    @ApiModelProperty(value = "对账单-购方信息-用户Id")
    private String purchaseUserId;
    @ApiModelProperty(value = "对账单-购方信息-实名或昵称-用于显示-非登陆用")
    private String purchaseUserName;
    @ApiModelProperty(value = "对账单-购方信息-所属企业Id")
    @NotNull(message = "不能为空")
    private String purchaseVirtId;
    @ApiModelProperty(value = "对账单-购方信息-所属企业名称")
    @NotBlank(message = "不能为空")
    private String purchaseVirtName;
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "对账单-订单金额 - 积分结算2.1 新加 取该对账单中所有流水的结算金额总和 等于 结算金额+微信金额 也称之为统计金额")
    @NotNull(message = "不能为空")
    @DecimalMin(value = "0", message = "金额需大于等于0.00")
    private BigDecimal statisticsTotalAmount;
    @ApiModelProperty(value = "对账单-微信金额 - 积分结算2.1 新加 取该对账单中所有积分类型为`微信支付`的结算金额总和 也称之为不对账金额 不结算金额")
    @DecimalMin(value = "0", message = "金额需大于等于0.00")
    private BigDecimal unAccountingAmount;
    @ApiModelProperty(value = "对账单-集采所有不对账金额总和")
    @NotNull(message = "不能为空")
    @DecimalMin(value = "0",message = "金额需大于等于0.00")
    private BigDecimal jcUnAccountingAmount;


    @ApiModelProperty(value = "系统信息-最后更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "不能为空")
    private Date updateTime;
    @ApiModelProperty(value = "系统信息-最后更新人Id")
    @NotNull(message = "不能为空")
    private String updateUserId;
    @NotBlank(message = "不能为空")
    private String updateUserName;
    @ApiModelProperty(value = "此对账单包含的所有发票单数量")
    @NotNull(message = "不能为空")
    private Integer invoiceCount;
    private Integer orderGoodsCount;
}