校验店铺全局餐位费
This commit is contained in:
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||
import com.chaozhanggui.system.cashierservice.entity.Enum.OrderUseTypeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.entity.Enum.PlatformTypeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.entity.Enum.ShopInfoEatModelEnum;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.*;
|
||||
@@ -145,12 +146,19 @@ public class ProductService {
|
||||
ConcurrentMap<String, Object> concurrentMap = new ConcurrentHashMap<>();
|
||||
|
||||
// 获取当前台桌最新订单id
|
||||
ShopEatTypeInfoDTO shopEatTypeInfoDTO = shopUtils.checkEatModel(code, shopInfo.getId());
|
||||
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
|
||||
ShopEatTypeInfoDTO shopEatTypeInfoDTO = shopUtils.getEatModel(code, shopInfo.getId());
|
||||
if (tbShopTable != null) {
|
||||
tbShopTable.setOrderId(order == null ? null : order.getId());
|
||||
TbCashierCart seatCartInfo = getSeatCartInfo(tbShopTable.getShopId(), tbShopTable.getQrcode(), Integer.valueOf(userId), shopEatTypeInfoDTO);
|
||||
tbShopTable.setChoseCount((shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee().equals(1)) || (seatCartInfo != null && (seatCartInfo.getNumber() != null)));
|
||||
if (shopEatTypeInfoDTO.isOpenDineIn()) {
|
||||
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
|
||||
tbShopTable.setOrderId(order == null ? null : order.getId());
|
||||
TbCashierCart seatCartInfo = getSeatCartInfo(tbShopTable.getShopId(), tbShopTable.getQrcode(), Integer.valueOf(userId), shopEatTypeInfoDTO);
|
||||
tbShopTable.setChoseCount((shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee().equals(1)) || (seatCartInfo != null && (seatCartInfo.getNumber() != null)));
|
||||
}else {
|
||||
shopEatTypeInfoDTO.setUseType(OrderUseTypeEnum.TAKEOUT.getValue());
|
||||
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
|
||||
tbShopTable.setOrderId(order == null ? null : order.getId());
|
||||
tbShopTable.setChoseCount(true);
|
||||
}
|
||||
}
|
||||
|
||||
concurrentMap.put("shopTableInfo", tbShopTable == null ? "" : tbShopTable);
|
||||
|
||||
Reference in New Issue
Block a user