|
|
|
@ -119,12 +119,12 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
public IndexHandOrderDataVO handOrderData(IndexDTO indexDTO) { |
|
|
|
|
//增加缓存
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData"); |
|
|
|
|
IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(indexHandOrderDataVO)) { |
|
|
|
|
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData");
|
|
|
|
|
// IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key);
|
|
|
|
|
//
|
|
|
|
|
// if (Objects.isNull(indexHandOrderDataVO)) {
|
|
|
|
|
List<Long> warehouseIds = indexDTO.getWarehouseIds(); |
|
|
|
|
indexHandOrderDataVO = new IndexHandOrderDataVO(); |
|
|
|
|
IndexHandOrderDataVO indexHandOrderDataVO = new IndexHandOrderDataVO(); |
|
|
|
|
if (warehouseIds.isEmpty()) { |
|
|
|
|
return indexHandOrderDataVO; |
|
|
|
|
} |
|
|
|
@ -137,8 +137,8 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
//已打托数量
|
|
|
|
|
Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO); |
|
|
|
|
indexHandOrderDataVO.setTrayNum(trayNum); |
|
|
|
|
bladeRedis.setEx(key, indexHandOrderDataVO, 3600L); |
|
|
|
|
} |
|
|
|
|
// bladeRedis.setEx(key, indexHandOrderDataVO, 3600L);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return indexHandOrderDataVO; |
|
|
|
@ -148,13 +148,13 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
public IndexAllocationDataVO allocationData(IndexDTO indexDTO) { |
|
|
|
|
|
|
|
|
|
//增加缓存
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData"); |
|
|
|
|
IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(indexAllocationDataVO)) { |
|
|
|
|
// BladeUser user = AuthUtil.getUser();
|
|
|
|
|
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData");
|
|
|
|
|
// IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key);
|
|
|
|
|
//
|
|
|
|
|
// if (Objects.isNull(indexAllocationDataVO)) {
|
|
|
|
|
List<Long> warehouseIds = indexDTO.getWarehouseIds(); |
|
|
|
|
indexAllocationDataVO = new IndexAllocationDataVO(); |
|
|
|
|
IndexAllocationDataVO indexAllocationDataVO = new IndexAllocationDataVO(); |
|
|
|
|
if (warehouseIds.isEmpty()) { |
|
|
|
|
return indexAllocationDataVO; |
|
|
|
|
} |
|
|
|
@ -176,21 +176,21 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum); |
|
|
|
|
indexAllocationDataVO.setUpshelfNum(upshelfNum); |
|
|
|
|
indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum); |
|
|
|
|
bladeRedis.setEx(key, indexAllocationDataVO, 3600L); |
|
|
|
|
} |
|
|
|
|
// bladeRedis.setEx(key, indexAllocationDataVO, 3600L);
|
|
|
|
|
// }
|
|
|
|
|
return indexAllocationDataVO; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IndexTrunklineHandOrderDataVO trunklineHandOrderData(IndexDTO indexDTO) { |
|
|
|
|
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData"); |
|
|
|
|
IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(indexTrunklineHandOrderDataVO)) { |
|
|
|
|
// BladeUser user = AuthUtil.getUser();
|
|
|
|
|
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData");
|
|
|
|
|
// IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key);
|
|
|
|
|
//
|
|
|
|
|
// if (Objects.isNull(indexTrunklineHandOrderDataVO)) {
|
|
|
|
|
List<Long> warehouseIds = indexDTO.getWarehouseIds(); |
|
|
|
|
indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO(); |
|
|
|
|
IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO(); |
|
|
|
|
if (warehouseIds.isEmpty()) { |
|
|
|
|
return indexTrunklineHandOrderDataVO; |
|
|
|
|
} |
|
|
|
@ -212,8 +212,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
|
|
|
|
|
indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum); |
|
|
|
|
indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight)); |
|
|
|
|
indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return indexTrunklineHandOrderDataVO; |
|
|
|
|
} |
|
|
|
|