|
@@ -81,6 +81,12 @@ public class WInventoryManagementServiceImpl extends BaseServiceImpl implements
|
|
|
LambdaQueryWrapper<WShelfManagement> shelfWrapper= Wrappers.lambdaQuery(WShelfManagement.class).eq(WShelfManagement::getWarehouseManagementId,ware.getId());
|
|
|
List<WShelfManagement> wShelfManagementList = wShelfManagementDao.selectList(shelfWrapper);
|
|
|
shelfCount.addAndGet(wShelfManagementList.size());
|
|
|
+ AtomicInteger wareAllCount=new AtomicInteger(0);
|
|
|
+ AtomicInteger wareUserdCount=new AtomicInteger(0);
|
|
|
+ AtomicInteger wareLockCount=new AtomicInteger(0);
|
|
|
+ AtomicInteger warePreReservedCount=new AtomicInteger(0);
|
|
|
+ AtomicInteger wareNullPalletCount=new AtomicInteger(0);
|
|
|
+ AtomicInteger wareUnusedCount=new AtomicInteger(0);
|
|
|
wShelfManagementList.forEach(shelf->{
|
|
|
|
|
|
AtomicInteger allCount=new AtomicInteger(0);
|
|
@@ -125,16 +131,16 @@ public class WInventoryManagementServiceImpl extends BaseServiceImpl implements
|
|
|
if(CollectionUtil.isNotEmpty(wInventoryManagementDetailList)){
|
|
|
userdCount.addAndGet(1);
|
|
|
}
|
|
|
- if(small.getStorageLocationStatus() == Status.LOCKED.getCode()){
|
|
|
+ if(CollectionUtil.isNotEmpty(wInventoryManagementDetailList) &&small.getStorageLocationStatus() == Status.LOCKED.getCode()){
|
|
|
lockCount.addAndGet(1);
|
|
|
}
|
|
|
- if(small.getStorageLocationStatus() == Status.PRE_RESERVED.getCode()){
|
|
|
+ if(CollectionUtil.isNotEmpty(wInventoryManagementDetailList) &&small.getStorageLocationStatus() == Status.PRE_RESERVED.getCode()){
|
|
|
preReservedCount.addAndGet(1);
|
|
|
}
|
|
|
- if(small.getStorageLocationStatus() == Status.NULL_PALLET.getCode()){
|
|
|
+ if(CollectionUtil.isNotEmpty(wInventoryManagementDetailList) &&small.getStorageLocationStatus() == Status.NULL_PALLET.getCode()){
|
|
|
nullPalletCount.addAndGet(1);
|
|
|
}
|
|
|
- if(small.getStorageLocationStatus() == Status.UNUSED.getCode()){
|
|
|
+ if(CollectionUtil.isNotEmpty(wInventoryManagementDetailList) && small.getStorageLocationStatus() == Status.UNUSED.getCode()){
|
|
|
unusedCount.addAndGet(1);
|
|
|
}
|
|
|
|
|
@@ -183,24 +189,24 @@ public class WInventoryManagementServiceImpl extends BaseServiceImpl implements
|
|
|
shelf.setPreReservedCount(preReservedCount.get());
|
|
|
shelf.setUnuseCount(unusedCount.get());
|
|
|
shelf.setNullPalletCount(nullPalletCount.get());
|
|
|
- /*int used = allStorage.stream().filter(use -> use.getStorageLocationStatus() == Status.USED.getCode()).collect(Collectors.toList()).size();
|
|
|
- int unused = allStorage.stream().filter(use -> use.getStorageLocationStatus() == Status.UNUSED.getCode()).collect(Collectors.toList()).size();
|
|
|
- int nullPattet = allStorage.stream().filter(use -> use.getStorageLocationStatus() == Status.NULL_PALLET.getCode()).collect(Collectors.toList()).size();
|
|
|
- int lock = allStorage.stream().filter(use -> use.getStorageLocationStatus() == Status.LOCKED.getCode()).collect(Collectors.toList()).size();
|
|
|
- int preReserved = allStorage.stream().filter(use -> use.getStorageLocationStatus() == Status.PRE_RESERVED.getCode()).collect(Collectors.toList()).size();*/
|
|
|
-
|
|
|
-
|
|
|
- /*shelf.setUseCount(used);
|
|
|
- shelf.setUnuseCount(unused);
|
|
|
- shelf.setNullPalletCount(nullPattet);
|
|
|
- shelf.setLockCount(lock);
|
|
|
- shelf.setPreReservedCount(preReserved);*/
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+ wareAllCount.addAndGet(allCount.get());
|
|
|
+ wareUserdCount.addAndGet(userdCount.get());
|
|
|
+ wareLockCount.addAndGet(lockCount.get());
|
|
|
+ warePreReservedCount.addAndGet(preReservedCount.get());
|
|
|
+ wareNullPalletCount.addAndGet(nullPalletCount.get());
|
|
|
+ wareUnusedCount.addAndGet(unusedCount.get());
|
|
|
});
|
|
|
map.put("shelfList",wShelfManagementList);
|
|
|
+ map.put("wareCount",wWarehouseManagements.size());//库房数
|
|
|
+ map.put("shelfCount",shelfCount.get());//货架数
|
|
|
+
|
|
|
+ map.put("allCount",wareAllCount.get());//库位数
|
|
|
+ map.put("useCount",wareUserdCount.get());//已占用库位数
|
|
|
+ map.put("unuseCount",wareUnusedCount.get());//空库位数
|
|
|
+ map.put("nullPalletCount",wareNullPalletCount.get());//空托盘占用库位数
|
|
|
+ map.put("lockCount",wareLockCount.get());//锁定库位数
|
|
|
+ map.put("preReservedCount",warePreReservedCount.get());//预占用库位数
|
|
|
});
|
|
|
LambdaQueryWrapper<WStorageLocationManagement> allStorageWrapper= Wrappers.lambdaQuery(WStorageLocationManagement.class);
|
|
|
Long allStorageLocation = wStorageLocationManagementDao.selectCount(allStorageWrapper);
|
|
@@ -217,13 +223,7 @@ public class WInventoryManagementServiceImpl extends BaseServiceImpl implements
|
|
|
LambdaQueryWrapper<WStorageLocationManagement> lockStorageWrapper= Wrappers.lambdaQuery(WStorageLocationManagement.class).eq(WStorageLocationManagement::getStorageLocationStatus, Status.LOCKED.getCode());
|
|
|
Long lockStorageLocation = wStorageLocationManagementDao.selectCount(lockStorageWrapper);
|
|
|
|
|
|
- map.put("wareCount",wWarehouseManagements.size());//库房数
|
|
|
- map.put("shelfCount",shelfCount.get());//货架数
|
|
|
- map.put("allCount",allStorageLocation);//库位数
|
|
|
- map.put("useCount",useStorageLocation);//已占用库位数
|
|
|
- map.put("unuseCount",unuseStorageLocation);//空库位数
|
|
|
- map.put("nullPalletCount",nullPalletStorageLocation);//空托盘占用库位数
|
|
|
- map.put("lockCount",lockStorageLocation);//锁定库位数
|
|
|
+
|
|
|
|
|
|
return map;
|
|
|
}
|