打印修改
This commit is contained in:
@@ -134,7 +134,7 @@ public class PrintConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<TbPrintMachine> getPrintMachine(Integer shopId, String subType, String model) {
|
private List<TbPrintMachine> getPrintMachine(Integer shopId, String subType, String printMethod) {
|
||||||
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(shopId);
|
TbShopInfo shopInfo = tbShopInfoMapper.selectByPrimaryKey(shopId);
|
||||||
if (ObjectUtil.isEmpty(shopInfo)) {
|
if (ObjectUtil.isEmpty(shopInfo)) {
|
||||||
log.error("店铺信息不存在");
|
log.error("店铺信息不存在");
|
||||||
@@ -145,15 +145,13 @@ public class PrintConsumer {
|
|||||||
.eq(TbPrintMachine::getStatus, 1)
|
.eq(TbPrintMachine::getStatus, 1)
|
||||||
.eq(TbPrintMachine::getShopId, shopId)
|
.eq(TbPrintMachine::getShopId, shopId)
|
||||||
.eq(TbPrintMachine::getSubType, subType)
|
.eq(TbPrintMachine::getSubType, subType)
|
||||||
|
.eq(TbPrintMachine::getPrintMethod, printMethod)
|
||||||
.eq(TbPrintMachine::getConnectionType, "network"));
|
.eq(TbPrintMachine::getConnectionType, "network"));
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
log.error("店铺未配置打印机,店铺id: {}", shopId);
|
log.error("店铺未配置打印机,店铺id: {}", shopId);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
list = list.stream()
|
|
||||||
.filter(item -> StrUtil.isNotBlank(item.getPrintMethod())
|
|
||||||
&& model.equals(item.getPrintMethod())).collect(Collectors.toList());
|
|
||||||
log.info("打印机列表: {}", list);
|
log.info("打印机列表: {}", list);
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public abstract class PrinterHandler {
|
|||||||
c.getId().toString().equals(categoryId)
|
c.getId().toString().equals(categoryId)
|
||||||
).count();
|
).count();
|
||||||
|
|
||||||
if (count == 0) {
|
if (machine.getClassifyPrint() != null && "1".equals(machine.getClassifyPrint()) && count == 0) {
|
||||||
log.warn("分类未添加菜品: {} : {}", item.getProductName(), sku.getSpecSnap());
|
log.warn("分类未添加菜品: {} : {}", item.getProductName(), sku.getSpecSnap());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user