|
@@ -135,6 +135,7 @@
|
|
|
t.name,
|
|
|
t.phone,
|
|
|
t.gridId,
|
|
|
+ t.sort,
|
|
|
t.createTime,
|
|
|
REPLACE ( group_concat( dept_name ORDER BY find_in_set( d.dept_id, t.ancestors ) ), ',', '' ) deptName
|
|
|
FROM(
|
|
@@ -146,11 +147,11 @@
|
|
|
a.phone AS phone,
|
|
|
a.post post,
|
|
|
a.grid_id gridId,
|
|
|
+ a.sort,
|
|
|
a.create_time createTime,
|
|
|
SUBSTR( CONCAT( d.ancestors, ',', a.dept_id ), 7 ) ancestors
|
|
|
- FROM
|
|
|
- centerdata_t_hydraulic_river_length a
|
|
|
- LEFT JOIN onest_system.sys_dept d ON a.dept_id = d.dept_id
|
|
|
+ FROM centerdata_t_hydraulic_river_length a
|
|
|
+ LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
|
|
|
<where>
|
|
|
<if test="leadType != null and leadType != ''">
|
|
|
a.type = #{leadType}
|
|
@@ -158,12 +159,9 @@
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
) t
|
|
|
- LEFT JOIN
|
|
|
- onest_system.sys_dept d ON find_in_set( d.dept_id, t.ancestors )
|
|
|
- GROUP BY
|
|
|
- t.name
|
|
|
- order by
|
|
|
- t.createTime
|
|
|
+ LEFT JOIN ${database_system}.sys_dept d ON find_in_set( d.dept_id, t.ancestors )
|
|
|
+ GROUP BY t.name
|
|
|
+ order by t.sort, t.createTime desc
|
|
|
</select>
|
|
|
|
|
|
<select id="getGridList" parameterType="WaterConservancyViewBO" resultType="map">
|