Browse Source

删除查询货位上的参数绑定

dev
pref_mail@163.com 1 month ago
parent
commit
15910f2446
  1. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionClientMessageServiceImpl.java
  3. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  4. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  5. 82
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseGoodsAllocationClient.java

@ -52,14 +52,14 @@ public interface IWarehouseGoodsAllocationClient {
* 跟新货位缓存
*/
@GetMapping(TOP+ "/updateAllocationCache")
Boolean updateAllocationCache(@RequestParam("ids") String ids);
Boolean updateAllocationCache(@RequestParam String ids);
/**
* 查询货位信息
*/
@GetMapping(TOP+ "/getAllocationInforByIds")
List<WarehouseGoodsAllocationEntity> getAllocationInforByIds(@RequestParam("ids") String [] ids);
List<WarehouseGoodsAllocationEntity> getAllocationInforByIds(@RequestParam String [] ids);
@GetMapping(TOP+ "/findByAllocationQrCode")

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionClientMessageServiceImpl.java

@ -93,7 +93,7 @@ public class DistributionClientMessageServiceImpl extends BaseServiceImpl<Distri
}
return true;
}
return null;
return false;
}
}

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3852,16 +3852,19 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionStockupStockListVO distributionStockupStockListVO = baseMapper.selectStockupStockListByStockListId(reservationId, id);
if (Func.isBlank(distributionStockupStockListVO.getAllocations())) {
String[] ids = distributionStockupStockListVO.getAllocations().split(",");
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids);
for (WarehouseGoodsAllocationEntity allocationInforById : allocationInforByIds) {
if (distributionStockupStockListVO.getAllocationList() == null) {
distributionStockupStockListVO.setAllocationList(new ArrayList<>());
if(!Func.isEmpty(ids)){
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids);
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);
}
}
return distributionStockupStockListVO;

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -1115,15 +1115,18 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
if (Func.isNotEmpty(locationStockListInformation)) {
List<String> collect = locationStockListInformation.stream().map(WarehouseUpdownGoodsEntity::getAllocationId).map(String::valueOf).collect(Collectors.toList());
String[] array = collect.stream().toArray(String[]::new);
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(array);
Map<Long, String> collected = allocationInforByIds.stream().collect(Collectors.toMap(WarehouseGoodsAllocationEntity::getId, WarehouseGoodsAllocationEntity::getQrCode));
for (WarehouseUpdownGoodsEntity updownGoodsEntity : locationStockListInformation) {
Map<String, Object> map = new HashMap<>();
map.put("allocationId", updownGoodsEntity.getAllocationId());
map.put("allocationName", collected.get(updownGoodsEntity.getAllocationId()));
map.put("handleQuantity", updownGoodsEntity.getNum());
mapList.add(map);
if(!Func.isEmpty(array)){
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(array);
Map<Long, String> collected = allocationInforByIds.stream().collect(Collectors.toMap(WarehouseGoodsAllocationEntity::getId, WarehouseGoodsAllocationEntity::getQrCode));
for (WarehouseUpdownGoodsEntity updownGoodsEntity : locationStockListInformation) {
Map<String, Object> map = new HashMap<>();
map.put("allocationId", updownGoodsEntity.getAllocationId());
map.put("allocationName", collected.get(updownGoodsEntity.getAllocationId()));
map.put("handleQuantity", updownGoodsEntity.getNum());
mapList.add(map);
}
}
}
return R.data(mapList);
}

82
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -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);
}
}
}

Loading…
Cancel
Save