Explorar el Código

feat: supervision order by chk_his create_time

shc hace 4 meses
padre
commit
c26a434fcb

+ 13 - 2
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmTaskMapper.xml

@@ -1404,12 +1404,18 @@
         #{id}
       </foreach>
     </if>
+    ORDER BY c.create_time1
   </select>
 
   <select id="listAvailableTaskForSupervision1" resultMap="wmTaskMap">
     SELECT *
     FROM wm_task t
-    RIGHT JOIN (SELECT DISTINCT h.target_id FROM sys_chain_node_check_his h WHERE h.node_id = 6 AND h.check_result = 1) c ON c.target_id = t.id
+    RIGHT JOIN (SELECT DISTINCT h.target_id
+                FROM sys_chain_node_check_his h
+                WHERE h.node_id = 6
+                  AND h.check_result = 1
+                ORDER BY h.create_time1
+                ) c ON c.target_id = t.id
     <where>
       t.task_status = '3'
       <if test="pkgIds != null and pkgIds.size > 0">
@@ -1431,7 +1437,12 @@
   <select id="listAvailableTaskForSupervision2" resultMap="wmTaskMap">
     SELECT *
     FROM wm_task t
-    RIGHT JOIN (SELECT DISTINCT h.target_id FROM sys_chain_node_check_his h WHERE h.node_id = 6 AND h.check_result = 1) c ON c.target_id = t.id
+    RIGHT JOIN (SELECT DISTINCT h.target_id
+                FROM sys_chain_node_check_his h
+                WHERE h.node_id = 6
+                  AND h.check_result = 1
+                ORDER BY h.create_time1
+                ) c ON c.target_id = t.id
     <where>
       t.task_status = '3'
       <if test="pkgIds != null and pkgIds.size > 0">