Commit 142f80f476f87fd7a4c298b2972a76534f0eaf2f
1 parent
a62a4d50
feat: 测试
Showing
1 changed file
with
7 additions
and
13 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -135,13 +135,6 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
135 | 135 | return warecellAllocationService.verticalWarehouseAllocation(warecellDomain); |
136 | 136 | } |
137 | 137 | |
138 | - | |
139 | - | |
140 | - | |
141 | - | |
142 | - | |
143 | - | |
144 | - | |
145 | 138 | @Override |
146 | 139 | @Transactional(rollbackFor = Exception.class) |
147 | 140 | public AjaxResult<?> verticalWarehouseAllocation(WarecellDomain warecellDomain) { |
... | ... | @@ -230,8 +223,8 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
230 | 223 | } |
231 | 224 | |
232 | 225 | // TODO inputOrOutPutMaterialcode |
233 | - locationCode = getNearestLocation(high,"",warehouseCode,""); | |
234 | - if(StrUtil.isBlank(locationCode)){ | |
226 | + locationCode = getNearestLocation(high, "", warehouseCode, ""); | |
227 | + if (StrUtil.isBlank(locationCode)) { | |
235 | 228 | locationCode = locationAllocationService.allocation(allocationRule, |
236 | 229 | locationTypeCodeList, high, area, roadWays, warehouseCode, containerCode, materialAreaCode); |
237 | 230 | } |
... | ... | @@ -332,15 +325,16 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
332 | 325 | |
333 | 326 | /** |
334 | 327 | * 统计物料出入库的频率,将常用的物料优先分配离出入口近的库区A |
335 | - * @param high 高度 | |
328 | + * | |
329 | + * @param high 高度 | |
336 | 330 | * @param materialAreaCode |
337 | 331 | * @param warehouseCode |
338 | 332 | * @param inputOrOutPutMaterialcode |
339 | 333 | * @return |
340 | 334 | */ |
341 | - private String getNearestLocation(int high,String materialAreaCode, | |
335 | + private String getNearestLocation(int high, String materialAreaCode, | |
342 | 336 | String warehouseCode, |
343 | - String inputOrOutPutMaterialcode){ | |
337 | + String inputOrOutPutMaterialcode) { | |
344 | 338 | Map<String, InventoryRankVO> inventoryRankMap = |
345 | 339 | inventoryTransactionService.getMaterialDetailByKey(INVENTORY_RANKING_KEY); |
346 | 340 | InventoryRankVO inputMaterialCode = inventoryRankMap.get(inputOrOutPutMaterialcode); |
... | ... | @@ -356,7 +350,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
356 | 350 | .eq(Location::getWarehouseCode, warehouseCode) |
357 | 351 | .orderByAsc(Location::getILayer).last(" limit 20")); |
358 | 352 | |
359 | - if(CollectionUtil.isNotEmpty(locationList)){ | |
353 | + if (CollectionUtil.isNotEmpty(locationList)) { | |
360 | 354 | LinkedList<Location> locationLinkedList = new LinkedList<>(locationList); |
361 | 355 | locationLinkedList.sort(Comparator.comparingInt(Location::getId)); |
362 | 356 | Location nearestLocation = locationLinkedList.pollFirst(); |
... | ... |