lwhhszx пре 2 година
родитељ
комит
aca7cdb89d

+ 3 - 0
PAS/src/main/java/cn/cslg/pas/service/PatentRightService.java

@@ -32,6 +32,9 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
 
     public List<PatentRight> getPatentRightByPatentNo(String patentNo) {
         Patent patent = patentService.getByPatentNo(patentNo);
+        if(patent==null){
+            patent =new Patent();
+        }
         LambdaQueryWrapper<PatentRight> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(PatentRight::getPatentId, patent.getId());
         queryWrapper.orderByAsc(PatentRight::getSort);

+ 11 - 1
PAS/src/main/java/cn/cslg/pas/service/PatentService.java

@@ -108,7 +108,17 @@ public class PatentService extends ServiceImpl<PatentMapper, Patent> {
     public Patent getByPatentNo(String patentNo) {
         LambdaQueryWrapper<Patent> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(Patent::getPatentNo, patentNo);
-        return this.getOne(queryWrapper);
+        if(patentNo.contains("CN")){
+            queryWrapper.or().eq(Patent::getPublicNo,patentNo)
+                    .or().eq(Patent::getPublicAccreditNo,patentNo);
+        }
+        queryWrapper.orderByDesc(Patent::getId);
+      List<Patent> patents = this.list(queryWrapper);
+        Patent patent =new Patent();
+        if(patents.size()>0){
+            patent =patents.get(0);
+        }
+        return patent;
     }
 
     public List<Patent> getPublicDateAndPatentNoByPatentNo(List<String> patentNo) {

+ 6 - 0
PAS/src/main/resources/application-prodNetIn.yml

@@ -24,3 +24,9 @@ spring:
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
 authorUrl: http://localhost:8871
+
+PCSUrl: http://localhost:8871
+#OPSUrl: http://192.168.1.24:5001
+OPSUrl: http://139.224.24.90:5001
+PASUrl: http://localhost:8877
+RMSUrl: http://localhost:8872

+ 7 - 1
PAS/src/main/resources/application-prodNetOut.yml

@@ -23,4 +23,10 @@ spring:
         login-password: Cslg2022+
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
-authorUrl: http://localhost:8871
+authorUrl: http://localhost:8871
+
+PCSUrl: http://localhost:8871
+#OPSUrl: http://192.168.1.24:5001
+OPSUrl: http://139.224.24.90:5001
+PASUrl: http://localhost:8877
+RMSUrl: http://localhost:8872

+ 1 - 1
PAS/src/main/resources/application.yml

@@ -20,7 +20,7 @@ spring:
       max-file-size: 1000MB
       max-request-size: 1000MB
   profiles:
-    active: dev
+    active: prodNetOut
   jackson:
     default-property-inclusion: non_null
     serialization: