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

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.NumberUtil;
import com.bonus.canteen.core.order.common.model.OrderInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

@ApiModel("打印信息Model")
public class NoticePrintInfoVO {
   private Long canteenId;
   private String canteenName;
   private String stallName;
   private String roomName;
   @ApiModelProperty("档口id")
   private Long stallId;
   private String mealtimeName;
   private String mealCode;
   private Long orderId;
   private String custName;
   private Integer sourceType;
   private LocalDate orderDate;
   private Integer orderRefundState;
   private Integer orderState;
   private BigDecimal payableAmount;
   private BigDecimal discountsAmount;
   private BigDecimal couponAmount;
   private BigDecimal dishesAmount;
   private BigDecimal realAmount;
   private BigDecimal refundAmount;
   private LocalDateTime orderTime;
   private Integer orderType;
   @ApiModelProperty("名称.规格.单价.数量.总价.营养信息(热量.蛋白质.脂肪.碳水物.纤维.胆固醇)")
   private List<NoticePrintDetailVO> printDetailList;
   private Integer deliveryType;
   private String consigneeMobile;
   private String consigneeAddress;
   private LocalDateTime deliveryTime;
   private BigDecimal deliveryAmount;
   private BigDecimal packingAmount;
   private String userName;
   private String operatorName;
   private String cashierName;
   private String remark;
   private String roomOrderPrintType;
   @ApiModelProperty("总单营养信息")
   private NoticePrintNutritionVO nutritionVO;

   public static NoticePrintInfoVO byOrder(OrderInfo orderInfo) {
      NoticePrintInfoVO vo = (NoticePrintInfoVO)BeanUtil.copyProperties(orderInfo, NoticePrintInfoVO.class, new String[0]);
      vo.setRealAmount(NumberUtil.sub(orderInfo.getRealAmount(), orderInfo.getRefundAmount()));
      vo.setPayableAmount(NumberUtil.sub(NumberUtil.add(new BigDecimal[]{orderInfo.getPayableAmount(), orderInfo.getDeliveryAmount(), orderInfo.getPackingAmount()}), orderInfo.getRefundAmount()));
      return vo;
   }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

   public BigDecimal getDishesAmount() {
      return this.dishesAmount;
   }

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

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

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

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

   public List<NoticePrintDetailVO> getPrintDetailList() {
      return this.printDetailList;
   }

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

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

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

   public LocalDateTime getDeliveryTime() {
      return this.deliveryTime;
   }

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

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

   public String getUserName() {
      return this.userName;
   }

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

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

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

   public String getRoomOrderPrintType() {
      return this.roomOrderPrintType;
   }

   public NoticePrintNutritionVO getNutritionVO() {
      return this.nutritionVO;
   }

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

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

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

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

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

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

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

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

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

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

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

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

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

   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 setDishesAmount(final BigDecimal dishesAmount) {
      this.dishesAmount = dishesAmount;
   }

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

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

   public void setOrderTime(final LocalDateTime orderTime) {
      this.orderTime = orderTime;
   }

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

   public void setPrintDetailList(final List<NoticePrintDetailVO> printDetailList) {
      this.printDetailList = printDetailList;
   }

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

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

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

   public void setDeliveryTime(final LocalDateTime deliveryTime) {
      this.deliveryTime = deliveryTime;
   }

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

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

   public void setUserName(final String userName) {
      this.userName = userName;
   }

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

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

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

   public void setRoomOrderPrintType(final String roomOrderPrintType) {
      this.roomOrderPrintType = roomOrderPrintType;
   }

   public void setNutritionVO(final NoticePrintNutritionVO nutritionVO) {
      this.nutritionVO = nutritionVO;
   }

}
