|
|
@@ -134,27 +134,11 @@ public class PatentService {
|
|
|
Map<ApplyStatus, Long> byLStatus = logoPatents.stream()
|
|
|
.collect(Collectors.groupingBy(LogoPatent::getApplyStatus, Collectors.counting()));
|
|
|
|
|
|
- long apply = ObjectUtil.isNull(byPStatus.get(ApplyStatus.APPLY_STAGE)) ? 0 : byPStatus.get(ApplyStatus.APPLY_STAGE) +
|
|
|
- ((ObjectUtil.isNull(byLStatus.get(ApplyStatus.APPLY_STAGE))) ? 0 : byLStatus.get(ApplyStatus.APPLY_STAGE));
|
|
|
-
|
|
|
- long grant = ObjectUtil.isNull(byPStatus.get(ApplyStatus.GRANT_STAGE)) ? 0 : byPStatus.get(ApplyStatus.GRANT_STAGE) +
|
|
|
- ((ObjectUtil.isNull(byLStatus.get(ApplyStatus.GRANT_STAGE))) ? 0 : byLStatus.get(ApplyStatus.GRANT_STAGE));
|
|
|
-
|
|
|
- long review = ObjectUtil.isNull(byPStatus.get(ApplyStatus.REVIEW_STAGE)) ? 0 : byPStatus.get(ApplyStatus.REVIEW_STAGE) +
|
|
|
- ((ObjectUtil.isNull(byLStatus.get(ApplyStatus.REVIEW_STAGE))) ? 0 : byLStatus.get(ApplyStatus.REVIEW_STAGE));
|
|
|
-
|
|
|
- long substantive = ObjectUtil.isNull(byPStatus.get(ApplyStatus.SUBSTANTIVE_STAGE)) ? 0 : byPStatus.get(ApplyStatus.SUBSTANTIVE_STAGE) +
|
|
|
- ((ObjectUtil.isNull(byLStatus.get(ApplyStatus.SUBSTANTIVE_STAGE))) ? 0 : byLStatus.get(ApplyStatus.SUBSTANTIVE_STAGE));
|
|
|
-
|
|
|
- Map<String, Long> pie = new HashMap<>();
|
|
|
- pie.put("apply", apply);
|
|
|
- pie.put("grant", grant);
|
|
|
- pie.put("review", review);
|
|
|
- pie.put("substantive", substantive);
|
|
|
+ Map<ApplyStatus, Long> pie = new HashMap<>(byPStatus);
|
|
|
+ byLStatus.forEach((key, value) -> pie.merge(key, value, Long::sum));
|
|
|
|
|
|
map.put("pie", pie);
|
|
|
|
|
|
-
|
|
|
//本周数据对比
|
|
|
int dayOfWeek = now.getDayOfWeek().getValue();
|
|
|
Map<LocalDate, Integer> weekMap = getData(patents, logoPatents, now, dayOfWeek);
|