xiongzhu hace 2 años
padre
commit
310a2511df

+ 1 - 1
src/main/java/com/izouma/zhirongip/domain/supply/Patent.java

@@ -34,6 +34,7 @@ public class Patent extends BaseEntity {
     private Long userId;
 
     @ApiModelProperty(value = "专利名称")
+    @Searchable
     private String name;
 
     @ApiModelProperty(value = "申请号")
@@ -91,7 +92,6 @@ public class Patent extends BaseEntity {
     @ApiModelProperty(value = "摘要")
     private String digest;
 
-    @Searchable
     @ExcelIgnore
     @Column(columnDefinition = "TEXT")
     @ApiModelProperty(value = "权利要求书")

+ 15 - 14
src/main/java/com/izouma/zhirongip/service/supply/PatentService.java

@@ -43,8 +43,9 @@ public class PatentService {
 
     public Page<Patent> all(PageQuery pageQuery) {
         Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13, 24, 25, 26)).stream()
-                .collect(Collectors.toMap(Setting::getId, Setting::getName));
-        return patentRepo.findAll(JpaUtils.toSpecification(pageQuery, Patent.class), JpaUtils.toPageRequest(pageQuery))
+                                                  .collect(Collectors.toMap(Setting::getId, Setting::getName));
+        Page<Patent> page = patentRepo.findAll(JpaUtils.toSpecification(pageQuery, Patent.class), JpaUtils.toPageRequest(pageQuery));
+        return page
                 .map(cd -> {
                     cd.setIndustryName(settingMap.get(cd.getIndustryClass()));
                     if (cd.getPatentTypeId() != null) {
@@ -64,23 +65,23 @@ public class PatentService {
     public Patent get(Long id) {
         Patent patent = patentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         patent.setIndustryName(settingRepo.findById(patent.getIndustryClass())
-                .orElseThrow(new BusinessException("无记录"))
-                .getName());
+                                          .orElseThrow(new BusinessException("无记录"))
+                                          .getName());
 
         if (patent.getPatentTypeId() != null) {
             patent.setPatentType(settingRepo.findById(patent.getPatentTypeId())
-                    .orElseThrow(new BusinessException("无记录"))
-                    .getName());
+                                            .orElseThrow(new BusinessException("无记录"))
+                                            .getName());
         }
         if (patent.getLawStatusId() != null) {
             patent.setLawStatus(settingRepo.findById(patent.getLawStatusId())
-                    .orElseThrow(new BusinessException("无记录"))
-                    .getName());
+                                           .orElseThrow(new BusinessException("无记录"))
+                                           .getName());
         }
         if (patent.getTradingMethodId() != null) {
             patent.setTradingMethod(settingRepo.findById(patent.getTradingMethodId())
-                    .orElseThrow(new BusinessException("无记录"))
-                    .getName());
+                                               .orElseThrow(new BusinessException("无记录"))
+                                               .getName());
         }
         return patent;
     }
@@ -89,9 +90,9 @@ public class PatentService {
         Patent record = patentRepo.findById(id).orElseThrow(new BusinessException("无记录"));
 
         Information information = Information.builder()
-                .receiveUserId(record.getUserId())
-                .isRead(false)
-                .build();
+                                             .receiveUserId(record.getUserId())
+                                             .isRead(false)
+                                             .build();
 
         if (pass) {
             record.setStatus(ApplyStatus.PASS);
@@ -125,7 +126,7 @@ public class PatentService {
         List<Patent> patents = new ArrayList<>();
         int index = 0;
         Map<String, Long> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13, 24, 25, 26)).stream()
-                .collect(Collectors.toMap(Setting::getName, Setting::getId));
+                                                  .collect(Collectors.toMap(Setting::getName, Setting::getId));
         Map<String, OwnerType> typeMap = new HashMap<>();
         typeMap.put("企事业单位", OwnerType.ENTERPRISES_AND_INSTITUTIONS);
         typeMap.put("高校院所", OwnerType.UNIVERSITIES_AND_INSTITUTES);

+ 9 - 9
src/main/zhi-rong-web/src/views/Home.vue

@@ -5,7 +5,7 @@
         <div class="center-content_one">
             <div class="center-content" style="padding-top: 74px">
                 <!-- <divider-title>
-                <template #prim>知产咨询动态</template>
+                <template #prim>专利咨询动态</template>
                 <template #sub>Information trends</template>
             </divider-title> -->
                 <div class="news">
@@ -214,7 +214,7 @@
                     >
                         <img src="../assets/png-ipfuwu-bg@3x.png" alt="" class="banner_con_titleTwo_img" />
                         <div class="supply_sides">
-                            <div class="supply_sides_one">知产运营服务</div>
+                            <div class="supply_sides_one">专利运营服务</div>
                             <div class="supply_sides_two">
                                 立即查看<i class="el-icon-arrow-right" style="margin-left: 6px"></i>
                             </div>
@@ -267,7 +267,7 @@
                                             class="intellectual_property_one_left_img"
                                             v-if="actives === '专家'"
                                         ></el-image>
-                                        <div v-if="actives === '知产'">
+                                        <div v-if="actives === '专利'">
                                             <div class="intellectual_property_one_left_name">{{ i.name }}</div>
                                             <div class="intellectual_property_one_left_content">
                                                 <div class="intellectual_property_one_left_content_con">
@@ -386,7 +386,7 @@
                                 :key="i.id"
                                 class="news-link"
                                 @click="toDetails(i.id)"
-                                v-if="actives != '知产'"
+                                v-if="actives != '专利'"
                             >
                                 <div class="news-link_con" v-if="actives === '技术'">
                                     <el-image :src="getImg(i.img)" fit="cover" class="news-link_img"></el-image>
@@ -604,8 +604,8 @@ export default {
             supplys: [],
             active: '通知公告',
             tabs: ['通知公告', '新闻资讯', '政策法规'],
-            actives: '知产',
-            tabss: ['知产', '技术', '产品', '企业', '专家'],
+            actives: '专利',
+            tabss: ['专利', '技术', '产品', '企业', '专家'],
             demands: [],
             formData: {},
             activeName: 'first',
@@ -770,7 +770,7 @@ export default {
             this.actives = item;
             // this.num = 0;
             // const typeSettingId = name;
-            if (item === '知产') {
+            if (item === '专利') {
                 this.$http
                     .post(
                         '/intellectualProperty/all',
@@ -829,7 +829,7 @@ export default {
             //     });
         },
         toDetails(id) {
-            if (this.actives === '知产') {
+            if (this.actives === '专利') {
                 this.$router.push({ name: 'intellectualPropertyDetail', query: { id: id } });
             } else if (this.actives === '技术') {
                 this.$router.push({ name: 'digitalDetail', query: { id: id } });
@@ -931,7 +931,7 @@ export default {
             this.$router.push('/newsList?flag=1');
         },
         moreQualificationsTwo() {
-            if (this.actives === '知产') {
+            if (this.actives === '专利') {
                 this.$router.push('/intellectualProperty');
             } else if (this.actives === '技术') {
                 this.$router.push('/digital?type=TECHNOLOGY');