Commit 4d040404 by 宁斌

1、自定義食品不能合併

parent 3e324138
......@@ -18,6 +18,7 @@ import com.gingersoft.gsa.cloud.common.utils.MoneyUtil;
import com.gingersoft.gsa.cloud.common.utils.time.TimeUtils;
import com.gingersoft.gsa.cloud.component.ComponentName;
import com.gingersoft.gsa.cloud.database.bean.Discount;
import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.order.bean.discount.CouponDiscountBean;
import com.gingersoft.gsa.cloud.order.bean.request.OrderDiscountRequest;
import com.gingersoft.gsa.cloud.order.bean.response.OrderDiscountResponse;
......@@ -1220,7 +1221,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
List<Integer> removeIndexs = new ArrayList<>();
for (int i = 0; i < foodList.size(); i++) {
OrderDetail orderFood = foodList.get(i);
if (!orderFood.isNew() || orderFood.getItemType() != 1) {
if (!orderFood.isNew() || orderFood.getItemType() != 1 || orderFood.getCustomType() != Food.CUSTOM_TYPE_100) {
continue;
}
if (hasChildFood(foodList, orderFood)) {
......
......@@ -267,6 +267,11 @@ public class OrderDetail implements Commodity, Serializable, Cloneable {
* 是否打印价格
*/
private long ktShowPrice;
/**
* 自定義类型 #100=不可自定义 #101=自定义食品名称及金额 #102=自定义食品金额
*/
private Integer customType;
public OrderDetail() {
}
......@@ -333,6 +338,7 @@ public class OrderDetail implements Commodity, Serializable, Cloneable {
this.cancelReason = orderDetail.cancelReason;
this.reasonId = orderDetail.reasonId;
this.cancelNumber = orderDetail.cancelNumber;
this.customType = orderDetail.customType;
}
public static long getSerialVersionUID() {
......@@ -852,6 +858,14 @@ public class OrderDetail implements Commodity, Serializable, Cloneable {
this.ktShowPrice = ktShowPrice;
}
public Integer getCustomType() {
return customType;
}
public void setCustomType(Integer customType) {
this.customType = customType;
}
/**
* @param type 是食品清單還是賬單 0清單 1賬單
* @param productnameBeans 訂單食品項
......@@ -1156,6 +1170,7 @@ public class OrderDetail implements Commodity, Serializable, Cloneable {
orderDetail.setPrintseting(food.getPrintSeting());
orderDetail.setIsfood(true);
orderDetail.setNew(true);
orderDetail.setCustomType(food.getCustomType());
orderDetail.setType(FOOD_TYPE);
orderDetail.setItemType(1);
orderDetail.setProp(FOOD_PROP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment