|
|
|
@ -483,7 +483,7 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService {
|
|
|
|
|
R<String> deptName1 = sysClient.getDeptName(deptMapEntry.getKey()); |
|
|
|
|
for (Map.Entry<String, List<OperPhenomenonEntity>> levelList : deptMapEntry.getValue().entrySet()) { |
|
|
|
|
int findShortagesYear = levelList.getValue().size(); |
|
|
|
|
int shortagesYear = (int) yearConclusionList.stream().filter(s -> s.getDefectGrading().equals(levelList.getKey())).count(); |
|
|
|
|
int shortagesYear = (int) levelList.getValue().stream().filter(s -> "1".equals(s.getConclusionStatus())).count(); |
|
|
|
|
double shortagesRate = 0d; |
|
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
@ -498,7 +498,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService {
|
|
|
|
|
Map<String, List<OperPhenomenonEntity>> levelPhenomenonList = yearPhenomenonEntities.stream().collect(Collectors.groupingBy(OperPhenomenonEntity::getDefectGrading)); |
|
|
|
|
for (Map.Entry<String, List<OperPhenomenonEntity>> levelPhenomenon : levelPhenomenonList.entrySet()) { |
|
|
|
|
int findShortagesYear = levelPhenomenon.getValue().size(); |
|
|
|
|
int shortagesYear = (int) Optional.ofNullable(yearConclusionList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
|
int shortagesYear = (int) Optional.ofNullable(yearConclusionList).orElse(new ArrayList<>()).stream() |
|
|
|
|
.filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
|
double shortagesRate = 0d; |
|
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
|