Sfoglia il codice sorgente

7/30 外部检索逻辑更改

lwhhszx 1 anno fa
parent
commit
9e27cd57ac

+ 2 - 2
src/main/java/cn/cslg/pas/service/business/PatentDigProjectService.java

@@ -737,12 +737,12 @@ public class PatentDigProjectService extends ServiceImpl<PatentDigProjectMapper,
         Integer roleType = personnelVO.getRoleType();
         String rootSql = "";
         if (roleType == null || roleType.equals(0)) {
-            rootSql ="(p.create_id ="+id+" or p.head_id="+id+" or p.id in (select project_id from asso_project_person where person_id ="+id+"))";
+            rootSql ="(t.createId ="+id+" or t.headId="+id+" or t.id in (select project_id from asso_project_person where person_id ="+id+"))";
 
         }
         else if(roleType.equals(2))
         {
-            rootSql="p.tenant_id="+tenantId;
+            rootSql="t.tenantId="+tenantId;
         }
         if (sqls.get(0) != null && !sqls.get(0).equals("") && !rootSql.equals("")) {
             sqls.set(0, rootSql + " and" + "(" + sqls.get(0) + ")");

+ 2 - 2
src/main/java/cn/cslg/pas/service/business/PatentProjectService.java

@@ -893,10 +893,10 @@ public class PatentProjectService extends ServiceImpl<PatentProjectMapper, Paten
         Integer roleType = personnelVO.getRoleType();
         String rootSql = "";
         if (roleType == null || roleType.equals(0)) {
-            rootSql = "(p.create_id =" + id + " or p.head_id=" + id + " or p.id in (select project_id from asso_project_person where person_id =" + id + "))";
+            rootSql = "(t.createId =" + id + " or t.headId=" + id + " or t.id in (select project_id from asso_project_person where person_id =" + id + "))";
 
         } else if (roleType.equals(2)) {
-            rootSql = "(p.tenant_id=" + tenantId + " or p.id in (select project_id from asso_project_person where person_id =" + id + "))";
+            rootSql = "(t.tenantId=" + tenantId + " or t.id in (select project_id from asso_project_person where person_id =" + id + "))";
         }
 
         if (sqls.get(0) != null && !sqls.get(0).equals("") && !rootSql.equals("")) {

+ 2 - 2
src/main/java/cn/cslg/pas/service/business/ReportProjectService.java

@@ -931,10 +931,10 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor
         Integer roleType = personnelVO.getRoleType();
         String rootSql = "";
         if (roleType == null || roleType.equals(0)) {
-            rootSql = "(p.create_id =" + id + " or p.head_id=" + id + " or p.id in (select project_id from asso_project_person where person_id =" + id + "))";
+            rootSql = "(t.createId =" + id + " or p.headId=" + id + " or t.id in (select project_id from asso_project_person where person_id =" + id + "))";
 
         } else if (roleType.equals(2)) {
-            rootSql = "p.tenant_id=" + tenantId;
+            rootSql = "t.tenantId=" + tenantId;
         }
         if (sqls.get(0) != null && !sqls.get(0).equals("") && !rootSql.equals("")) {
             sqls.set(0, rootSql + " and " + "(" + sqls.get(0) + ")");

+ 2 - 2
src/main/resources/application-dev.yml

@@ -61,8 +61,8 @@ spring:
     #初始化表结构
     jdbc:
       initialize-schema: always
-authorUrl: http://localhost:8871
-PCSUrl: http://localhost:8871
+authorUrl: http://localhost:8885
+PCSUrl: http://localhost:8885
 #OPSUrl: http://192.168.2.24:5001
 OPSUrl: http://139.224.24.90:5001
 PASUrl: http://localhost:8879

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

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

+ 2 - 2
src/main/resources/mapper/PatentDigProjectMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="cn.cslg.pas.mapper.PatentDigProjectMapper">
     <select id="getPatentDigProject" resultType="cn.cslg.pas.common.vo.business.PatentDigProjectVO">
-        select * from ( select p.id,dp.name as name,dp.output as output,dp.technical_direction as
+        select * from ( select p.id, p.tenant_id as tenantId,dp.name as name,dp.output as output,dp.technical_direction as
         technicalDirection,dp.if_search as
         ifSearch,dp.related_competitors as relatedCompetitors,dp.technical_keyword as technicalKeyword,dp.process as
         process,dp.state as state,rp.name as rdName,rp.number as rdnumber,rp.product_phase as productPhase,rp.product as
@@ -24,7 +24,7 @@
 
     <select id="getPatentDigCount" resultType="java.lang.Long">
         select count(*)
-        from (select p.id,dp.name as name,dp.output as output,dp.technical_direction as
+        from (select p.id,p.tenant_id as tenantId,dp.name as name,dp.output as output,dp.technical_direction as
         technicalDirection,dp.if_search as
         ifSearch,dp.related_competitors as relatedCompetitors,dp.technical_keyword as technicalKeyword,dp.process as
         process,dp.state as state,rp.name as rdName,rp.number as rdnumber,rp.product_phase as productPhase,rp.product as

+ 2 - 2
src/main/resources/mapper/PatentProjectMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="cn.cslg.pas.mapper.PatentProjectMapper">
     <select id="getPatentProject" resultType="cn.cslg.pas.common.vo.business.PatentProjectVO">
         select * from ( select p.id as id,p.name as name ,p.contract_no as contract_no,p.volume_number as
-        volumeNumber,p.commission_case_day as commissionCaseDay,p.description as description,p.create_id as
+        volumeNumber,p.tenant_id as tenantId,p.commission_case_day as commissionCaseDay,p.description as description,p.create_id as
         createId,p.create_time as createTime,pp.if_update as ifUpdate,pp.crons as crons,pp.status as status,
         p.entrust_type as entrustType,p.entrust_id as entrustId,p.head_id as headId,p.department_id as departmentId,
         asps.scenario_id as scenarioId,aspe.event_id as eventId,aspt.tree_type as treeType,aspt.field_id as fieldId,
@@ -23,7 +23,7 @@
 
     <select id="getPatentProjectCount" resultType="java.lang.Long">
         select count(*) from (select p.id as id,p.name as name ,p.contract_no as contract_no,p.volume_number as
-        volumeNumber,p.commission_case_day as commissionCaseDay,p.description as description,p.create_id as
+        volumeNumber,p.tenant_id as tenantId,p.commission_case_day as commissionCaseDay,p.description as description,p.create_id as
         createId,p.create_time as createTime,pp.if_update as ifUpdate,pp.crons as crons,pp.status as status,
         p.entrust_type as entrustType,p.entrust_id as entrustId,p.head_id as headId,p.department_id as departmentId,
         asps.scenario_id as scenarioId,aspe.event_id as eventId,aspt.tree_type as treeType,aspt.field_id as fieldId,

+ 2 - 2
src/main/resources/mapper/ReportProjectMapper.xml

@@ -5,7 +5,7 @@
         select * from ( select p.id as id,p.name as name ,rp.sign_patent_no as signPatentNo,p.contract_no as
         contract_no,p.volume_number as volumeNumber,p.commission_case_day as commissionCaseDay,
         p.description as description,p.create_id as createId,p.create_time as createTime, rp.report_type as reportType ,
-        p.head_id as headId,p.department_id as departmentId,
+        p.head_id as headId,p.department_id as departmentId, p.tenant_id as tenantId,
         p.entrust_type as entrustType,p.entrust_id as entrustId,rp.product_or_tech as productOrTech,rp.cron_description
         as cronDescription ,rp.status as status,rp.if_second_invalid as ifSecondInvalid,rp.case_number as caseNumber ,rp.issue_number as issueNumber ,rp.invalid_application as
         invalidApplication ,rp.act_type as actType ,rp.patent_type as patentType ,rp.current_application as
@@ -29,7 +29,7 @@
         select count(*) from (select p.id as id,p.name as name ,rp.sign_patent_no as signPatentNo,p.contract_no as
         contract_no,p.volume_number as volumeNumber,p.commission_case_day as commissionCaseDay,
         p.description as description,p.create_id as createId,p.create_time as createTime, rp.report_type as reportType ,
-        p.head_id as headId,p.department_id as departmentId,
+        p.head_id as headId,p.department_id as departmentId, p.tenant_id as tenantId,
         p.entrust_type as entrustType,p.entrust_id as entrustId,rp.product_or_tech as productOrTech,rp.cron_description
         as cronDescription ,rp.status as status,rp.if_second_invalid as ifSecondInvalid,rp.case_number as caseNumber ,rp.issue_number as issueNumber ,rp.invalid_application as
         invalidApplication ,rp.act_type as actType ,rp.patent_type as patentType ,rp.current_application as