|
@@ -50,7 +50,8 @@ public class StatisticService {
|
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Long> getTotal() {
|
|
public Map<String, Long> getTotal() {
|
|
|
- long policy = policyLawRepo.countByCategory(ResourceCategory.POLICY);
|
|
|
|
|
|
|
+ // long policy = policyLawRepo.countByCategory(ResourceCategory.POLICY);
|
|
|
|
|
+ long policy = expertRepo.count();
|
|
|
long law = policyLawRepo.countByCategory(ResourceCategory.LAW);
|
|
long law = policyLawRepo.countByCategory(ResourceCategory.LAW);
|
|
|
long intellectualProperty = patentRepo
|
|
long intellectualProperty = patentRepo
|
|
|
.count();
|
|
.count();
|
|
@@ -92,24 +93,24 @@ public class StatisticService {
|
|
|
startAt = now.minusDays(value);
|
|
startAt = now.minusDays(value);
|
|
|
|
|
|
|
|
Map<CopyrightType, Long> copyright = copyrightDemandRepo.findAll()
|
|
Map<CopyrightType, Long> copyright = copyrightDemandRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(CopyrightDemand::getType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(CopyrightDemand::getType, Collectors.counting()));
|
|
|
Map<Object, Long> map = new HashMap<>(copyright);
|
|
Map<Object, Long> map = new HashMap<>(copyright);
|
|
|
|
|
|
|
|
long logo = logoDemandRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
long logo = logoDemandRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
|
map.put("LOGO", logo);
|
|
map.put("LOGO", logo);
|
|
|
|
|
|
|
|
Map<CaseType, Long> patent = patentDemandRepo.findAll()
|
|
Map<CaseType, Long> patent = patentDemandRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getCaseType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(PatentDemand::getCaseType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getCaseType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(PatentDemand::getCaseType, Collectors.counting()));
|
|
|
map.putAll(patent);
|
|
map.putAll(patent);
|
|
|
|
|
|
|
|
Map<TpType, Long> tech = techProductDemandRepo.findAll()
|
|
Map<TpType, Long> tech = techProductDemandRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getTpType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(TechProductDemand::getTpType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getTpType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(TechProductDemand::getTpType, Collectors.counting()));
|
|
|
map.putAll(tech);
|
|
map.putAll(tech);
|
|
|
|
|
|
|
|
long funding = fundingRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
long funding = fundingRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
@@ -133,24 +134,24 @@ public class StatisticService {
|
|
|
startAt = now.minusDays(value);
|
|
startAt = now.minusDays(value);
|
|
|
|
|
|
|
|
Map<CopyrightType, Long> copyright = copyrightRepo.findAll()
|
|
Map<CopyrightType, Long> copyright = copyrightRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(Copyright::getType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(Copyright::getType, Collectors.counting()));
|
|
|
Map<Object, Long> map = new HashMap<>(copyright);
|
|
Map<Object, Long> map = new HashMap<>(copyright);
|
|
|
|
|
|
|
|
long logo = logoRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
long logo = logoRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
|
map.put("LOGO", logo);
|
|
map.put("LOGO", logo);
|
|
|
|
|
|
|
|
Map<CaseType, Long> patent = patentRepo.findAll()
|
|
Map<CaseType, Long> patent = patentRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getCaseType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(Patent::getCaseType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getCaseType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(Patent::getCaseType, Collectors.counting()));
|
|
|
map.putAll(patent);
|
|
map.putAll(patent);
|
|
|
|
|
|
|
|
Map<TpType, Long> tech = technologyProductRepo.findAll()
|
|
Map<TpType, Long> tech = technologyProductRepo.findAll()
|
|
|
- .stream()
|
|
|
|
|
- .filter(demand -> ObjectUtil.isNotNull(demand.getTpType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
- .collect(Collectors.groupingBy(TechnologyProduct::getTpType, Collectors.counting()));
|
|
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .filter(demand -> ObjectUtil.isNotNull(demand.getTpType()) && !startAt.isAfter(demand.getCreatedAt()))
|
|
|
|
|
+ .collect(Collectors.groupingBy(TechnologyProduct::getTpType, Collectors.counting()));
|
|
|
map.putAll(tech);
|
|
map.putAll(tech);
|
|
|
|
|
|
|
|
long service = serviceProviderRepo.countByCreatedAtGreaterThanEqual(startAt);
|
|
long service = serviceProviderRepo.countByCreatedAtGreaterThanEqual(startAt);
|