提交 525a104c authored 作者: zhoushaopan's avatar zhoushaopan

fix(入库模块): 修改了打印入库,然后校验失败

修改了打印入库,然后校验失败
上级 6da02178
...@@ -125,11 +125,10 @@ public class MatchingDeviceController { ...@@ -125,11 +125,10 @@ public class MatchingDeviceController {
//当手动输入序列号的时候 需要进行遍历成集合 //当手动输入序列号的时候 需要进行遍历成集合
matchingDeviceSaveVos.forEach(matchingDeviceSaveVo -> { matchingDeviceSaveVos.forEach(matchingDeviceSaveVo -> {
// List<String> deviceSeqs = DeviceSeqUtil.createDeviceSeqs(matchingDeviceSaveVo.getSeqNumber(), matchingDeviceSaveVo.getStorageCount()); if (matchingDeviceSaveVo.getSeqList().isEmpty()){
// List<String> deviceSeqs = DeviceSeqUtil.getIntervalSeqsForMatchingDevice(matchingDeviceSaveVo.getSeqNumber());
List<String> deviceSeqs = DeviceSeqUtil.selectDeviceSeqsForMatchingDevice( matchingDeviceSaveVo.getSeqNumber()); List<String> deviceSeqs = DeviceSeqUtil.selectDeviceSeqsForMatchingDevice( matchingDeviceSaveVo.getSeqNumber());
// List<String> deviceSeqs = DeviceSeqUtil.selectDeviceSeqs(matchingDeviceSaveVo.getSeqNumber());
matchingDeviceSaveVo.setSeqList(deviceSeqs); matchingDeviceSaveVo.setSeqList(deviceSeqs);
}
}); });
//做校验 数量跟序列号 //做校验 数量跟序列号
matchingDeviceSaveVos.forEach(matchingDeviceSaveVo -> { matchingDeviceSaveVos.forEach(matchingDeviceSaveVo -> {
......
package com.tykj.dev.rfid.service.impl; package com.tykj.dev.rfid.service.impl;
import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import com.tykj.dev.device.library.service.DeviceLibraryService; import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary; import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.misc.exception.ApiException; import com.tykj.dev.misc.exception.ApiException;
...@@ -46,6 +47,9 @@ public class RfidServiceImpl implements RfidService { ...@@ -46,6 +47,9 @@ public class RfidServiceImpl implements RfidService {
private static ZebraPrinter printer; private static ZebraPrinter printer;
@Resource @Resource
private DeviceLibraryService deviceLibraryService; private DeviceLibraryService deviceLibraryService;
@Resource
private DeviceLibraryCacheService deviceLibraryCacheService;
/** /**
* 描述:设置打印机网络端口 * 描述:设置打印机网络端口
* *
...@@ -107,6 +111,9 @@ public class RfidServiceImpl implements RfidService { ...@@ -107,6 +111,9 @@ public class RfidServiceImpl implements RfidService {
throw new ApiException("打印机内容错误"); throw new ApiException("打印机内容错误");
} catch (IOException e) { } catch (IOException e) {
throw new ApiException("生成打印文件失败"); throw new ApiException("生成打印文件失败");
}finally {
log.info("未找到对应的打印机,需要更新缓存");
deviceLibraryCacheService.deletAllDeviceLibraryList();
} }
return true; return true;
} }
......
...@@ -438,8 +438,10 @@ public class StorageBillController { ...@@ -438,8 +438,10 @@ public class StorageBillController {
List<BackCreateSeqVo> backCreateSeqVos = new ArrayList<>(); List<BackCreateSeqVo> backCreateSeqVos = new ArrayList<>();
//当手动输入序列号的时候 需要进行遍历成集合 //当手动输入序列号的时候 需要进行遍历成集合
createSeqVos.forEach(createSeqVo -> { createSeqVos.forEach(createSeqVo -> {
if(createSeqVo.getSeqList().isEmpty()){
List<String> deviceSeqs = DeviceSeqUtil.selectDeviceSeqs(createSeqVo.getSeqInterval()); List<String> deviceSeqs = DeviceSeqUtil.selectDeviceSeqs(createSeqVo.getSeqInterval());
createSeqVo.setSeqList(deviceSeqs); createSeqVo.setSeqList(deviceSeqs);
}
}); });
//做校验 数量跟序列号 //做校验 数量跟序列号
createSeqVos.forEach(createSeqVo -> { createSeqVos.forEach(createSeqVo -> {
...@@ -491,7 +493,6 @@ public class StorageBillController { ...@@ -491,7 +493,6 @@ public class StorageBillController {
@ApiOperation(value = "添加入库单", notes = "可以通过这个接口发起入库业务") @ApiOperation(value = "添加入库单", notes = "可以通过这个接口发起入库业务")
@PostMapping(value = "/addStorageBill") @PostMapping(value = "/addStorageBill")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// @CacheEvict(value = "devicesLibraryList",key = "'device'",allEntries = true)
@UpdateCache @UpdateCache
public ResponseEntity addStorageBill(@RequestBody @Validated StorageBillSaveVo storageBillSaveVo) { public ResponseEntity addStorageBill(@RequestBody @Validated StorageBillSaveVo storageBillSaveVo) {
//是否申请业务导入 //是否申请业务导入
...@@ -946,12 +947,6 @@ public class StorageBillController { ...@@ -946,12 +947,6 @@ public class StorageBillController {
} }
} }
//异步去查询数据库
// executor.execute(
// ()->{
// cacheLibraryService.getAllDeviceLibraryList();
// }
// );
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
return ResultUtil.success(taskEntity1); return ResultUtil.success(taskEntity1);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论