diff --git a/app/build.gradle b/app/build.gradle index 17f80df..f19d456 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -158,6 +158,8 @@ dependencies { implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' implementation project(':sdk') + + implementation 'com.google.guava:guava:31.1-android' // Android 专用版本 } //自动添加X-Library依赖 apply from: 'x-library.gradle' diff --git a/app/src/main/java/com/bonus/canteen/activity/InitializationActivity.java b/app/src/main/java/com/bonus/canteen/activity/InitializationActivity.java index 37eb967..aefba55 100644 --- a/app/src/main/java/com/bonus/canteen/activity/InitializationActivity.java +++ b/app/src/main/java/com/bonus/canteen/activity/InitializationActivity.java @@ -256,7 +256,6 @@ public class InitializationActivity extends BaseActivity cookBookInfoList = gson.fromJson(mealList, new TypeToken>() { @@ -410,7 +409,7 @@ public class InitializationActivity extends BaseActivity orderDetailsListInfo = new ArrayList<>(); + Log.e("orderEntity",""+orderEntity.toString()); + String orderId = UUIDUtil.uuid().toString().replaceAll("-",""); + String macOrderId = orderEntity.getMacOrderId(); + Log.e("orderEntity orderId",""+orderId); + int sourceType = 20; + String qrCode = orderEntity.getQrCode(); //不为null 则为二维码支付 3 + String openid = orderEntity.getOpenid(); //不为null 则为人脸支付 2 + String serialNum = orderEntity.getSerialNum(); //不为null 则为刷卡支付 1 + + CustInfo custInfo = new CustInfo(); + if(serialNum != null){ + custInfo = AppDatabase.getDatabase(OperationActivity.this).custInfoDao().getCustInfoBySerialNum(serialNum); + }else{ + custInfo = AppDatabase.getDatabase(OperationActivity.this).custInfoDao().getCustInfoByCustId(orderEntity.getCustId()+""); + } + String orderDate = DateTimeHelper.getNowDate(); + DeviceBaseInfo deviceBaseInfo = AppDatabase.getDatabase(OperationActivity.this).deviceBaseDao().getDeviceBase().get(0); + List orderListEntities = orderEntity.getOrderList(); + //添加订单基础信息 + orderInfo.setOrderId(orderId); + orderInfo.setMacOrderId(orderEntity.getMacOrderId()); + orderInfo.setSourceType(sourceType+""); + orderInfo.setCustId(custInfo.getCustId()); + orderInfo.setCustName(custInfo.getCustName()); + orderInfo.setMobile(custInfo.getCustNum()); + orderInfo.setOrderDate(orderDate); + orderInfo.setCanteenId(deviceBaseInfo.getCanteenId()); + orderInfo.setCanteenName(deviceBaseInfo.getCanteenName()); + + + OrderListEntity orderList ; + if(orderListEntities !=null && orderListEntities.size()>0){ + orderList = orderListEntities.get(0); + List orderDetailsInfoList = orderList.getOrderDetailList(); + + + } + } + }); } /** diff --git a/app/src/main/java/com/bonus/canteen/activity/order/MachineSaleActivity.java b/app/src/main/java/com/bonus/canteen/activity/order/MachineSaleActivity.java index defced5..ff0aa6a 100644 --- a/app/src/main/java/com/bonus/canteen/activity/order/MachineSaleActivity.java +++ b/app/src/main/java/com/bonus/canteen/activity/order/MachineSaleActivity.java @@ -1,5 +1,6 @@ package com.bonus.canteen.activity.order; +import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; @@ -9,6 +10,7 @@ import android.widget.ListView; import android.widget.TextView; import com.alibaba.fastjson.JSONObject; +import com.bonus.canteen.activity.OperationActivity; import com.bonus.canteen.adapter.menu.utils.OkHttpService; import com.bonus.canteen.adapter.menu.utils.StringHelper; import com.bonus.canteen.adapter.menu.utils.ThreadPoolManager; @@ -19,6 +21,8 @@ import com.bonus.canteen.adapter.order.entity.OrderDetailAndroidVO; import com.bonus.canteen.adapter.order.entity.OrderListAndroidVO; import com.bonus.canteen.core.BaseActivity; import com.bonus.canteen.db.AppDatabase; +import com.bonus.canteen.db.entity.base.OrderDetailsInfo; +import com.bonus.canteen.db.entity.base.OrderInfo; import com.bonus.canteen.db.entity.user.CustInfo; import com.bonus.canteen.utils.Utils; import com.google.gson.Gson; @@ -118,8 +122,8 @@ public class MachineSaleActivity extends BaseActivity orderInfoList = AppDatabase.getDatabase(MachineSaleActivity.this).orderDao().getOrderInfoList(); + for(OrderInfo orderInfo:orderInfoList){ + List orderDetailsInfoList = AppDatabase.getDatabase(MachineSaleActivity.this).orderDetailsDao().getOrderInfoListByOrderId(orderInfo.getOrderId()); + orderInfo.setOrderDetailList(orderDetailsInfoList); + } + + if(orderInfoList !=null && orderInfoList.size()>0){ + Gson gson = new Gson(); + result = gson.toJson(orderInfoList); + }else{ + return; + } + } JSONObject jsonObject = JSONObject.parseObject(result); String onjData= jsonObject.getString("data"); JSONObject jsonRecords = JSONObject.parseObject(onjData); @@ -256,6 +276,9 @@ public class MachineSaleActivity extends BaseActivity getOrderInfoList(); + + @Query("select * from order_info where orderId =:orderId") + List getOrderInfoListByOrderId(String orderId); + + @Insert + void insert(OrderInfo orderInfo); // 插入数据 + + @Update + void update(OrderInfo orderInfo); // 更新数据 + + @Delete + void delete(OrderInfo orderInfo); // 删除数据 + + @Query("delete from order_info") + void deleteAll(); // 删除数据 + +} diff --git a/app/src/main/java/com/bonus/canteen/db/dao/base/OrderDetailsDao.java b/app/src/main/java/com/bonus/canteen/db/dao/base/OrderDetailsDao.java new file mode 100644 index 0000000..4f82b8d --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/db/dao/base/OrderDetailsDao.java @@ -0,0 +1,38 @@ +package com.bonus.canteen.db.dao.base; + + +import com.bonus.canteen.db.entity.base.OrderDetailsInfo; + +import java.util.List; + +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.Query; +import androidx.room.Update; + +@Dao +public interface OrderDetailsDao { + + @Query("select * from order_details_info") + List getOrderDetailsInfoList(); + + @Query("select * from order_details_info where detailId =:detailId") + OrderDetailsInfo getOrderInfoListByDetailIdId(String detailId); + + @Query("select * from order_details_info where orderId =:orderId") + List getOrderInfoListByOrderId(String orderId); + + @Insert + void insert(OrderDetailsInfo orderInfo); // 插入数据 + + @Update + void update(OrderDetailsInfo orderInfo); // 更新数据 + + @Delete + void delete(OrderDetailsInfo orderInfo); // 删除数据 + + @Query("delete from order_details_info") + void deleteAll(); // 删除数据 + +} diff --git a/app/src/main/java/com/bonus/canteen/db/dao/user/CustInfoDao.java b/app/src/main/java/com/bonus/canteen/db/dao/user/CustInfoDao.java index 13fb646..58ada79 100644 --- a/app/src/main/java/com/bonus/canteen/db/dao/user/CustInfoDao.java +++ b/app/src/main/java/com/bonus/canteen/db/dao/user/CustInfoDao.java @@ -14,7 +14,7 @@ import androidx.room.Update; @Dao public interface CustInfoDao { - @Query("select * from cust_info where custId = :custId") + @Query("select * from cust_info where custId = :custId limit 1") CustInfo getCustInfoByCustId(String custId); @Query("select * from cust_info ORDER BY id ") @@ -32,4 +32,8 @@ public interface CustInfoDao { @Delete void delete(CustInfo user); // 删除数据 + @Query("select * from cust_info where serialNum = :serialNum limit 1") + CustInfo getCustInfoBySerialNum(String serialNum); + + } diff --git a/app/src/main/java/com/bonus/canteen/db/entity/base/OrderDetailsInfo.java b/app/src/main/java/com/bonus/canteen/db/entity/base/OrderDetailsInfo.java new file mode 100644 index 0000000..d20e588 --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/db/entity/base/OrderDetailsInfo.java @@ -0,0 +1,283 @@ +package com.bonus.canteen.db.entity.base; + +import org.jetbrains.annotations.NotNull; + +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; + +@Entity(tableName = "order_details_info") +public class OrderDetailsInfo { + + @PrimaryKey + @NotNull + private String detailId;//订单菜品id(唯一标识) + + @ColumnInfo + private String orderId; + + @ColumnInfo + private String detailType;//类别:1 菜品 2 套餐 3 商品 4 按键 5 补扣 6 报餐 + + @ColumnInfo + private String goodsDishesId;//菜品id + + @ColumnInfo + private String goodsDishesName;//菜品名称 + + @ColumnInfo + private String goodsDishesImgUrl;//菜谱图片 + + @ColumnInfo + private String menuDetailId;//菜品详情id + + @ColumnInfo + private String salePrice;//ifOnline + + @ColumnInfo + private String prefPrice;//优惠价 + + @ColumnInfo + private String price;//菜品基础单价(分 + + @ColumnInfo + private String weightUnit;//每份重量 g + + @ColumnInfo + private String quantity;//数量/重量 + + @ColumnInfo + private String unitName;//单位 + + @ColumnInfo + private String totalAmount;//餐券制作总金额 + + @ColumnInfo + private String calcTotalAmount;//菜品实际应付款金额合计 单位为分 + + @ColumnInfo + private String realAmount;//实付金额 + + @ColumnInfo + private String refundAmount ="0"; //退款金额 + + @ColumnInfo + private String salesMode; //销售方式 1 按份 2 称重 + + @ColumnInfo + private String tasteName; //口味名称 多个值用,分隔 + + @ColumnInfo + private String detailState;//订单详情状态 1 正常 2 已退菜 3 部分退菜 + + @ColumnInfo + private String goodsRefundNum;//商品已退数量 + + @ColumnInfo + private String makingComplete; + + @NotNull + public String getDetailId() { + return detailId; + } + + public void setDetailId(@NotNull String detailId) { + this.detailId = detailId; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getDetailType() { + return detailType; + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getGoodsDishesId() { + return goodsDishesId; + } + + public void setGoodsDishesId(String goodsDishesId) { + this.goodsDishesId = goodsDishesId; + } + + public String getGoodsDishesName() { + return goodsDishesName; + } + + public void setGoodsDishesName(String goodsDishesName) { + this.goodsDishesName = goodsDishesName; + } + + public String getGoodsDishesImgUrl() { + return goodsDishesImgUrl; + } + + public void setGoodsDishesImgUrl(String goodsDishesImgUrl) { + this.goodsDishesImgUrl = goodsDishesImgUrl; + } + + public String getMenuDetailId() { + return menuDetailId; + } + + public void setMenuDetailId(String menuDetailId) { + this.menuDetailId = menuDetailId; + } + + public String getSalePrice() { + return salePrice; + } + + public void setSalePrice(String salePrice) { + this.salePrice = salePrice; + } + + public String getPrefPrice() { + return prefPrice; + } + + public void setPrefPrice(String prefPrice) { + this.prefPrice = prefPrice; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getWeightUnit() { + return weightUnit; + } + + public void setWeightUnit(String weightUnit) { + this.weightUnit = weightUnit; + } + + public String getQuantity() { + return quantity; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + + public String getUnitName() { + return unitName; + } + + public void setUnitName(String unitName) { + this.unitName = unitName; + } + + public String getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(String totalAmount) { + this.totalAmount = totalAmount; + } + + public String getCalcTotalAmount() { + return calcTotalAmount; + } + + public void setCalcTotalAmount(String calcTotalAmount) { + this.calcTotalAmount = calcTotalAmount; + } + + public String getRealAmount() { + return realAmount; + } + + public void setRealAmount(String realAmount) { + this.realAmount = realAmount; + } + + public String getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(String refundAmount) { + this.refundAmount = refundAmount; + } + + public String getSalesMode() { + return salesMode; + } + + public void setSalesMode(String salesMode) { + this.salesMode = salesMode; + } + + public String getTasteName() { + return tasteName; + } + + public void setTasteName(String tasteName) { + this.tasteName = tasteName; + } + + public String getDetailState() { + return detailState; + } + + public void setDetailState(String detailState) { + this.detailState = detailState; + } + + public String getGoodsRefundNum() { + return goodsRefundNum; + } + + public void setGoodsRefundNum(String goodsRefundNum) { + this.goodsRefundNum = goodsRefundNum; + } + + public String getMakingComplete() { + return makingComplete; + } + + public void setMakingComplete(String makingComplete) { + this.makingComplete = makingComplete; + } + + @Override + public String toString() { + return "OrderDetailsInfo{" + + "detailId='" + detailId + '\'' + + ", orderId='" + orderId + '\'' + + ", detailType='" + detailType + '\'' + + ", goodsDishesId='" + goodsDishesId + '\'' + + ", goodsDishesName='" + goodsDishesName + '\'' + + ", goodsDishesImgUrl='" + goodsDishesImgUrl + '\'' + + ", menuDetailId='" + menuDetailId + '\'' + + ", salePrice='" + salePrice + '\'' + + ", prefPrice='" + prefPrice + '\'' + + ", price='" + price + '\'' + + ", weightUnit='" + weightUnit + '\'' + + ", quantity='" + quantity + '\'' + + ", unitName='" + unitName + '\'' + + ", totalAmount='" + totalAmount + '\'' + + ", calcTotalAmount='" + calcTotalAmount + '\'' + + ", realAmount='" + realAmount + '\'' + + ", refundAmount='" + refundAmount + '\'' + + ", salesMode='" + salesMode + '\'' + + ", tasteName='" + tasteName + '\'' + + ", detailState='" + detailState + '\'' + + ", goodsRefundNum='" + goodsRefundNum + '\'' + + ", makingComplete='" + makingComplete + '\'' + + '}'; + } +} diff --git a/app/src/main/java/com/bonus/canteen/db/entity/base/OrderInfo.java b/app/src/main/java/com/bonus/canteen/db/entity/base/OrderInfo.java new file mode 100644 index 0000000..51c3388 --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/db/entity/base/OrderInfo.java @@ -0,0 +1,546 @@ +package com.bonus.canteen.db.entity.base; + +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.PrimaryKey; + +@Entity(tableName = "order_info") +public class OrderInfo { + @PrimaryKey + @NotNull + private String orderId;//订单id + @ColumnInfo + private String macOrderId;//macId + @ColumnInfo + private String sourceType;//来源 + @ColumnInfo + private String plateSerialNum;//餐盘物理卡号 + @ColumnInfo + private String plateNum;//餐盘号 + @ColumnInfo + private String custId;//人员id + @ColumnInfo + private String custName;//人员名称 + @ColumnInfo + private String custNum;//人员编号 + @ColumnInfo + private String mobile;// + @ColumnInfo + private String orderDate;//订单时间 + @ColumnInfo + private String canteenId;//食堂id + @ColumnInfo + private String canteenName;//试食堂名称 + @ColumnInfo + private String stallId;//档口id不能为空 + @ColumnInfo + private String stallName;//档口名称 + @ColumnInfo + private String permissionCode;//食堂档口权限码,格式:[食堂id]_[档口id] + @ColumnInfo + private String mealtimeType;//餐次类型 + @ColumnInfo + private String mealtimeName;//餐次类型名称 + @ColumnInfo + private String machineSn;//设备sn码 + @ColumnInfo + private String mealCode;//流水号前缀 + @ColumnInfo + private String payableAmount;//应付金额 分 + @ColumnInfo + private String discountsAmount = "0";//优惠金额 + @ColumnInfo + private String couponAmount = "0";//餐券金额 + @ColumnInfo + private String deliveryAmount = "0";//配送费 + @ColumnInfo + private String packingAmount = "0";//包装费 分 + @ColumnInfo + private String realAmount;//订单实付总金额 + @ColumnInfo + private String needPayAmount;//实际应付款金额 单位为分 + @ColumnInfo + private String refundAmount = "0"; + @ColumnInfo + private String orderTime;//下单时间 + @ColumnInfo + private String payTime;//支付时间 + @ColumnInfo + private String payType;//支付方式 + @ColumnInfo + private String payState;//支付状态 + @ColumnInfo + private String deductionType;//扣款类型 1 下单扣款 2 核销扣款 + @ColumnInfo + private String orderType;//订单类型 + @ColumnInfo + private String orderState;//订单状态 + + //(1, "已支付"), + //(9, "已取消"), + //(10, "已退单"), + //(11, "已完成"), + //(22, "未支付"), + //(23, "部分支付"), + //(24, "支付失败"), + //(25, "部分退单"), + //(26, "支付中"); + @ColumnInfo + private String orderStateMix; + + //(1, "待制作"), + //(2, "制作中"), + //(21, "待配送"), + //(22, "配送中"), + //(3, "待领取"), + //(4, "已领取"); + @ColumnInfo + private String dishesState; + @ColumnInfo + private String orderRefundState;//"订单退款状态 1 未申请 2 已退单 3 部分退单" + @ColumnInfo + private String commentState;//评价状态 1 已评价 2 未评价 + @ColumnInfo + private String checkState;//"审核状态 1 待审核 2 审核通过 3 审核失败 + @ColumnInfo + private String imgUrl; + @ColumnInfo + private String remark; + @ColumnInfo + private String goodsCount;//菜品总数量 + @ColumnInfo + private String ifOnline; //是否在线 + @ColumnInfo + private String payChannel = "1";//默认乐牛系统账户 详情PayChannelEnum + + @ColumnInfo + private String isPush; + + @Ignore + private List orderDetailList; + + @Override + public String toString() { + return "OrderInfo{" + + "orderId='" + orderId + '\'' + + ", macOrderId='" + macOrderId + '\'' + + ", sourceType='" + sourceType + '\'' + + ", plateSerialNum='" + plateSerialNum + '\'' + + ", plateNum='" + plateNum + '\'' + + ", custId='" + custId + '\'' + + ", custName='" + custName + '\'' + + ", custNum='" + custNum + '\'' + + ", mobile='" + mobile + '\'' + + ", orderDate='" + orderDate + '\'' + + ", canteenId='" + canteenId + '\'' + + ", canteenName='" + canteenName + '\'' + + ", stallId='" + stallId + '\'' + + ", stallName='" + stallName + '\'' + + ", permissionCode='" + permissionCode + '\'' + + ", mealtimeType='" + mealtimeType + '\'' + + ", mealtimeName='" + mealtimeName + '\'' + + ", machineSn='" + machineSn + '\'' + + ", mealCode='" + mealCode + '\'' + + ", payableAmount='" + payableAmount + '\'' + + ", discountsAmount='" + discountsAmount + '\'' + + ", couponAmount='" + couponAmount + '\'' + + ", deliveryAmount='" + deliveryAmount + '\'' + + ", packingAmount='" + packingAmount + '\'' + + ", realAmount='" + realAmount + '\'' + + ", needPayAmount='" + needPayAmount + '\'' + + ", refundAmount='" + refundAmount + '\'' + + ", orderTime='" + orderTime + '\'' + + ", payTime='" + payTime + '\'' + + ", payType='" + payType + '\'' + + ", payState='" + payState + '\'' + + ", deductionType='" + deductionType + '\'' + + ", orderType='" + orderType + '\'' + + ", orderState='" + orderState + '\'' + + ", orderStateMix='" + orderStateMix + '\'' + + ", dishesState='" + dishesState + '\'' + + ", orderRefundState='" + orderRefundState + '\'' + + ", commentState='" + commentState + '\'' + + ", checkState='" + checkState + '\'' + + ", imgUrl='" + imgUrl + '\'' + + ", remark='" + remark + '\'' + + ", goodsCount='" + goodsCount + '\'' + + ", ifOnline='" + ifOnline + '\'' + + ", payChannel='" + payChannel + '\'' + + ", isPush='" + isPush + '\'' + + ", orderDetailList=" + orderDetailList + + '}'; + } + + public String getIsPush() { + return isPush; + } + + public void setIsPush(String isPush) { + this.isPush = isPush; + } + + public List getOrderDetailList() { + return orderDetailList; + } + + public void setOrderDetailList(List orderDetailList) { + this.orderDetailList = orderDetailList; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getMacOrderId() { + return macOrderId; + } + + public void setMacOrderId(String macOrderId) { + this.macOrderId = macOrderId; + } + + public String getSourceType() { + return sourceType; + } + + public void setSourceType(String sourceType) { + this.sourceType = sourceType; + } + + public String getPlateSerialNum() { + return plateSerialNum; + } + + public void setPlateSerialNum(String plateSerialNum) { + this.plateSerialNum = plateSerialNum; + } + + public String getPlateNum() { + return plateNum; + } + + public void setPlateNum(String plateNum) { + this.plateNum = plateNum; + } + + public String getCustId() { + return custId; + } + + public void setCustId(String custId) { + this.custId = custId; + } + + public String getCustName() { + return custName; + } + + public void setCustName(String custName) { + this.custName = custName; + } + + public String getCustNum() { + return custNum; + } + + public void setCustNum(String custNum) { + this.custNum = custNum; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getOrderDate() { + return orderDate; + } + + public void setOrderDate(String orderDate) { + this.orderDate = orderDate; + } + + public String getCanteenId() { + return canteenId; + } + + public void setCanteenId(String canteenId) { + this.canteenId = canteenId; + } + + public String getCanteenName() { + return canteenName; + } + + public void setCanteenName(String canteenName) { + this.canteenName = canteenName; + } + + public String getStallId() { + return stallId; + } + + public void setStallId(String stallId) { + this.stallId = stallId; + } + + public String getStallName() { + return stallName; + } + + public void setStallName(String stallName) { + this.stallName = stallName; + } + + public String getPermissionCode() { + return permissionCode; + } + + public void setPermissionCode(String permissionCode) { + this.permissionCode = permissionCode; + } + + public String getMealtimeType() { + return mealtimeType; + } + + public void setMealtimeType(String mealtimeType) { + this.mealtimeType = mealtimeType; + } + + public String getMealtimeName() { + return mealtimeName; + } + + public void setMealtimeName(String mealtimeName) { + this.mealtimeName = mealtimeName; + } + + public String getMachineSn() { + return machineSn; + } + + public void setMachineSn(String machineSn) { + this.machineSn = machineSn; + } + + public String getMealCode() { + return mealCode; + } + + public void setMealCode(String mealCode) { + this.mealCode = mealCode; + } + + public String getPayableAmount() { + return payableAmount; + } + + public void setPayableAmount(String payableAmount) { + this.payableAmount = payableAmount; + } + + public String getDiscountsAmount() { + return discountsAmount; + } + + public void setDiscountsAmount(String discountsAmount) { + this.discountsAmount = discountsAmount; + } + + public String getCouponAmount() { + return couponAmount; + } + + public void setCouponAmount(String couponAmount) { + this.couponAmount = couponAmount; + } + + public String getDeliveryAmount() { + return deliveryAmount; + } + + public void setDeliveryAmount(String deliveryAmount) { + this.deliveryAmount = deliveryAmount; + } + + public String getPackingAmount() { + return packingAmount; + } + + public void setPackingAmount(String packingAmount) { + this.packingAmount = packingAmount; + } + + public String getRealAmount() { + return realAmount; + } + + public void setRealAmount(String realAmount) { + this.realAmount = realAmount; + } + + public String getNeedPayAmount() { + return needPayAmount; + } + + public void setNeedPayAmount(String needPayAmount) { + this.needPayAmount = needPayAmount; + } + + public String getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(String refundAmount) { + this.refundAmount = refundAmount; + } + + public String getOrderTime() { + return orderTime; + } + + public void setOrderTime(String orderTime) { + this.orderTime = orderTime; + } + + public String getPayTime() { + return payTime; + } + + public void setPayTime(String payTime) { + this.payTime = payTime; + } + + public String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType; + } + + public String getPayState() { + return payState; + } + + public void setPayState(String payState) { + this.payState = payState; + } + + public String getDeductionType() { + return deductionType; + } + + public void setDeductionType(String deductionType) { + this.deductionType = deductionType; + } + + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType; + } + + public String getOrderState() { + return orderState; + } + + public void setOrderState(String orderState) { + this.orderState = orderState; + } + + public String getOrderStateMix() { + return orderStateMix; + } + + public void setOrderStateMix(String orderStateMix) { + this.orderStateMix = orderStateMix; + } + + public String getDishesState() { + return dishesState; + } + + public void setDishesState(String dishesState) { + this.dishesState = dishesState; + } + + public String getOrderRefundState() { + return orderRefundState; + } + + public void setOrderRefundState(String orderRefundState) { + this.orderRefundState = orderRefundState; + } + + public String getCommentState() { + return commentState; + } + + public void setCommentState(String commentState) { + this.commentState = commentState; + } + + public String getCheckState() { + return checkState; + } + + public void setCheckState(String checkState) { + this.checkState = checkState; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getGoodsCount() { + return goodsCount; + } + + public void setGoodsCount(String goodsCount) { + this.goodsCount = goodsCount; + } + + public String getIfOnline() { + return ifOnline; + } + + public void setIfOnline(String ifOnline) { + this.ifOnline = ifOnline; + } + + public String getPayChannel() { + return payChannel; + } + + public void setPayChannel(String payChannel) { + this.payChannel = payChannel; + } +} diff --git a/app/src/main/java/com/bonus/canteen/entity/OrderDetailListEntity.java b/app/src/main/java/com/bonus/canteen/entity/OrderDetailListEntity.java new file mode 100644 index 0000000..113dacb --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/entity/OrderDetailListEntity.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.entity; + +public class OrderDetailListEntity { + + private int detailType; + + private long goodsDishesId; + + private String goodsDishesName; + + private long menuDetailId; + + private int quantity; + + private int salePrice; + + private int salesMode; + + private int weightUnit; + + public int getDetailType() { + return detailType; + } + + public void setDetailType(int detailType) { + this.detailType = detailType; + } + + public long getGoodsDishesId() { + return goodsDishesId; + } + + public void setGoodsDishesId(long goodsDishesId) { + this.goodsDishesId = goodsDishesId; + } + + public String getGoodsDishesName() { + return goodsDishesName; + } + + public void setGoodsDishesName(String goodsDishesName) { + this.goodsDishesName = goodsDishesName; + } + + public long getMenuDetailId() { + return menuDetailId; + } + + public void setMenuDetailId(long menuDetailId) { + this.menuDetailId = menuDetailId; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public int getSalePrice() { + return salePrice; + } + + public void setSalePrice(int salePrice) { + this.salePrice = salePrice; + } + + public int getSalesMode() { + return salesMode; + } + + public void setSalesMode(int salesMode) { + this.salesMode = salesMode; + } + + public int getWeightUnit() { + return weightUnit; + } + + public void setWeightUnit(int weightUnit) { + this.weightUnit = weightUnit; + } + + @Override + public String toString() { + return "orderDetailListEntity{" + + "detailType=" + detailType + + ", goodsDishesId=" + goodsDishesId + + ", goodsDishesName='" + goodsDishesName + '\'' + + ", menuDetailId=" + menuDetailId + + ", quantity=" + quantity + + ", salePrice=" + salePrice + + ", salesMode=" + salesMode + + ", weightUnit=" + weightUnit + + '}'; + } +} diff --git a/app/src/main/java/com/bonus/canteen/entity/OrderEntity.java b/app/src/main/java/com/bonus/canteen/entity/OrderEntity.java new file mode 100644 index 0000000..3dcd9c7 --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/entity/OrderEntity.java @@ -0,0 +1,144 @@ +package com.bonus.canteen.entity; + +import java.util.List; + +public class OrderEntity { + + private int amount; + + private int consumMode; + + private long custId; + + private int ifOnline; + + private String macOrderId; + + private int nuClearMode; + + private List orderList; + + private int orderType; + + private int payType; + + private String qrCode; + + private String openid; + + private String serialNum; + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public int getConsumMode() { + return consumMode; + } + + public void setConsumMode(int consumMode) { + this.consumMode = consumMode; + } + + public long getCustId() { + return custId; + } + + public void setCustId(long custId) { + this.custId = custId; + } + + public int getIfOnline() { + return ifOnline; + } + + public void setIfOnline(int ifOnline) { + this.ifOnline = ifOnline; + } + + public String getMacOrderId() { + return macOrderId; + } + + public void setMacOrderId(String macOrderId) { + this.macOrderId = macOrderId; + } + + public int getNuClearMode() { + return nuClearMode; + } + + public void setNuClearMode(int nuClearMode) { + this.nuClearMode = nuClearMode; + } + + public List getOrderList() { + return orderList; + } + + public void setOrderList(List orderList) { + this.orderList = orderList; + } + + public int getOrderType() { + return orderType; + } + + public void setOrderType(int orderType) { + this.orderType = orderType; + } + + public int getPayType() { + return payType; + } + + public void setPayType(int payType) { + this.payType = payType; + } + + public String getQrCode() { + return qrCode; + } + + public void setQrCode(String qrCode) { + this.qrCode = qrCode; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getSerialNum() { + return serialNum; + } + + public void setSerialNum(String serialNum) { + this.serialNum = serialNum; + } + + @Override + public String toString() { + return "OrderEntity{" + + "amount=" + amount + + ", consumMode=" + consumMode + + ", custId=" + custId + + ", ifOnline=" + ifOnline + + ", macOrderId='" + macOrderId + '\'' + + ", nuClearMode=" + nuClearMode + + ", orderList=" + orderList + + ", orderType=" + orderType + + ", payType=" + payType + + ", qrCode='" + qrCode + '\'' + + ", openid='" + openid + '\'' + + ", serialNum='" + serialNum + '\'' + + '}'; + } +} diff --git a/app/src/main/java/com/bonus/canteen/entity/OrderListEntity.java b/app/src/main/java/com/bonus/canteen/entity/OrderListEntity.java new file mode 100644 index 0000000..df69653 --- /dev/null +++ b/app/src/main/java/com/bonus/canteen/entity/OrderListEntity.java @@ -0,0 +1,122 @@ +package com.bonus.canteen.entity; + +import java.util.List; + +public class OrderListEntity { + + private long canteenId; + + private String canteenName; + + private int deliveryRelatedId; + + private String mealtimeName; + + private int mealtimeType; + + private List orderDetailList; + + private String orderTime; + + private int placeId; + + private long stallId; + + private String stallName; + + public long getCanteenId() { + return canteenId; + } + + public void setCanteenId(long canteenId) { + this.canteenId = canteenId; + } + + public String getCanteenName() { + return canteenName; + } + + public void setCanteenName(String canteenName) { + this.canteenName = canteenName; + } + + public int getDeliveryRelatedId() { + return deliveryRelatedId; + } + + public void setDeliveryRelatedId(int deliveryRelatedId) { + this.deliveryRelatedId = deliveryRelatedId; + } + + public String getMealtimeName() { + return mealtimeName; + } + + public void setMealtimeName(String mealtimeName) { + this.mealtimeName = mealtimeName; + } + + public int getMealtimeType() { + return mealtimeType; + } + + public void setMealtimeType(int mealtimeType) { + this.mealtimeType = mealtimeType; + } + + public List getOrderDetailList() { + return orderDetailList; + } + + public void setOrderDetailList(List orderDetailList) { + this.orderDetailList = orderDetailList; + } + + public String getOrderTime() { + return orderTime; + } + + public void setOrderTime(String orderTime) { + this.orderTime = orderTime; + } + + public int getPlaceId() { + return placeId; + } + + public void setPlaceId(int placeId) { + this.placeId = placeId; + } + + public long getStallId() { + return stallId; + } + + public void setStallId(long stallId) { + this.stallId = stallId; + } + + public String getStallName() { + return stallName; + } + + public void setStallName(String stallName) { + this.stallName = stallName; + } + + @Override + public String toString() { + return "OrderListEntity{" + + "canteenId=" + canteenId + + ", canteenName='" + canteenName + '\'' + + ", deliveryRelatedId=" + deliveryRelatedId + + ", mealtimeName='" + mealtimeName + '\'' + + ", mealtimeType=" + mealtimeType + + ", orderDetailList=" + orderDetailList + + ", orderTime='" + orderTime + '\'' + + ", placeId=" + placeId + + ", stallId=" + stallId + + ", stallName='" + stallName + '\'' + + '}'; + } +}