| | |
| | | idleCount += assetMain.getQuantity(); |
| | | }else if (assetMain.getAssetStatus().contains("使用中")){ |
| | | useCount += assetMain.getQuantity(); |
| | | }else if (assetMain.getAssetStatus().contains("损坏") || assetMain.getAssetStatus().contains("报废")){ |
| | | }else if (assetMain.getAssetStatus().contains("损") || assetMain.getAssetStatus().contains("废")){ |
| | | disposeCount += assetMain.getQuantity(); |
| | | }else{ |
| | | otherCount += assetMain.getQuantity(); |
| | |
| | | PageInfo<AssetStatisticsDetailVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<AssetStatisticsDetailVO> list = this.baseMapper.pageListInventoryDetail(query,pageInfo); |
| | | List<AssetType> assetTypes = assetTypeService.list(); |
| | | Map<Integer, AssetType> typeMap = assetTypes.stream().collect(Collectors.toMap(AssetType::getId, e -> e)); |
| | | for (AssetStatisticsDetailVO assetStatisticsDetailVO : list) { |
| | | AssetType child = typeMap.get(assetStatisticsDetailVO.getAssetTypeId()); |
| | | if (child!=null){ |
| | | AssetType parent = typeMap.get(child.getParentId()); |
| | | if (parent!=null){ |
| | | assetStatisticsDetailVO.setAssetTypeName(parent.getTypeName()+">"+child.getTypeName()); |
| | | } |
| | | } |
| | | Integer type = assetStatisticsDetailVO.getType(); |
| | | if (type==0){ |
| | | String typeName = "入库"; |
| | |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public String getAssetTypeNameById(Integer assetTypeId) { |
| | | if (assetTypeId != null) { |
| | | AssetType assetType = this.getById(assetTypeId); |
| | | if (assetType != null) { |
| | | return assetType.getTypeName(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |