打印修改

This commit is contained in:
2024-10-12 15:04:37 +08:00
parent 676daf9a8c
commit 0b68aa89d5
2 changed files with 3 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;
}