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

7/30 外部检索逻辑更改

lwhhszx пре 1 година
родитељ
комит
16cc1c486b

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

@@ -159,7 +159,7 @@ public class PatentDigProjectService extends ServiceImpl<PatentDigProjectMapper,
             }
         }
 
-        tableName = "( select p.id as id ,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime ,entrust_id as entrustId,entrust_type as entrustType from patent_dig_project as dp left join project as p on dp.project_id =p.id left join rd_project rp on dp.rd_project_id =rp.id ";
+        tableName = "( select p.id as id ,p.create_id as createId,p.tenant_id as tenantId,p.head_id as headId,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime ,entrust_id as entrustId,entrust_type as entrustType from patent_dig_project as dp left join project as p on dp.project_id =p.id left join rd_project rp on dp.rd_project_id =rp.id ";
         tableName+=  "left join (select * from asso_project_event where scenario_id is not null ) as asps on p.id = asps.project_id " +
                 "left join (select * from asso_project_event where event_id is not null ) as aspe on p.id = aspe.project_id " +
                 "left join (select * from asso_project_event where matter_id is not null ) as aspm on p.id = aspm.project_id) as t";

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

@@ -206,7 +206,7 @@ public class PatentProjectService extends ServiceImpl<PatentProjectMapper, Paten
             }
         }
 
-        tableName = "( select p.id as id ,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime,entrust_id as entrustId,entrust_type as entrustType from patent_project as pp left join project as p on pp.project_id = p.id ";
+        tableName = "( select p.id as id ,p.create_id as createId,p.tenant_id as tenantId,p.head_id as headId,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime,entrust_id as entrustId,entrust_type as entrustType from patent_project as pp left join project as p on pp.project_id = p.id ";
         tableName += "left join (select * from asso_project_event where scenario_id is not null ) as asps on p.id = asps.project_id " +
                 "left join (select * from asso_project_event where event_id is not null ) as aspe on p.id = aspe.project_id " +
                 "left join (select * from asso_project_event where matter_id is not null ) as aspm on p.id = aspm.project_id) as t";

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

@@ -226,7 +226,7 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor
                 throw new XiaoShiException("未找到配置");
             }
         }
-        tableName = "(select p.id as id ,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime ,entrust_id as entrustId,entrust_type as entrustType,rp.report_type as reportType from report as rp left join project as p on rp.project_id =p.id ";
+        tableName = "(select p.id as id,p.create_id as createId,p.tenant_id as tenantId,p.head_id as headId,asps.scenario_id as scenarioId,aspm.matter_id as matterId,p.create_time as createTime ,entrust_id as entrustId,entrust_type as entrustType,rp.report_type as reportType from report as rp left join project as p on rp.project_id =p.id ";
         tableName += "left join (select * from asso_project_event where scenario_id is not null ) as asps on p.id = asps.project_id " +
                 "left join (select * from asso_project_event where event_id is not null ) as aspe on p.id = aspe.project_id " +
                 "left join (select * from asso_project_event where matter_id is not null ) as aspm on p.id = aspm.project_id) as t";
@@ -931,7 +931,7 @@ public class ReportProjectService extends ServiceImpl<ReportProjectMapper, Repor
         Integer roleType = personnelVO.getRoleType();
         String rootSql = "";
         if (roleType == null || roleType.equals(0)) {
-            rootSql = "(t.createId =" + id + " or p.headId=" + id + " or t.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 = "t.tenantId=" + tenantId;