| | |
| | | if (CollectionUtils.isEmpty(ptyValue)){ |
| | | continue; |
| | | } |
| | | PtypeVO ptypeVO = PtypeVO.builder().pTypeName(ptyValue.get(0).getPtypeName()).build(); |
| | | PtypeVO ptypeVO = PtypeVO.builder().pTypeName(ptyValue.get(0).getPtypeName()).sort(ptyValue.get(0).getSort()).build(); |
| | | List<SgTypeVO> sgGxDOS = new ArrayList<>(); |
| | | //类型分组 |
| | | Map<String, List<SgProjectInfoVO>> GxMap = ptyValue.stream().filter(s->s.getDeviceType()!=null).collect(Collectors.groupingBy(SgProjectInfoVO::getDeviceType)); |
| | |
| | | double sum = allDevice.stream().mapToDouble(s -> Double.parseDouble(s.getProgress())).sum(); |
| | | BigDecimal allDeviceOver = BigDecimal.valueOf(sum); |
| | | BigDecimal allDivideDevice = allDeviceOver.divide(allDeviceSize, 2, RoundingMode.HALF_UP); |
| | | sgProjectInfoDO.setPtypeVOS(pTypes); |
| | | List<PtypeVO> sortPtpes = pTypes.stream().sorted(Comparator.comparing(PtypeVO::getSort)).collect(Collectors.toList()); |
| | | sgProjectInfoDO.setPtypeVOS(sortPtpes); |
| | | sgProjectInfoDO.setProjectProgress( getBigDecimalPercent(allDivideDevice)); |
| | | sgProjectInfoDO.setProjectProgressNum(allDivideDevice); |
| | | } |