Преглед изворни кода

Merge branch 'master' of http://git.izouma.com/xubinhui/yzzscq

yuanyuan пре 2 година
родитељ
комит
eb6e3219b0

+ 3 - 0
src/main/java/com/izouma/zhirongip/repo/resource/ExpertRepo.java

@@ -1,6 +1,7 @@
 package com.izouma.zhirongip.repo.resource;
 
 import com.izouma.zhirongip.domain.resource.Expert;
+import com.izouma.zhirongip.enums.ResourceCategory;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Modifying;
@@ -16,4 +17,6 @@ public interface ExpertRepo extends JpaRepository<Expert, Long>, JpaSpecificatio
     void softDelete(Long id);
 
     List<Expert> findAllByNameLike(String name);
+
+    long count();
 }

+ 20 - 19
src/main/java/com/izouma/zhirongip/service/StatisticService.java

@@ -50,7 +50,8 @@ public class StatisticService {
 
 
     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 intellectualProperty = patentRepo
                 .count();
@@ -92,24 +93,24 @@ public class StatisticService {
         startAt = now.minusDays(value);
 
         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);
 
         long logo = logoDemandRepo.countByCreatedAtGreaterThanEqual(startAt);
         map.put("LOGO", logo);
 
         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<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);
 
         long funding = fundingRepo.countByCreatedAtGreaterThanEqual(startAt);
@@ -133,24 +134,24 @@ public class StatisticService {
         startAt = now.minusDays(value);
 
         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);
 
         long logo = logoRepo.countByCreatedAtGreaterThanEqual(startAt);
         map.put("LOGO", logo);
 
         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<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);
 
         long service = serviceProviderRepo.countByCreatedAtGreaterThanEqual(startAt);

+ 2 - 2
src/main/vue/src/plugins/http.js

@@ -6,9 +6,9 @@ let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
     case 'development':
 
-         // baseUrl = 'http://localhost:8080';
+          baseUrl = 'http://localhost:8080';
         // baseUrl = 'http://zhirongip.izouma.com';
-         baseUrl = 'http://yangzhouip.izouma.com';
+         //baseUrl = 'http://yangzhouip.izouma.com';
         // baseUrl = 'http://192.168.50.127:8080';
         break;
     case 'test':

+ 6 - 1
src/main/vue/src/views/supply/PatentEdit.vue

@@ -45,7 +45,12 @@
                         >
                         </el-date-picker>
                     </el-form-item>
-                    <el-form-item prop="industryClass" label="所属领域">
+                    <!--                    <el-form-item prop="industryClass" label="所属领域">-->
+                    <el-form-item
+                        prop="industryClass"
+                        label="所属领域"
+                        :rules="[{ required: true, message: '请选择所属领域', trigger: 'change' }]"
+                    >
                         <el-select
                             v-model="formData.industryClass"
                             clearable

+ 3 - 3
src/main/vue/src/views/supply/TechnicalManagerEdit.vue

@@ -128,7 +128,7 @@ export default {
         return {
             saving: false,
             formData: {
-                avatar: 'https://zhirongip.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-09-59-23yoEbtbgH.png'
+                avatar: 'https://baixiaip.oss-cn-hangzhou.aliyuncs.com/image/2023-05-30-17-06-19TnygNCLP.png'
             },
             rules: {
                 name: [{ required: true, message: '请输入姓名' }]
@@ -162,8 +162,8 @@ export default {
                 { label: '女', value: '女' }
             ],
             avatars: [
-                'https://zhirongip.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-09-59-23yoEbtbgH.png',
-                'https://zhirongip.oss-cn-hangzhou.aliyuncs.com/image/2021-08-13-09-59-33aDGeVuix.png'
+                'https://baixiaip.oss-cn-hangzhou.aliyuncs.com/image/2023-05-30-17-06-19TnygNCLP.png',
+                'https://baixiaip.oss-cn-hangzhou.aliyuncs.com/image/2023-05-30-17-06-57cNByhHYt.png'
             ]
         };
     },

+ 1 - 0
src/main/zhi-rong-web/src/plugins/http.js

@@ -5,6 +5,7 @@ let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
     case 'development':
         //baseUrl = 'http://yangzhouip.izouma.com';
+        // baseUrl = '/www.bxgxzc.com';
         // baseUrl = 'http://192.168.50.190:8080';
          baseUrl = 'http://localhost:8080';
         // baseUrl = 'http://192.168.50.190:8080';