liyg vor 2 Jahren
Ursprung
Commit
4e6f08037a
1 geänderte Dateien mit 22 neuen und 8 gelöschten Zeilen
  1. 22 8
      src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

+ 22 - 8
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -375,18 +375,32 @@
     <select id="getLineByLike" resultType="java.util.Map">
         select * from(
         select
-        RC.LINE_ID "lineId",
-        RC.LINE_NAME "lineName",
-        RC.LINE_ID "id",
-        RC.LINE_ID "value",
-        RC.LINE_NAME "label",
-        RC.LINE_NAME "text"
-        from RMS_LINE RC
+        RL.LINE_ID "lineId",
+        RL.LINE_NAME "lineName",
+        RL.LINE_ID "id",
+        RL.LINE_ID "value",
+        RL.LINE_NAME "label",
+        RL.LINE_NAME "text",
+        NVL(RL_TEMP."points",'无') "points"
+        from RMS_LINE RL
+        LEFT JOIN
+        (
+        SELECT
+        RLS .LINE_ID "lineId",
+        listagg (DISTINCT ROP .OPERATION_POINT_NAME, ',') WITHIN GROUP (ORDER BY RLS .LINE_ID) "points"
+        FROM
+        RMS_LINE_STEP RLS
+        LEFT JOIN RMS_STEP_POINT RSP
+        ON RLS .STEP_ID = RSP .STEP_ID
+        LEFT JOIN RMS_OPERATION_POINT ROP
+        ON RSP .OPERATION_POINT_ID = ROP .OPERATION_POINT_ID
+        GROUP BY RLS .LINE_ID
+        ) RL_TEMP ON RL_TEMP ."lineId" = RL .LINE_ID
         where DELETED = 0
         )
         <where>
             <if test="index!=null and index!=''">
-                AND REGEXP_LIKE("label", #{index})
+                AND REGEXP_LIKE("label" || "points", #{index})
             </if>
             <if test="id!=null and !(index!=null and index!='')">
                 AND "id" in