打印机 单开

支付 就餐模式
This commit is contained in:
2026-04-03 16:58:35 +08:00
parent 23b089ca90
commit c39640ffde
3 changed files with 33 additions and 0 deletions

View File

@@ -60,6 +60,31 @@ public class PrintMachineController {
return CzgResult.success(page);
}
/**
* 打印机列表
* @param name 名称
* @return 打印机列表
*/
@GetMapping("/getPrintLocal")
public CzgResult<Page<PrintMachine>> getPrintLocal(String name, String subType) {
QueryWrapper queryWrapper = new QueryWrapper().eq(PrintMachine::getShopId, StpKit.USER.getShopId());
if (StrUtil.isNotBlank(name)) {
queryWrapper.like(PrintMachine::getName, name);
}
queryWrapper.in(PrintMachine::getConnectionType, "USB", "局域网");
if (StrUtil.isNotBlank(subType)) {
queryWrapper.eq(PrintMachine::getSubType, subType);
}
queryWrapper.orderBy(PrintMachine::getSort, true).orderBy(PrintMachine::getId, false);
Page<PrintMachine> page = printMachineService.page(PageUtil.buildPage(), queryWrapper);
page.getRecords().forEach(item -> {
if (StrUtil.isNotBlank(item.getCategoryIds())) {
item.setCategoryList(JSONArray.parse(item.getCategoryIds()));
}
});
return CzgResult.success(page);
}
/**
* 打印机详情
* @param id 打印机id