package com.bonus.core.order.common.vo;

import cn.hutool.core.bean.BeanUtil;
import com.bonus.core.common.utils.SysUtil;
import com.bonus.core.order.common.model.OrderInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

//@LeNiuDecryptDataProcess
public class OrderInfoVO {
   @ApiModelProperty("订单id")
   private Long orderId;
   @ApiModelProperty("设备订单号")
   private String macOrderId;
   @ApiModelProperty("设备sn")
   private String machineSn;
   @ApiModelProperty("设备编号")
   private String machineNum;
   @ApiModelProperty("托盘物理号")
   private String plateSerialNum;
   @ApiModelProperty("人员id")
   private Long custId;
//   @LeNiuDecryptField
   @ApiModelProperty("人员姓名")
   private String custName;
   @ApiModelProperty("点餐员id")
   private Long operatorId;
   @ApiModelProperty("点餐员姓名")
   private String operatorName;
   @ApiModelProperty("收银员id")
   private Long cashierId;
   @ApiModelProperty("收银员姓名")
   private String cashierName;
   @ApiModelProperty("核身方式 1 刷卡 2 刷脸 3 扫码")
   private Integer nuClearMode;
   @ApiModelProperty("消费模式 1 手动 2 定额 3 类别 4 当面付")
   private Integer consumMode;
   @ApiModelProperty("来源类型")
   private Integer sourceType;
   @ApiModelProperty("是否在线订单 1 是 2 否")
   private Integer ifOnline;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("食堂名称")
   private String canteenName;
   @ApiModelProperty("档口id")
   private Long stallId;
   @ApiModelProperty("档口名称")
   private String stallName;
   @ApiModelProperty("包间或餐桌 id")
   private Long roomId;
   @ApiModelProperty("包间或餐桌 名称")
   private String roomName;
   @ApiModelProperty("食堂档口权限码，格式：[食堂id]_[档口id]")
   private String permissionCode;
   @ApiModelProperty("餐次类型 1-早餐 2-午餐 3-下午茶 4-晚餐 5-夜宵")
   private Integer mealtimeType;
   @ApiModelProperty("餐次名称")
   private String mealtimeName;
   @ApiModelProperty("取餐码/叫号码 根据不同的配送类型生成")
   private String mealCode;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd"
   )
   @ApiModelProperty("订单日期 yyyy-MM-dd")
   private LocalDate orderDate;
   @ApiModelProperty("餐券id")
   private String couponId;
   @ApiModelProperty("应付金额  分")
   private BigDecimal payableAmount;
   @ApiModelProperty("优惠金额 分 (餐券抵扣金额不算优惠金额)")
   private BigDecimal discountsAmount;
   @ApiModelProperty("餐券抵扣金额 分")
   private BigDecimal couponAmount;
   @ApiModelProperty("配送费 分")
   private BigDecimal deliveryAmount;
   @ApiModelProperty("包装费 分")
   private BigDecimal packingAmount;
   @ApiModelProperty("实付金额 分")
   private BigDecimal realAmount;
   @ApiModelProperty("账户支付金额 分")
   private BigDecimal accPayAmount;
   @ApiModelProperty("外部支付金额 分（除账户外）")
   private BigDecimal outPayAmount;
   @ApiModelProperty("已退金额 分")
   private BigDecimal refundAmount;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   private LocalDateTime orderTime;
   @ApiModelProperty("订单类型 1 当餐 2 预订餐 3 报餐 4 商城 11 设备 12 自助餐 21 补扣 22 外部订单")
   private Integer orderType;
   @ApiModelProperty("订单状态 1 已下单 2 已完成 3 已取消")
   private Integer orderState;
   @ApiModelProperty("订单退款状态 1 未申请 2 已退单 3 部分退单")
   private Integer orderRefundState;
   @ApiModelProperty("扣款类型 1 下单扣款 2 核销扣款")
   private Integer deductionType;
   @DateTimeFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @ApiModelProperty("支付时间 yyyy-MM-dd HH:mm:ss")
   private LocalDateTime payTime;
   @ApiModelProperty("支付方式")
   private Integer payType;
   @ApiModelProperty("支付渠道")
   private Integer payChannel;
   @ApiModelProperty("支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付")
   private Integer payState;
   @ApiModelProperty("部分支付原因")
   private String partPayReason;
   @ApiModelProperty("支付参数  刷卡:卡号  扫码:二维码")
   private String payParam;
   @ApiModelProperty("配送方式")
   private Integer deliveryType;
   private Integer dishesState;
   @ApiModelProperty("评论状态 1 已评论 2 未评论")
   private Integer commentState;
   @ApiModelProperty("订单图片路径")
   private String imgUrl;
   @ApiModelProperty("订单备注")
   private String remark;
   private String custNum;
//   @LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
   private String mobile;
   private String orgFullName;
   private String custPhotoUrl;
   private Integer psnType;
   private String psnTypeName;
   @ApiModelProperty("收货人姓名")
   private String consigneeName;
   @ApiModelProperty("收货人手机号")
   private String consigneeMobile;
   @ApiModelProperty("收货人地址")
   private String consigneeAddress;
   @ApiModelProperty("位置id/取餐柜id")
   private Long deliveryRelatedId;
   @ApiModelProperty("配送人姓名")
   private String deliveryName;
   @ApiModelProperty("配送人手机号")
   private String deliveryMobile;
   @ApiModelProperty("订单详情列表")
   private List<OrderDetailVO> orderDetailList;

   public String getImgUrl() {
      return SysUtil.getCutFileUrl(this.imgUrl);
   }

   public String getCustPhotoUrl() {
      return SysUtil.getCutFileUrl(this.custPhotoUrl);
   }

   public static OrderInfoVO of(OrderInfo orderInfo) {
      return (OrderInfoVO)BeanUtil.copyProperties(orderInfo, OrderInfoVO.class, new String[0]);
   }

   public Long getOrderId() {
      return this.orderId;
   }

   public String getMacOrderId() {
      return this.macOrderId;
   }

   public String getMachineSn() {
      return this.machineSn;
   }

   public String getMachineNum() {
      return this.machineNum;
   }

   public String getPlateSerialNum() {
      return this.plateSerialNum;
   }

   public Long getCustId() {
      return this.custId;
   }

   public String getCustName() {
      return this.custName;
   }

   public Long getOperatorId() {
      return this.operatorId;
   }

   public String getOperatorName() {
      return this.operatorName;
   }

   public Long getCashierId() {
      return this.cashierId;
   }

   public String getCashierName() {
      return this.cashierName;
   }

   public Integer getNuClearMode() {
      return this.nuClearMode;
   }

   public Integer getConsumMode() {
      return this.consumMode;
   }

   public Integer getSourceType() {
      return this.sourceType;
   }

   public Integer getIfOnline() {
      return this.ifOnline;
   }

   public Long getCanteenId() {
      return this.canteenId;
   }

   public String getCanteenName() {
      return this.canteenName;
   }

   public Long getStallId() {
      return this.stallId;
   }

   public String getStallName() {
      return this.stallName;
   }

   public Long getRoomId() {
      return this.roomId;
   }

   public String getRoomName() {
      return this.roomName;
   }

   public String getPermissionCode() {
      return this.permissionCode;
   }

   public Integer getMealtimeType() {
      return this.mealtimeType;
   }

   public String getMealtimeName() {
      return this.mealtimeName;
   }

   public String getMealCode() {
      return this.mealCode;
   }

   public LocalDate getOrderDate() {
      return this.orderDate;
   }

   public String getCouponId() {
      return this.couponId;
   }

   public BigDecimal getPayableAmount() {
      return this.payableAmount;
   }

   public BigDecimal getDiscountsAmount() {
      return this.discountsAmount;
   }

   public BigDecimal getCouponAmount() {
      return this.couponAmount;
   }

   public BigDecimal getDeliveryAmount() {
      return this.deliveryAmount;
   }

   public BigDecimal getPackingAmount() {
      return this.packingAmount;
   }

   public BigDecimal getRealAmount() {
      return this.realAmount;
   }

   public BigDecimal getAccPayAmount() {
      return this.accPayAmount;
   }

   public BigDecimal getOutPayAmount() {
      return this.outPayAmount;
   }

   public BigDecimal getRefundAmount() {
      return this.refundAmount;
   }

   public LocalDateTime getOrderTime() {
      return this.orderTime;
   }

   public Integer getOrderType() {
      return this.orderType;
   }

   public Integer getOrderState() {
      return this.orderState;
   }

   public Integer getOrderRefundState() {
      return this.orderRefundState;
   }

   public Integer getDeductionType() {
      return this.deductionType;
   }

   public LocalDateTime getPayTime() {
      return this.payTime;
   }

   public Integer getPayType() {
      return this.payType;
   }

   public Integer getPayChannel() {
      return this.payChannel;
   }

   public Integer getPayState() {
      return this.payState;
   }

   public String getPartPayReason() {
      return this.partPayReason;
   }

   public String getPayParam() {
      return this.payParam;
   }

   public Integer getDeliveryType() {
      return this.deliveryType;
   }

   public Integer getDishesState() {
      return this.dishesState;
   }

   public Integer getCommentState() {
      return this.commentState;
   }

   public String getRemark() {
      return this.remark;
   }

   public String getCustNum() {
      return this.custNum;
   }

   public String getMobile() {
      return this.mobile;
   }

   public String getOrgFullName() {
      return this.orgFullName;
   }

   public Integer getPsnType() {
      return this.psnType;
   }

   public String getPsnTypeName() {
      return this.psnTypeName;
   }

   public String getConsigneeName() {
      return this.consigneeName;
   }

   public String getConsigneeMobile() {
      return this.consigneeMobile;
   }

   public String getConsigneeAddress() {
      return this.consigneeAddress;
   }

   public Long getDeliveryRelatedId() {
      return this.deliveryRelatedId;
   }

   public String getDeliveryName() {
      return this.deliveryName;
   }

   public String getDeliveryMobile() {
      return this.deliveryMobile;
   }

   public List<OrderDetailVO> getOrderDetailList() {
      return this.orderDetailList;
   }

   public void setOrderId(final Long orderId) {
      this.orderId = orderId;
   }

   public void setMacOrderId(final String macOrderId) {
      this.macOrderId = macOrderId;
   }

   public void setMachineSn(final String machineSn) {
      this.machineSn = machineSn;
   }

   public void setMachineNum(final String machineNum) {
      this.machineNum = machineNum;
   }

   public void setPlateSerialNum(final String plateSerialNum) {
      this.plateSerialNum = plateSerialNum;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

   public void setCustName(final String custName) {
      this.custName = custName;
   }

   public void setOperatorId(final Long operatorId) {
      this.operatorId = operatorId;
   }

   public void setOperatorName(final String operatorName) {
      this.operatorName = operatorName;
   }

   public void setCashierId(final Long cashierId) {
      this.cashierId = cashierId;
   }

   public void setCashierName(final String cashierName) {
      this.cashierName = cashierName;
   }

   public void setNuClearMode(final Integer nuClearMode) {
      this.nuClearMode = nuClearMode;
   }

   public void setConsumMode(final Integer consumMode) {
      this.consumMode = consumMode;
   }

   public void setSourceType(final Integer sourceType) {
      this.sourceType = sourceType;
   }

   public void setIfOnline(final Integer ifOnline) {
      this.ifOnline = ifOnline;
   }

   public void setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
   }

   public void setCanteenName(final String canteenName) {
      this.canteenName = canteenName;
   }

   public void setStallId(final Long stallId) {
      this.stallId = stallId;
   }

   public void setStallName(final String stallName) {
      this.stallName = stallName;
   }

   public void setRoomId(final Long roomId) {
      this.roomId = roomId;
   }

   public void setRoomName(final String roomName) {
      this.roomName = roomName;
   }

   public void setPermissionCode(final String permissionCode) {
      this.permissionCode = permissionCode;
   }

   public void setMealtimeType(final Integer mealtimeType) {
      this.mealtimeType = mealtimeType;
   }

   public void setMealtimeName(final String mealtimeName) {
      this.mealtimeName = mealtimeName;
   }

   public void setMealCode(final String mealCode) {
      this.mealCode = mealCode;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd"
   )
   public void setOrderDate(final LocalDate orderDate) {
      this.orderDate = orderDate;
   }

   public void setCouponId(final String couponId) {
      this.couponId = couponId;
   }

   public void setPayableAmount(final BigDecimal payableAmount) {
      this.payableAmount = payableAmount;
   }

   public void setDiscountsAmount(final BigDecimal discountsAmount) {
      this.discountsAmount = discountsAmount;
   }

   public void setCouponAmount(final BigDecimal couponAmount) {
      this.couponAmount = couponAmount;
   }

   public void setDeliveryAmount(final BigDecimal deliveryAmount) {
      this.deliveryAmount = deliveryAmount;
   }

   public void setPackingAmount(final BigDecimal packingAmount) {
      this.packingAmount = packingAmount;
   }

   public void setRealAmount(final BigDecimal realAmount) {
      this.realAmount = realAmount;
   }

   public void setAccPayAmount(final BigDecimal accPayAmount) {
      this.accPayAmount = accPayAmount;
   }

   public void setOutPayAmount(final BigDecimal outPayAmount) {
      this.outPayAmount = outPayAmount;
   }

   public void setRefundAmount(final BigDecimal refundAmount) {
      this.refundAmount = refundAmount;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setOrderTime(final LocalDateTime orderTime) {
      this.orderTime = orderTime;
   }

   public void setOrderType(final Integer orderType) {
      this.orderType = orderType;
   }

   public void setOrderState(final Integer orderState) {
      this.orderState = orderState;
   }

   public void setOrderRefundState(final Integer orderRefundState) {
      this.orderRefundState = orderRefundState;
   }

   public void setDeductionType(final Integer deductionType) {
      this.deductionType = deductionType;
   }

   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   public void setPayTime(final LocalDateTime payTime) {
      this.payTime = payTime;
   }

   public void setPayType(final Integer payType) {
      this.payType = payType;
   }

   public void setPayChannel(final Integer payChannel) {
      this.payChannel = payChannel;
   }

   public void setPayState(final Integer payState) {
      this.payState = payState;
   }

   public void setPartPayReason(final String partPayReason) {
      this.partPayReason = partPayReason;
   }

   public void setPayParam(final String payParam) {
      this.payParam = payParam;
   }

   public void setDeliveryType(final Integer deliveryType) {
      this.deliveryType = deliveryType;
   }

   public void setDishesState(final Integer dishesState) {
      this.dishesState = dishesState;
   }

   public void setCommentState(final Integer commentState) {
      this.commentState = commentState;
   }

   public void setImgUrl(final String imgUrl) {
      this.imgUrl = imgUrl;
   }

   public void setRemark(final String remark) {
      this.remark = remark;
   }

   public void setCustNum(final String custNum) {
      this.custNum = custNum;
   }

   public void setMobile(final String mobile) {
      this.mobile = mobile;
   }

   public void setOrgFullName(final String orgFullName) {
      this.orgFullName = orgFullName;
   }

   public void setCustPhotoUrl(final String custPhotoUrl) {
      this.custPhotoUrl = custPhotoUrl;
   }

   public void setPsnType(final Integer psnType) {
      this.psnType = psnType;
   }

   public void setPsnTypeName(final String psnTypeName) {
      this.psnTypeName = psnTypeName;
   }

   public void setConsigneeName(final String consigneeName) {
      this.consigneeName = consigneeName;
   }

   public void setConsigneeMobile(final String consigneeMobile) {
      this.consigneeMobile = consigneeMobile;
   }

   public void setConsigneeAddress(final String consigneeAddress) {
      this.consigneeAddress = consigneeAddress;
   }

   public void setDeliveryRelatedId(final Long deliveryRelatedId) {
      this.deliveryRelatedId = deliveryRelatedId;
   }

   public void setDeliveryName(final String deliveryName) {
      this.deliveryName = deliveryName;
   }

   public void setDeliveryMobile(final String deliveryMobile) {
      this.deliveryMobile = deliveryMobile;
   }

   public void setOrderDetailList(final List<OrderDetailVO> orderDetailList) {
      this.orderDetailList = orderDetailList;
   }
}
