package com.bonus.canteen.core.order.web.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bonus.canteen.core.common.encrypt.HandleType;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptDataProcess;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptField;
import com.bonus.canteen.core.common.enums.DeliveryTypeEnum;
import com.bonus.canteen.core.common.utils.CustomNumberConverter;
import com.bonus.canteen.core.customer.constants.OrderTypeEnum;
import com.bonus.canteen.core.order.common.constants.DishesStateEnum;
import com.bonus.canteen.core.order.common.constants.OrderStateMixEnum;

import java.math.BigDecimal;
import java.time.LocalDate;

@LeNiuDecryptDataProcess
public class OrderDeliveryDetailVO {
   @ExcelProperty(
      value = {"订单号"},
      order = 1
   )
   private Long orderId;
   @ExcelProperty(
      value = {"订单类型"},
      order = 0,
      converter = OrderTypeEnum.ExcelConvertor.class
   )
   private Integer orderType;
   @ExcelProperty(
      value = {"就餐日期"},
      order = 0
   )
   private LocalDate orderDate;
   @ExcelIgnore
   private Integer mealtimeType;
   @ExcelProperty(
      value = {"餐次"},
      order = 1
   )
   private String mealtimeName;
   @ExcelIgnore
   private Long areaId;
   @ExcelProperty(
      value = {"所属区域"},
      order = 12
   )
   private String areaName;
   @ExcelIgnore
   private Long canteenId;
   @ExcelProperty(
      value = {"所属食堂"},
      order = 12
   )
   private String canteenName;
   @ExcelIgnore
   private Long stallId;
   @ExcelProperty(
      value = {"所属档口"},
      order = 13
   )
   private String stallName;
   @ExcelProperty(
      value = {"菜品明细"},
      order = 2
   )
   private String dishDetailStr;
   @ExcelProperty(
      value = {"订单金额"},
      order = 3,
      converter = CustomNumberConverter.class
   )
   private BigDecimal payableAmount;
   @ExcelProperty(
      value = {"配送费"},
      order = 4,
      converter = CustomNumberConverter.class
   )
   private BigDecimal deliveryAmount;
   @ExcelProperty(
      value = {"包装费"},
      order = 5,
      converter = CustomNumberConverter.class
   )
   private BigDecimal packingAmount;
   @ExcelProperty(
      value = {"实付金额"},
      order = 6,
      converter = CustomNumberConverter.class
   )
   private BigDecimal realAmount;
   @ExcelProperty(
      value = {"收货人姓名"},
      order = 7
   )
   private String consigneeName;
   @LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
   @ExcelProperty(
      value = {"收货人手机号"},
      order = 8
   )
   private String consigneeMobile;
   @ExcelProperty(
      value = {"收货人地址"},
      order = 9
   )
   private String consigneeAddress;
   @ExcelIgnore
   private Long operatorId;
   @ExcelProperty(
      value = {"订餐员"},
      order = 10
   )
   private String operatorName;
   @ExcelProperty(
      value = {"订餐员"},
      order = 10
   )
   private String operatorUserName;
   @LeNiuDecryptField
   @ExcelProperty(
      value = {"订餐员"},
      order = 10
   )
   private String operatorRealName;
   @ExcelProperty(
      value = {"配送方式"},
      order = 11,
      converter = DeliveryTypeEnum.ExcelConvertor.class
   )
   private Integer deliveryType;
   @ExcelProperty(
      value = {"配送员"},
      order = 12
   )
   private String deliveryName;
   /** @deprecated */
   @ExcelIgnore
   private Integer orderState;
   @ExcelIgnore
   private Integer payState;
   @ExcelIgnore
   private Integer orderRefundState;
   /** @deprecated */
   @ExcelProperty(
      value = {"配送状态"},
      order = 14,
      converter = DishesStateEnum.ExcelConvertor.class
   )
   private Integer deliveryState;
   @ExcelProperty(
      value = {"制作配送状态"},
      order = 14,
      converter = DishesStateEnum.ExcelConvertor.class
   )
   private Integer dishesState;
   @ExcelProperty(
      value = {"订单状态"},
      order = 13,
      converter = OrderStateMixEnum.ExcelConvertor.class
   )
   private Integer orderStateMix;
   @ExcelProperty(
      value = {"备注"},
      order = 15
   )
   private String remark;
   @ExcelProperty(
      value = {"流水号"},
      order = 16
   )
   private String mealCode;
   @ExcelProperty(
      value = {"取餐码"},
      order = 17
   )
   private String deliveryCode;

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

   public Integer getOrderStateMix() {
      return OrderStateMixEnum.mixStateBy(this.getOrderState(), this.getPayState(), this.getOrderRefundState());
   }

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

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

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

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

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

   public Long getAreaId() {
      return this.areaId;
   }

   public String getAreaName() {
      return this.areaName;
   }

   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 String getDishDetailStr() {
      return this.dishDetailStr;
   }

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

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

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

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

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

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

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

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

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

   public String getOperatorUserName() {
      return this.operatorUserName;
   }

   public String getOperatorRealName() {
      return this.operatorRealName;
   }

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

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

   /** @deprecated */
   @Deprecated
   public Integer getOrderState() {
      return this.orderState;
   }

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

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

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

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

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

   public String getDeliveryCode() {
      return this.deliveryCode;
   }

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

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

   public void setOrderDate(final LocalDate orderDate) {
      this.orderDate = orderDate;
   }

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

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

   public void setAreaId(final Long areaId) {
      this.areaId = areaId;
   }

   public void setAreaName(final String areaName) {
      this.areaName = areaName;
   }

   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 setDishDetailStr(final String dishDetailStr) {
      this.dishDetailStr = dishDetailStr;
   }

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

   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 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 setOperatorId(final Long operatorId) {
      this.operatorId = operatorId;
   }

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

   public void setOperatorUserName(final String operatorUserName) {
      this.operatorUserName = operatorUserName;
   }

   public void setOperatorRealName(final String operatorRealName) {
      this.operatorRealName = operatorRealName;
   }

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

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

   /** @deprecated */
   @Deprecated
   public void setOrderState(final Integer orderState) {
      this.orderState = orderState;
   }

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

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

   /** @deprecated */
   @Deprecated
   public void setDeliveryState(final Integer deliveryState) {
      this.deliveryState = deliveryState;
   }

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

   public void setOrderStateMix(final Integer orderStateMix) {
      this.orderStateMix = orderStateMix;
   }

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

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

   public void setDeliveryCode(final String deliveryCode) {
      this.deliveryCode = deliveryCode;
   }

}
