|
@@ -17,10 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
import java.time.temporal.WeekFields;
|
|
import java.time.temporal.WeekFields;
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -116,7 +113,11 @@ public class DelayProductServiceImpl extends ServiceImpl<DelayProductMapper, Del
|
|
});
|
|
});
|
|
columnarResult.put(key, weeks);
|
|
columnarResult.put(key, weeks);
|
|
}
|
|
}
|
|
|
|
+ final Integer[] weekMax = {0};
|
|
columnarWeeks.forEach(item -> {
|
|
columnarWeeks.forEach(item -> {
|
|
|
|
+ if(total.get(item) != null && total.get(item) > weekMax[0]) {
|
|
|
|
+ weekMax[0] = total.get(item);
|
|
|
|
+ }
|
|
if(deliveredQuantityMap.get(item) != null && deliveredQuantityMap.get(item) != 0 && total.get(item) != null) {
|
|
if(deliveredQuantityMap.get(item) != null && deliveredQuantityMap.get(item) != 0 && total.get(item) != null) {
|
|
lossResult.add((double)total.get(item) / deliveredQuantityMap.get(item));
|
|
lossResult.add((double)total.get(item) / deliveredQuantityMap.get(item));
|
|
|
|
|
|
@@ -133,6 +134,7 @@ public class DelayProductServiceImpl extends ServiceImpl<DelayProductMapper, Del
|
|
result.put("pieOutside", pieOutsideJSON);
|
|
result.put("pieOutside", pieOutsideJSON);
|
|
result.put("columnarWeeks", columnarWeeks);
|
|
result.put("columnarWeeks", columnarWeeks);
|
|
result.put("lossData", lossResult);
|
|
result.put("lossData", lossResult);
|
|
|
|
+ result.put("weekMax", weekMax[0]);
|
|
result.put("columnarData", columnarResult);
|
|
result.put("columnarData", columnarResult);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|