等叫菜小票打印
This commit is contained in:
@@ -53,6 +53,7 @@ public class TbOrderDetail implements Serializable {
|
||||
private Integer isMember;
|
||||
private Integer isTemporary;
|
||||
private Integer isThirdCoupon;
|
||||
private Integer isWaitCall;
|
||||
private Integer userCouponId;
|
||||
private String useCouponInfo;
|
||||
private BigDecimal canReturnAmount;
|
||||
|
||||
@@ -288,6 +288,10 @@ public class PrintMechineConsumer {
|
||||
tbOrderDetails.parallelStream().filter(o -> ObjectUtil.defaultIfNull(o.getIsPrint(), 0) == 1).forEach(it -> {
|
||||
log.info("开始打印一菜一品票据,:{}", it.getProductName());
|
||||
long count;
|
||||
Integer isWaitCall = ObjectUtil.defaultIfNull(it.getIsWaitCall(), 0);
|
||||
if(isWaitCall == 1) {
|
||||
it.setProductName("【等叫】" + it.getProductName());
|
||||
}
|
||||
if (it.getIsTemporary() == 1) {
|
||||
it.setProductId(0);
|
||||
it.setProductSkuId(0);
|
||||
@@ -505,6 +509,10 @@ public class PrintMechineConsumer {
|
||||
if (ObjectUtil.isNotEmpty(details) && details.size() > 0) {
|
||||
details.parallelStream().filter(o -> ObjectUtil.defaultIfNull(o.getIsPrint(), 0) == 1).forEach(it -> {
|
||||
long count = 0;
|
||||
Integer isWaitCall = ObjectUtil.defaultIfNull(it.getIsWaitCall(), 0);
|
||||
if(isWaitCall == 1) {
|
||||
it.setProductName("【等叫】" + it.getProductName());
|
||||
}
|
||||
if (it.getIsTemporary() == 1) {
|
||||
it.setProductId(0);
|
||||
it.setProductSkuId(0);
|
||||
|
||||
@@ -85,12 +85,18 @@ public abstract class PrinterHandler {
|
||||
private void onlyKitchen(TbPrintMachine machine, TbOrderInfo orderInfo, List<TbOrderDetail> tbOrderDetailList, List<CategoryInfo> categoryInfos, boolean isReturn) {
|
||||
tbOrderDetailList.parallelStream().filter(o -> ObjectUtil.defaultIfNull(o.getIsPrint(), 0) == 1).forEach(item -> {
|
||||
log.info("开始打印退单菜品,商品名:{}", item.getProductName());
|
||||
Integer isWaitCall = ObjectUtil.defaultIfNull(item.getIsWaitCall(), 0);
|
||||
if (isWaitCall == 1) {
|
||||
if (!item.getProductName().startsWith("【等叫】")) {
|
||||
item.setProductName("【等叫】" + item.getProductName());
|
||||
}
|
||||
}
|
||||
Integer isTemporary = ObjectUtil.defaultIfNull(item.getIsTemporary(), 0);
|
||||
String categoryId = "0";
|
||||
if (isTemporary == 1) {
|
||||
item.setProductId(0);
|
||||
item.setProductSkuId(0);
|
||||
if(!item.getProductName().startsWith("【临】")){
|
||||
if (!item.getProductName().startsWith("【临】")) {
|
||||
item.setProductName("【临】" + item.getProductName());
|
||||
}
|
||||
}
|
||||
@@ -108,7 +114,7 @@ public abstract class PrinterHandler {
|
||||
if (isTemporary == 0 && sku == null) {
|
||||
log.error("商品不存在, id: {}", item.getProductSkuId());
|
||||
return;
|
||||
} else if(isTemporary == 1){
|
||||
} else if (isTemporary == 1) {
|
||||
sku = new TbProductSkuWithBLOBs();
|
||||
}
|
||||
if (StrUtil.isEmpty(machine.getClassifyPrint())) {
|
||||
@@ -155,6 +161,10 @@ public abstract class PrinterHandler {
|
||||
remark = tbProductSkuWithBLOBs.getSpecSnap();
|
||||
}
|
||||
}
|
||||
Integer isWaitCall = ObjectUtil.defaultIfNull(it.getIsWaitCall(), 0);
|
||||
if (isWaitCall == 1) {
|
||||
it.setProductName("【等叫】" + it.getProductName());
|
||||
}
|
||||
if (isTemporary == 1) {
|
||||
it.setProductName("【临】" + it.getProductName());
|
||||
}
|
||||
|
||||
@@ -177,6 +177,10 @@ public class CloudPrinterService {
|
||||
if (ObjectUtil.isNotEmpty(details) && details.size() > 0) {
|
||||
details.parallelStream().filter(o -> ObjectUtil.defaultIfNull(o.getIsPrint(), 0) == 1).forEach(it -> {
|
||||
long count = 0;
|
||||
Integer isWaitCall = ObjectUtil.defaultIfNull(it.getIsWaitCall(), 0);
|
||||
if(isWaitCall == 1) {
|
||||
it.setProductName("【等叫】" + it.getProductName());
|
||||
}
|
||||
if (it.getIsTemporary() == 1) {
|
||||
it.setProductId(0);
|
||||
it.setProductSkuId(0);
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
<result column="price_amount" jdbcType="DECIMAL" property="priceAmount"/>
|
||||
<result column="pack_amount" jdbcType="DECIMAL" property="packAmount"/>
|
||||
<result column="is_temporary" jdbcType="INTEGER" property="isTemporary"/>
|
||||
<result column="is_wait_call" jdbcType="INTEGER" property="isWaitCall"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name,
|
||||
product_img, create_time, update_time, price, price_amount,status,pack_amount,return_num,is_temporary
|
||||
product_img, create_time, update_time, price, price_amount,status,pack_amount,return_num,is_temporary,is_wait_call
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
|
||||
Reference in New Issue
Block a user