| | |
| | | } |
| | | |
| | | /** |
| | | * 根据当前廒间编码获取下属所有仓库信息 |
| | | * @param companyId |
| | | * @param ajdh |
| | | * @return |
| | | */ |
| | | public List<Depot> getCacheByAjdn(String companyId, String ajdh) { |
| | | //若仓库未配置仓房编码,则直接返回对应仓库 |
| | | List<Depot> list = getCacheDepotList(companyId); |
| | | |
| | | if(null == list || list.isEmpty()){ |
| | | return null; |
| | | } |
| | | List<Depot> result = new ArrayList<>(); |
| | | for (Depot depot : list) { |
| | | if (StringUtils.isNotEmpty(depot.getGranaryId()) && ajdh.equals(depot.getGranaryId())) { |
| | | result.add(depot); |
| | | } |
| | | } |
| | | //重新排序 |
| | | Collections.sort(result, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 根据库存信息更新仓库信息 |
| | | * @param data |
| | | */ |