|
|
|
@ -1291,17 +1291,20 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (Func.isNotEmpty(i.getAllocations())) { |
|
|
|
|
|
|
|
|
|
String[] ids = i.getAllocations().split(","); |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids); |
|
|
|
|
|
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
if (i.getAllocationList() == null) { |
|
|
|
|
i.setAllocationList(new ArrayList<>()); |
|
|
|
|
if(!Func.isEmpty(ids)){ |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
if (i.getAllocationList() == null) { |
|
|
|
|
i.setAllocationList(new ArrayList<>()); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
i.getAllocationList().add(map); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
i.getAllocationList().add(map); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return list; |
|
|
|
@ -1335,17 +1338,19 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
HashSet<String> strings = new HashSet<String>(CollUtil.newArrayList(ids)); |
|
|
|
|
String res = strings.stream().map(Object::toString).collect(Collectors.joining(",")); |
|
|
|
|
String[] newIds = res.split(","); |
|
|
|
|
|
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(newIds); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
if (distributionStockupStockListVO.getAllocationList() == null) { |
|
|
|
|
distributionStockupStockListVO.setAllocationList(new ArrayList<>()); |
|
|
|
|
if(!Func.isEmpty(newIds)){ |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(newIds); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
if (distributionStockupStockListVO.getAllocationList() == null) { |
|
|
|
|
distributionStockupStockListVO.setAllocationList(new ArrayList<>()); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
distributionStockupStockListVO.getAllocationList().add(map); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
distributionStockupStockListVO.getAllocationList().add(map); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -6048,18 +6053,21 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (!Objects.isNull(detailVO.getAllocations())) { |
|
|
|
|
String allocations = detailVO.getAllocations(); |
|
|
|
|
String[] allocationIds = allocations.split(","); |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(allocationIds); |
|
|
|
|
if (!allocationInforByIds.isEmpty()) { |
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>(); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
mapList.add(map); |
|
|
|
|
if(!Func.isEmpty(allocationIds)){ |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(allocationIds); |
|
|
|
|
if (!allocationInforByIds.isEmpty()) { |
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>(); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
mapList.add(map); |
|
|
|
|
} |
|
|
|
|
detailVO.setAllocationList(mapList); |
|
|
|
|
} |
|
|
|
|
detailVO.setAllocationList(mapList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -6079,18 +6087,22 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
HashSet<String> strings = new HashSet<String>(CollUtil.newArrayList(ids)); |
|
|
|
|
String res = strings.stream().map(Object::toString).collect(Collectors.joining(",")); |
|
|
|
|
String[] newIds = res.split(","); |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(newIds); |
|
|
|
|
if (!allocationInforByIds.isEmpty()) { |
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>(); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
mapList.add(map); |
|
|
|
|
if(!Func.isEmpty(newIds)){ |
|
|
|
|
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(newIds); |
|
|
|
|
if (!allocationInforByIds.isEmpty()) { |
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>(); |
|
|
|
|
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("id", allocationInforById.getId()); |
|
|
|
|
map.put("name", allocationInforById.getQrCode()); |
|
|
|
|
mapList.add(map); |
|
|
|
|
} |
|
|
|
|
inventoryDetailVO.setAllocationList(mapList); |
|
|
|
|
} |
|
|
|
|
inventoryDetailVO.setAllocationList(mapList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|