提交 a3b247a6 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 cd516725
...@@ -113,16 +113,26 @@ public class RfidController { ...@@ -113,16 +113,26 @@ public class RfidController {
@ApiOperation(value = "再次打印标签(已入库),未入库只能后台调打印", notes = "可以通过这个接口打印RFID") @ApiOperation(value = "再次打印标签(已入库),未入库只能后台调打印", notes = "可以通过这个接口打印RFID")
@PostMapping(value = "/print") @PostMapping(value = "/print")
@org.springframework.transaction.annotation.Transactional(rollbackFor = Exception.class)
public ResponseEntity printRfid(@RequestBody List<RfidPrintVo> rfid) { public ResponseEntity printRfid(@RequestBody List<RfidPrintVo> rfid) {
Map<String,DeviceLibrary> map = deviceLibraryService.getAllDeviceSeqMap(); Map<String,DeviceLibrary> map = deviceLibraryService.getAllDeviceSeqMap();
List<DeviceLogDto> deviceLogDtos = new ArrayList<>(); List<DeviceLogDto> deviceLogDtos = new ArrayList<>();
List<PrintVo> printVos = new ArrayList<>();
//调用打印服务 批量打印 //调用打印服务 批量打印
for (RfidPrintVo printVo : rfid) { for (RfidPrintVo printVo : rfid) {
DeviceLibrary deviceLibrary = map.get(printVo.getDeviceNumber()); DeviceLibrary deviceLibrary = map.get(printVo.getDeviceNumber());
PrintVo printVo1 = new PrintVo(RfidServiceImpl.completeRfidStr(String.valueOf(deviceLibrary.getId())), deviceLibrary.getModel(), deviceLibrary.getName(),deviceLibrary.getSeqNumber()); PrintVo printVo1 = new PrintVo(RfidServiceImpl.completeRfidStr(String.valueOf(deviceLibrary.getId())), deviceLibrary.getModel(), deviceLibrary.getName(),deviceLibrary.getSeqNumber());
rfidService.printString(Collections.singletonList(printVo1)); printVos.add(printVo1);
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "打印标签", null)); if ("".equals(deviceLibrary.getRfidCardId())) {
deviceLibrary.setRfidCardId(RfidServiceImpl.completeRfidStr(String.valueOf(deviceLibrary.getId())));
deviceLibraryService.update(deviceLibrary);
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "打印标签", null));
}
else {
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "更换标签", null));
}
} }
rfidService.printString(printVos.stream().sorted(Comparator.comparing(PrintVo::getRfidContent)).collect(Collectors.toList()));
deviceLogService.addAllLog(deviceLogDtos); deviceLogService.addAllLog(deviceLogDtos);
return ResultUtil.success("打印成功"); return ResultUtil.success("打印成功");
} }
......
...@@ -129,7 +129,7 @@ public class StorageBillSaveVo { ...@@ -129,7 +129,7 @@ public class StorageBillSaveVo {
storageBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles)); storageBillEntity.setApplyFiles(FilesUtil.stringFileToList(this.applyFiles));
} }
if(this.allotFiles!=null&&this.allotFiles.size()>0){ if(this.allotFiles!=null&&this.allotFiles.size()>0){
storageBillEntity.setAllotFiles(FilesUtil.stringFileToList(this.applyFiles)); storageBillEntity.setAllotFiles(FilesUtil.stringFileToList(this.allotFiles));
} }
return storageBillEntity; return storageBillEntity;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论