chendayu 2 年 前
コミット
2372bd9509

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/common/config/WebSocketConfig.java

@@ -6,7 +6,7 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter;
 
 @Configuration
 public class WebSocketConfig {
-    //@Bean
+    @Bean
     public ServerEndpointExporter serverEndpointExporter() {
         return new ServerEndpointExporter();
     }

+ 3 - 0
PAS/src/main/java/cn/cslg/pas/common/core/annotation/AnnotationParse.java

@@ -1,7 +1,10 @@
 package cn.cslg.pas.common.core.annotation;
 
+import org.springframework.context.annotation.Configuration;
+
 import java.lang.reflect.Method;
 
+@Configuration
 public class AnnotationParse {
 
     public static int[] permissionParse(Method method) throws Exception {

+ 3 - 2
PAS/src/main/java/cn/cslg/pas/service/asso/AssoProductPatentService.java

@@ -60,7 +60,7 @@ public class AssoProductPatentService extends ServiceImpl<AssoProductPatentMappe
             patentDTO.setPatentNo(patentDTO.getPatentNo().replace(" ", ""));
             if (!patentDTO.getPatentNo().equals("")) {
                 String[] strs = patentDTO.getPatentNo().split("\\|");
-                patentDTO.setPatentNo("(^|,)("+patentDTO.getPatentNo()+")(,|$)");
+                patentDTO.setPatentNo("(^|,)(" + patentDTO.getPatentNo() + ")(,|$)");
                 orgPatentNos = new ArrayList<>(Arrays.asList(strs));
                 patentDTO.setIsIn(0);
                 List<String> patentNos = this.baseMapper.getPatentNos(patentDTO);
@@ -131,7 +131,8 @@ public class AssoProductPatentService extends ServiceImpl<AssoProductPatentMappe
         if (params.getProductId() == null) {
             //当架构id不为null时
             if (params.getStructureId() != null) {
-                structureService.getById(params.getStructureId());
+           Structure structure =  structureService.getById(params.getStructureId());
+           params.setProductId(structure.getProductId());
             } else {
                 return pageList;
             }

+ 3 - 1
PAS/src/main/resources/mapper/AssoProductPatentMapper.xml

@@ -74,6 +74,9 @@
             <if test="params.patentName !=null and params.patentName !=''">
                 and a.`name` like concat("%", #{params.patentName}, "%")
             </if>
+            <if test="params.structureId !=null and params.structureId !=''">
+                and t.structure_id = #{params.structureId}
+            </if>
             <if test="params.orderItem!=null and params.orderItem!='SysOrder'">
                 order by #{params.orderItem}
                 <if test="params.orderType!=null">
@@ -90,7 +93,6 @@
                     #{item}
                 </foreach>
             </if>
-
         </where>
     </select>