提交 f987d199 authored 作者: zhoushaopan's avatar zhoushaopan

fix(装备申请模块): 解决了修改序列号,装备数据找不到,解决了选中试用数量,全部试用都改变了

解决了修改序列号,装备数据找不到,解决了选中试用数量,全部试用都改变了
上级 97d88e93
......@@ -952,6 +952,13 @@ public class DeviceLibraryController {
return ResponseEntity.ok("更新成功");
}
@ApiOperation("根据装备id查询接口")
@PostMapping("findByIds")
public ResponseEntity findByIds(@RequestBody List<Integer> ids){
List<DeviceLibrary> byIds = deviceLibraryService.findByIds(ids);
return ResponseEntity.ok(byIds);
}
@ApiOperation(value = "根据装备id查询装备详情", notes = "根据装备id查询装备详情")
@PostMapping("/selectByIds1")
public List<DeviceNewVo> selectByIds1(@RequestBody DeviceSelectIdsVo deviceSelectIdsVo){
......
......@@ -671,25 +671,6 @@ public class StorageBillController {
});
}
}
List<DeviceLibrarySaveVo> deviceLibrarySaveVoList = storageBillSaveVo.getDeviceLibrarySaveVoList();
deviceLibrarySaveVoList.forEach(deviceLibrarySaveVo -> {
List<DeviceLibrary> deviceLibraries = deviceLibraryService.findAllByPackingId(deviceLibrarySaveVo.getPackingId());
deviceLibraries = deviceLibraries.stream().filter(deviceLibrary -> deviceLibrary.getTryOutDevice() == 1)
.collect(Collectors.toList());
if (deviceLibraries.size()>0){
//将装备试用的改为正式的
deviceLibraryService.updateTry(deviceLibraries);
List<DeviceLogDto> deviceLogDtoList = new ArrayList<>();
deviceLibraries.stream().map(DeviceLibrary::getId).collect(Collectors.toList()).forEach(integer -> {
DeviceLogDto deviceLogDto = new DeviceLogDto(integer,"试用装备改为正式装备",null);
deviceLogDtoList.add(deviceLogDto);
});
executor.execute(()->{
deviceLogService.addAllLog(deviceLogDtoList);
});
}
});
}
// if(storageBillSaveVo.getTryOutDevice() == 0){
// List<DeviceLibrarySaveVo> deviceLibrarySaveVoList = storageBillSaveVo.getDeviceLibrarySaveVoList();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论