Browse Source

fix: dm sql error

shc 10 months ago
parent
commit
957ebc2115
1 changed files with 21 additions and 22 deletions
  1. 21 22
      hnqz-visual/hnqz-report-biz/src/main/resources/mapper/WmTaskMapper.xml

+ 21 - 22
hnqz-visual/hnqz-report-biz/src/main/resources/mapper/WmTaskMapper.xml

@@ -828,28 +828,27 @@
   </select>
 
   <select id="getTaskListByIdsCount" resultType="java.util.HashMap">
-    SELECT
-    m.label AS taskTypeName,
-    sum( t.score ) taskSum,
-    count( 1 ) taskCount
-    FROM wm_task t
-    LEFT JOIN wm_score_package p ON t.score_package_id = p.id
-    JOIN wm_task_type b
-    left join sys_dict_item m on m.type='score_task_type' and m.`value`=b.parent_id
-    WHERE b.id = t.task_type_id
-    <if test="query.taskStatus != null and query.taskStatus != ''">
-      and t.task_status = #{query.taskStatus}
-    </if>
-    <if test="query.taskStatus == null or query.taskStatus == ''">
-      and t.task_status = 3
-    </if>
-    and t.enable_flag=0
-    and t.del_flag=0
-    <if test="query.id!=null and query.id!=''">
-      AND t.id in(${query.id})
-    </if>
-    GROUP BY
-    m.label
+		SELECT m.label AS   tasktypename,
+		SUM(t.score) tasksum,
+		COUNT(1)     taskcount
+		FROM wm_task t, wm_score_package p, wm_task_type b, sys_dict_item m
+		WHERE
+		b.id = t.task_type_id
+		and t.score_package_id = p.id
+		and m.type = 'score_task_type'
+		AND m.`value` = b.parent_id
+		AND t.enable_flag='0'
+		AND t.del_flag='0'
+		<if test="query.taskStatus != null and query.taskStatus != ''">
+			AND t.task_status = #{query.taskStatus}
+		</if>
+		<if test="query.taskStatus == null or query.taskStatus == ''">
+			AND t.task_status = '3'
+		</if>
+		<if test="query.id!=null and query.id!=''">
+			AND t.id IN(${query.id})
+		</if>
+		GROUP BY m.label
   </select>
 
   <select id="getTaskListByIdsZd" resultType="java.util.HashMap">