Jelajahi Sumber

合并代码

chendayu 2 tahun lalu
induk
melakukan
2720620b44

+ 3 - 4
PAS/src/main/java/cn/cslg/pas/service/TaskService.java

@@ -278,10 +278,9 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> implements ITaskS
     public PageVO queryTasks(QueryTaskDTO queryTaskDTO) throws IOException {
         log.info("开始处理【查询任务】的业务,参数为:{}", queryTaskDTO);
 
-        //专题库id和报告id都没有时,根据当前登陆人id查询
-        if (queryTaskDTO.getProjectId() == null && queryTaskDTO.getReportId() == null) {
-            queryTaskDTO.setCreateId(loginUtils.getId());
-        }
+        //装载创建人id
+        queryTaskDTO.setCreateId(loginUtils.getId());
+
         //根据创建人名称模糊查询
         if (queryTaskDTO.getCreateName() != null && !queryTaskDTO.getCreateName().equals("")) {
             String res = outInterfaceService.getPersonIdByNamePCS(queryTaskDTO.getCreateName());

+ 8 - 2
PAS/src/main/resources/mapper/TaskMapper.xml

@@ -54,15 +54,21 @@
         left join os_task tas2 on tas.task_condition_id = tas2.task_condition_id and tas.ctime &lt; tas2.ctime
         left join task_condition con on tas.task_condition_id = con.id
         <where>
-            <if test="projectId != null">
+            <if test="projectId != null and projectId != 0">
                 and tas.tid = #{projectId}
             </if>
-            <if test="reportId != null">
+            <if test="reportId != null and reportId != 0">
                 and tas.report_id = #{reportId}
             </if>
             <if test="projectId == null and reportId == null">
                 and tas.uid = #{createId}
             </if>
+            <if test="projectId == 0 and reportId == null">
+                and tas.tid != 0
+            </if>
+            <if test="reportId == 0 and projectId == null">
+                and tas.report_id is not null
+            </if>
             <if test="personIds != null and personIds.size > 0">
                 and tas.uid in
                 <foreach collection="personIds" item="n" separator="," open="(" close=")">