瀏覽代碼

林河路田数据图层,添加负责人检索

lyq 1 年之前
父節點
當前提交
21f765e605

+ 12 - 2
data-ui/src/views/data/digitaltraffic/level/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <div class="DAFF-common-layout-main DAFF-flex-main" v-if="!open">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" @submit.native.prevent>
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
         <el-form-item label="名称" prop="name">
           <el-input
             v-model="queryParams.name"
@@ -26,6 +26,14 @@
             size="small"
             @keyup.enter.native="handleQuery"/>
         </el-form-item>
+        <el-form-item label="负责人" prop="personName">
+          <el-input
+            v-model="queryParams.personName"
+            placeholder="请输入负责人"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"/>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -89,6 +97,7 @@
         <el-table-column label="经度" align="center" prop="longitude"/>
         <el-table-column label="纬度" align="center" prop="latitude"/>
         <el-table-column label="所属部门" align="center" prop="deptName"/>
+        <el-table-column label="负责人" align="center" prop="personName" />
         <el-table-column label="创建人" align="center" prop="createName" />
         <el-table-column label="创建时间" align="center" prop="createTime" />
         <el-table-column label="修改人" align="center" prop="updateName" />
@@ -163,7 +172,8 @@ export default {
         mapName: null,
         deptId: null,
         type: null,
-        deptName: null
+        deptName: null,
+        personName: null
       },
     };
   },

+ 1 - 1
src/main/java/com/sooka/sponest/data/digitaltraffic/domain/CenterdataTSupermapLevel.java

@@ -99,5 +99,5 @@ public class CenterdataTSupermapLevel extends BaseBusinessEntity {
     @JsonProperty("userList")
     private List<CenterdataTLevelPersonN> userList;
 
-
+    private String personName;
 }

+ 8 - 3
src/main/resources/mapper/digitaltraffic/CenterdataTSupermapLevelMapper.xml

@@ -21,7 +21,7 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="updateName" column="update_name"/>
-
+        <result property="personName" column="person_name"/>
     </resultMap>
 
     <sql id="selectCenterdataTSupermapLevelVo">
@@ -32,7 +32,10 @@
     <select id="selectCenterdataTSupermapLevelList" parameterType="CenterdataTSupermapLevel"
             resultMap="CenterdataTSupermapLevelResult">
         SELECT a.id, a.name, a.map_address,a.type, a.map_data, a.map_name, a.longitude, a.latitude, a.dept_id,
-        a.dept_name,a.create_by,a.create_time,a.create_name,a.update_by,a.update_time,a.update_name  FROM centerdata_t_supermap_level a
+        a.dept_name, a.create_by, a.create_time, a.create_name, a.update_by, a.update_time, a.update_name,
+        group_concat(p.person_name) person_name
+        FROM centerdata_t_supermap_level a
+        LEFT JOIN centerdata_t_level_person_n p ON p.supermap_level_id = a.id
         LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = a.dept_id
         <where>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
@@ -42,10 +45,12 @@
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if>
-            <if test="type != null  and type != ''">and type = #{type}</if>
+            <if test="type != null  and type != ''">and a.type = #{type}</if>
             <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="personName != null and personName != ''">and p.person_name like concat('%',#{personName},'%')</if>
             ${params.dataScope}
         </where>
+        GROUP BY a.id
         ORDER BY a.create_time DESC
     </select>