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