Commit 8d63721619a3d4122297abf11b08fe378e2f34fa
1 parent
4219a604
fix:解决立库库位管理导出报错;
Showing
1 changed file
with
11 additions
and
7 deletions
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
... | ... | @@ -462,7 +462,7 @@ public class LocationController extends BaseController { |
462 | 462 | .orderByDesc(Location::getId); |
463 | 463 | |
464 | 464 | //获取库位对应的库龄map |
465 | - Map<String, LocationAge>locationAgeMap=locationService.getLkLocationAgeMap(); | |
465 | + Map<String, LocationAge> locationAgeMap=locationService.getLkLocationAgeMap(); | |
466 | 466 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { |
467 | 467 | /*使用分页查询*/ |
468 | 468 | Page<Location> page = new Page<>(pageNum, pageSize); |
... | ... | @@ -473,9 +473,11 @@ public class LocationController extends BaseController { |
473 | 473 | Container container = containerService.getContainerByCode(l.getContainerCode(), ShiroUtils.getWarehouseCode()); |
474 | 474 | l.setContainerHigh(container.getHeight()); |
475 | 475 | LocationAge locationAge =locationAgeMap.get(l.getCode()); |
476 | - l.setAge(locationAge.getAge()); | |
477 | - l.setCompanyCode(locationAge.getCompanyCode()); | |
478 | - l.setUWarehouseCode(locationAge.getUWarehouseCode()); | |
476 | + if(locationAge!=null){ | |
477 | + l.setAge(locationAge.getAge()); | |
478 | + l.setCompanyCode(locationAge.getCompanyCode()); | |
479 | + l.setUWarehouseCode(locationAge.getUWarehouseCode()); | |
480 | + } | |
479 | 481 | } |
480 | 482 | } |
481 | 483 | ); |
... | ... | @@ -496,9 +498,11 @@ public class LocationController extends BaseController { |
496 | 498 | Container container = containerService.getContainerByCode(l.getContainerCode(), ShiroUtils.getWarehouseCode()); |
497 | 499 | l.setContainerHigh(container.getHeight()); |
498 | 500 | LocationAge locationAge =locationAgeMap.get(l.getCode()); |
499 | - l.setAge(locationAge.getAge()); | |
500 | - l.setCompanyCode(locationAge.getCompanyCode()); | |
501 | - l.setUWarehouseCode(locationAge.getUWarehouseCode()); | |
501 | + if(locationAge!=null){ | |
502 | + l.setAge(locationAge.getAge()); | |
503 | + l.setCompanyCode(locationAge.getCompanyCode()); | |
504 | + l.setUWarehouseCode(locationAge.getUWarehouseCode()); | |
505 | + } | |
502 | 506 | } |
503 | 507 | } |
504 | 508 | ); |
... | ... |