| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取库区封装信息 |
| | | * |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | public List<GroupDepotData> getDepotData(String companyId) { |
| | | |
| | | List<GroupDepotData> list = new ArrayList<>(); |
| | | GroupDepotData depotData; |
| | | List<Dept> deptList = deptService.getDeptByUserType(null); |
| | | if (null != deptList && !deptList.isEmpty()) { |
| | | List<Depot> depotList; |
| | | for (Dept dept : deptList) { |
| | | //统计仓库数 |
| | | depotList = depotService.getCacheDepotList(dept.getCompanyId(), dept.getId()); |
| | | if (null != depotList && !depotList.isEmpty()) { |
| | | for (Depot depot : depotList) { |
| | | depotData = new GroupDepotData(); |
| | | depotData.setDeptId(dept.getId()); |
| | | depotData.setDeptName(dept.getKqmc()); |
| | | depotData.setCode(dept.getXzqhdm()); |
| | | depotData.setCounty(dept.getXzqhmc()); |
| | | depotData.setDepotId(depot.getId()); |
| | | depotData.setDepotName(depot.getName()); |
| | | if (null == depot.getStorageReal()) { |
| | | depot.setStorageReal(0.0); |
| | | } |
| | | depotData.setStorageNum(depot.getStorageReal() / 1000); |
| | | list.add(depotData); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取库区下监控信息 |
| | | * |