提交 7599d7bd authored 作者: zhoushaopan's avatar zhoushaopan

fix(装备模块): 修复了bug

修复了bug
上级 ab9f7b9c
......@@ -1184,7 +1184,14 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if (!CollectionUtils.isEmpty(deviceIds)){
//添加装备日志
deviceIds.forEach(integer -> {
if (!updateStorageLocationVo.getStorageLocationId().equals(getOne(integer).getStorageLocationId())){
// if (updateStorageLocationVo.getStorageLocationId() != (getOne(integer).getStorageLocationId())){
// DeviceLogDto deviceLogDto= new DeviceLogDto(integer,"将存放位置修改为"+
// updateStorageLocationVo.getStorageLocation(),null,userId);
// deviceLogDtos.add(deviceLogDto);
// }});
Integer storageLocationId = updateStorageLocationVo.getStorageLocationId();
Integer dataStorageLocationId = getOne(integer).getStorageLocationId();
if (storageLocationId == null ? dataStorageLocationId == null : storageLocationId.equals(dataStorageLocationId)){
DeviceLogDto deviceLogDto= new DeviceLogDto(integer,"将存放位置修改为"+
updateStorageLocationVo.getStorageLocation(),null,userId);
deviceLogDtos.add(deviceLogDto);
......@@ -1284,8 +1291,12 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
DeviceLibrarySelectVo deviceLibrarySelectVo = new DeviceLibrarySelectVo();
BeanUtils.copyProperties(queryTheWarehouseVo,deviceLibrarySelectVo);
PredicateBuilder<DeviceLibrary> predicateBuilder = getPredicateBuilder(deviceLibrarySelectVo);
Specification<DeviceLibrary> or =
predicateBuilder.build().or(getPredicateBuilder2(deviceLibrarySelectVo.getNonStorageLocationId()).build());
Specification<DeviceLibrary> or = null;
if (deviceLibrarySelectVo.getNonStorageLocationId()!=null){
or = predicateBuilder.build().or(getPredicateBuilder2(deviceLibrarySelectVo.getNonStorageLocationId()).build());
}else {
or = predicateBuilder.build();
}
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.findAll(or);
deviceLibraries.forEach(DeviceLibrary::setConfigName);
//拿到所有的装备id
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论