PC打印机根据打印机类型 获取列表
This commit is contained in:
parent
baedf85e77
commit
39a5096151
|
|
@ -37,6 +37,17 @@ public class TbPrintPCMachineController {
|
|||
return tbPrintPCMachineService.queryByPage(tbPrintMachine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据类型查询打印机列表
|
||||
* subType 打印类型(分类)label标签cash小票kitchen出品
|
||||
* connectionType local
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/bySubType")
|
||||
public Result queryBySubType(TbPrintPCMachine tbPrintPCMachine) {
|
||||
return tbPrintPCMachineService.queryBySubType(tbPrintPCMachine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -79,6 +79,22 @@ public class TbPrintPCMachineService {
|
|||
return Result.success(CodeEnum.SUCCESS, pageInfo);
|
||||
}
|
||||
|
||||
public Result queryBySubType(TbPrintPCMachine tbPrintMachine) {
|
||||
tbPrintMachine.setStatus(1);
|
||||
List<TbPrintPCMachine> tbPrintMachines = tbPrintMachineMapper.queryAll(tbPrintMachine);
|
||||
|
||||
List<PrintMachineDto> printMachineList = new ArrayList<>();
|
||||
for (TbPrintPCMachine printMachine : tbPrintMachines) {
|
||||
PrintMachineDto tbPrintMachineVO = new PrintMachineDto();
|
||||
if (StringUtils.isNotBlank(printMachine.getConfig())) {
|
||||
tbPrintMachineVO.setConfig(JSON.parseObject(printMachine.getConfig(), PrintConfig.class));
|
||||
}
|
||||
BeanUtils.copyProperties(printMachine, tbPrintMachineVO);
|
||||
printMachineList.add(tbPrintMachineVO);
|
||||
}
|
||||
return Result.success(CodeEnum.SUCCESS, printMachineList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue