package com.bonus.canteen.core.order.android.dto;


import com.bonus.canteen.core.common.page.PageDTO;
import com.bonus.canteen.core.order.common.constants.DishesStateEnum;
import com.bonus.canteen.core.order.deprecated.constants.OrderStateOldEnum;

public class OrderCallQueryDTO extends PageDTO {
   private String machineSn;
   private Long stallId;
   private Integer mealtimeType;
   private Integer ordState;
   private Integer dishesState;

   public Integer getDishesState() {
      if (this.dishesState != null) {
         return this.dishesState;
      } else if (OrderStateOldEnum.MAKEING.getKey().equals(this.ordState)) {
         return DishesStateEnum.MAKING.getKey();
      } else if (OrderStateOldEnum.WAITTAKE.getKey().equals(this.ordState)) {
         return DishesStateEnum.WAIT_TAKE.getKey();
      } else {
         return OrderStateOldEnum.COMPLETE.getKey().equals(this.ordState) ? DishesStateEnum.ALREADY_TAKE.getKey() : null;
      }
   }

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

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

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

   public Integer getOrdState() {
      return this.ordState;
   }

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

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

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

   public void setOrdState(final Integer ordState) {
      this.ordState = ordState;
   }

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

}
