Explorar o código

林业人员可视化监控\植树造林管理系统\野生动物保护管理系统\林业资源\林业资源管理\起降点管理\水源信息管理\防火队管理\珍惜古树管理\林长牌管理\林业网格层级信息\林班数据图层层级\林业数据图层\重点防火地块

刘浩男 hai 1 ano
pai
achega
efa296a479
Modificáronse 31 ficheiros con 381 adicións e 66 borrados
  1. 15 1
      data-ui/src/views/data/digitalforest/afforestation/index.vue
  2. 16 2
      data-ui/src/views/data/digitalforest/afforestationarea/index.vue
  3. 16 2
      data-ui/src/views/data/digitalforest/animal/index.vue
  4. 16 2
      data-ui/src/views/data/digitalforest/changbrand/index.vue
  5. 17 2
      data-ui/src/views/data/digitalforest/channel/index.vue
  6. 16 2
      data-ui/src/views/data/digitalforest/fireteam/index.vue
  7. 16 2
      data-ui/src/views/data/digitalforest/gridLevel/index.vue
  8. 16 2
      data-ui/src/views/data/digitalforest/keyFireproofPlots/index.vue
  9. 16 2
      data-ui/src/views/data/digitalforest/landing/index.vue
  10. 16 2
      data-ui/src/views/data/digitalforest/linBan/index.vue
  11. 17 2
      data-ui/src/views/data/digitalforest/linBanTrees/index.vue
  12. 16 4
      data-ui/src/views/data/digitalforest/resources/index.vue
  13. 16 2
      data-ui/src/views/data/digitalforest/trees/index.vue
  14. 16 2
      data-ui/src/views/data/digitalwater/plan/index.vue
  15. 16 2
      data-ui/src/views/data/digitalwater/task/index.vue
  16. 4 0
      src/main/java/com/sooka/sponest/data/digitalwater/domain/CenterdataTHydraulicPatrolPlanRecord.java
  17. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestAfforestationMapper.xml
  18. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestAfforestationareaMapper.xml
  19. 32 8
      src/main/resources/mapper/digitalforest/CenterdataTForestAnimalMapper.xml
  20. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestChangbrandMapper.xml
  21. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestChannelMapper.xml
  22. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestFireteamMapper.xml
  23. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestGridLevelMapper.xml
  24. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestKeyFireproofPlotsMapper.xml
  25. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestLandingMapper.xml
  26. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestLinBanMapper.xml
  27. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestLinBanTreesMapper.xml
  28. 0 1
      src/main/resources/mapper/digitalforest/CenterdataTForestLinleaderMapper.xml
  29. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestResourcesMapper.xml
  30. 8 2
      src/main/resources/mapper/digitalforest/CenterdataTForestTreesMapper.xml
  31. 8 2
      src/main/resources/mapper/digitalwater/CenterdataTHydraulicPatrolPlanMapper.xml

+ 15 - 1
data-ui/src/views/data/digitalforest/afforestation/index.vue

@@ -33,6 +33,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--      <el-form-item label="执行人员" prop="executive">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.executive"-->
@@ -413,7 +422,7 @@
           completion: null,
           afforestationRemarks: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           forestFarmId: null,
           forestFarmName: null,
@@ -548,6 +557,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -634,6 +644,10 @@
         this.download('sooka-sponest-center-data/afforestation/export', {
           ...this.queryParams
         }, `植树计划_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/afforestationarea/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="区域编号" prop="afforestationareaCode">
         <el-input
           v-model="queryParams.afforestationareaCode"
@@ -49,6 +49,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--      <el-form-item label="部门id" prop="deptId">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.deptId"-->
@@ -375,7 +384,7 @@ export default {
         forestRegionalDivision: null,
         coverage: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataStatus: null,
         dataDeptId: null,
         points: null,
@@ -587,6 +596,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -667,6 +677,10 @@ export default {
       this.download('sooka-sponest-center-data/afforestationarea/export', {
         ...this.queryParams
       }, `植树区域_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 };

+ 16 - 2
data-ui/src/views/data/digitalforest/animal/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" v-if="['2','1','3'].includes(routeParams.wildlifeType)" :inline="true"
-             v-show="showSearch" label-width="68px" @submit.native.prevent>
+             v-show="showSearch" @submit.native.prevent>
       <el-form-item label="动物种类" prop="type">
         <el-select v-model="queryParams.type" placeholder="请选择动物种类" clearable size="small">
           <el-option
@@ -12,6 +12,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
        <!-- <el-form-item label="上报设备" prop="deviceList" v-if="['2'].includes(routeParams.wildlifeType)" clearable  label-width="120px">
           <el-select v-model="queryParams.deviceList" filterable placeholder="请选择上报设备">
             <el-option
@@ -390,7 +399,7 @@ export default {
         latitude: null,
         attachId: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         appearTime: null,
         wildlifeType: null,
       },
@@ -550,6 +559,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -644,6 +654,10 @@ export default {
         ...this.queryParams
       }, `${this.title}_${new Date().getTime()}.xlsx`)
     },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
+    }
   }
 };
 </script>

+ 16 - 2
data-ui/src/views/data/digitalforest/changbrand/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="brandName">
         <el-input
           v-model="queryParams.brandName"
@@ -9,6 +9,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -242,7 +251,7 @@
           longitude: null,
           latitude: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -366,6 +375,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -427,6 +437,10 @@
         this.download('sooka-sponest-center-data/changbrand/export', {
           ...this.queryParams
         }, `林长牌_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalforest/channel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -9,6 +9,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+
       <!--      <el-form-item label="经度" prop="longitude">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.longitude"-->
@@ -57,6 +58,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--      <el-form-item label="部门id" prop="deptId">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.deptId"-->
@@ -368,7 +378,7 @@
           channelPerson: null,
           channelTel: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           forestFarm: null,
           administrativePosition: null,
@@ -523,6 +533,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -602,6 +613,10 @@
         this.download('sooka-sponest-center-data/channel/export', {
           ...this.queryParams
         }, `水源信息_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/fireteam/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
@@ -9,6 +9,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -321,7 +330,7 @@
           fireteamPerson: null,
           fireteamTel: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null
         },
         // 表单参数
@@ -467,6 +476,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -528,6 +538,10 @@
         this.download('sooka-sponest-center-data/fireteam/export', {
           ...this.queryParams
         }, `防火队_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/gridLevel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px" @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"
@@ -20,6 +20,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -270,7 +279,7 @@ export default {
         person: null,
         tel: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         initParentId: "0",
       },
       lazyQueryParams:{
@@ -455,6 +464,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -518,6 +528,10 @@ export default {
         this.$modal.msgSuccess('删除成功')
       }).catch(() => {
       })
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
     }
   }
 }

+ 16 - 2
data-ui/src/views/data/digitalforest/keyFireproofPlots/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90"
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
@@ -20,6 +20,15 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -272,7 +281,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataDeptId: null,
         name: null,
         latitude: null,
@@ -406,6 +415,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -469,6 +479,10 @@ export default {
       this.download('sooka-sponest-center-data/keyFireproofPlots/export', {
         ...this.queryParams
       }, `重点防火地块_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 16 - 2
data-ui/src/views/data/digitalforest/landing/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90"
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <!--      <el-form-item label="纬度" prop="latitude">-->
       <!--        <el-input-->
@@ -90,6 +90,15 @@
       <!--          @keyup.enter.native="handleQuery"-->
       <!--        />-->
       <!--      </el-form-item>-->
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -361,7 +370,7 @@ export default {
         landingPerson: null,
         landingArea: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         dataStatus: null,
         dataDeptId: null
       },
@@ -501,6 +510,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -579,6 +589,10 @@ export default {
       this.download('sooka-sponest-center-data/landing/export', {
         ...this.queryParams
       }, `起降点_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 16 - 2
data-ui/src/views/data/digitalforest/linBan/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="林班名称" prop="farmName">
         <el-input
           v-model="queryParams.farmName"
@@ -64,6 +64,15 @@
                                           @keyup.enter.native="handleQuery"
                                   />
                               </el-form-item>-->
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -260,7 +269,7 @@ export default {
         datasetNames: null,
         name: null,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         linBanTreesId: null
       },
       // 表单参数
@@ -348,6 +357,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -438,6 +448,10 @@ export default {
       this.download('/sooka-sponest-center-data/linBan/export', {
         ...this.queryParams
       }, `林班数据图层_${new Date().getTime()}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 }

+ 17 - 2
data-ui/src/views/data/digitalforest/linBanTrees/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <!--                        <el-form-item label="上级部门" prop="parentId">
                                   <el-input
                                           v-model="queryParams.parentId"
@@ -37,6 +37,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </el-form-item>
       <!--                        <el-form-item label="超图地址" prop="supermapAddress">
                                   <el-input
                                           v-model="queryParams.supermapAddress"
@@ -209,7 +218,7 @@ export default {
         linBanTreesName: null,
         supermapAddress: null,
         deptId: null,
-        deptName: null
+        deptName: 0
       },
       // 表单参数
       form: {},
@@ -305,6 +314,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -362,7 +372,12 @@ export default {
         this.$modal.msgSuccess('删除成功')
       }).catch(() => {
       })
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 }
 </script>
+

+ 16 - 4
data-ui/src/views/data/digitalforest/resources/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"
-             @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="地类" prop="groundClass">
         <el-input
           v-model="queryParams.groundClass"
@@ -20,12 +19,20 @@
           />
         </el-select>
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -254,7 +261,7 @@
           forestCategory: null,
           forestTenure: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           dataStatus: null,
           dataDeptId: null
         },
@@ -347,6 +354,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -425,6 +433,10 @@
         this.download('sooka-sponest-center-data/resources/export', {
           ...this.queryParams
         }, `林业资源_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalforest/trees/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" @submit.native.prevent>
       <el-form-item label="名称" prop="treesName">
         <el-input
           v-model="queryParams.treesName"
@@ -9,6 +9,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -297,7 +306,7 @@
           treesType: null,
           treesRemarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {
@@ -455,6 +464,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -516,6 +526,10 @@
         this.download('sooka-sponest-center-data/trees/export', {
           ...this.queryParams
         }, `珍稀古树_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalwater/plan/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @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"
@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -218,7 +227,7 @@
           period: null,
           cycleFrequency: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           dataStatus: null
@@ -313,6 +322,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -426,6 +436,10 @@
         this.download('center-data/water/plan/export', {
           ...this.queryParams
         }, `${this.title}_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalwater/task/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"  @submit.native.prevent>
       <el-form-item label="所属计划" prop="planName">
         <el-input
           v-model="queryParams.planName"
@@ -10,6 +10,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item prop="deptId">
+        <template slot="label">
+          <span @click="changeQueryType" v-if="queryParams.deptName === 0">本级及下级</span>
+          <span @click="changeQueryType" v-if="queryParams.deptName === 1">只查询本级</span>
+        </template>
+        <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
+                    placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
+        <el-input v-model="queryParams.deptName" v-if="false"/>
+      </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>
@@ -220,7 +229,7 @@
           taskName: null,
           status: null,
           deptId: null,
-          deptName: null,
+          deptName: 0,
           createName: null,
           updateName: null,
           dataStatus: null
@@ -350,6 +359,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -469,6 +479,10 @@
         this.download('center-data/task/export', {
           ...this.queryParams
         }, `${this.title}_${new Date().getTime()}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 4 - 0
src/main/java/com/sooka/sponest/data/digitalwater/domain/CenterdataTHydraulicPatrolPlanRecord.java

@@ -88,4 +88,8 @@ public class CenterdataTHydraulicPatrolPlanRecord extends BaseBusinessEntity {
     //实际距离
     private String distance;
 
+    private String deptId;
+
+    private String deptName;
+
 }

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestAfforestationMapper.xml

@@ -63,8 +63,14 @@
             <if test="afforestationRemarks != null  and afforestationRemarks != ''">and a.afforestation_remarks =
                 #{afforestationRemarks}
             </if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and a.data_status = #{dataStatus}</if>
 
             <if test="forestFarmName != null  and forestFarmName != ''">and a.forest_farm_name = #{forestFarmName}</if>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestAfforestationareaMapper.xml

@@ -49,8 +49,14 @@
                 #{forestRegionalDivision}
             </if>
             <if test="coverage != null  and coverage != ''">and a.coverage = #{coverage}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and a.data_status = #{dataStatus}</if>
             <if test="points != null ">and a.points = #{points}</if>
             <if test="afforestationId != null ">and a.afforestation_id = #{afforestationId}</if>

+ 32 - 8
src/main/resources/mapper/digitalforest/CenterdataTForestAnimalMapper.xml

@@ -52,8 +52,14 @@
             <if test="longitude != null  and longitude != ''">and a.longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and a.latitude = #{latitude}</if>
             <if test="attachId != null  and attachId != ''">and a.attach_id = #{attachId}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.appear_time desc, a.create_time desc
@@ -79,8 +85,14 @@
             <if test="longitude != null  and longitude != ''">and a.longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and a.latitude = #{latitude}</if>
             <if test="attachId != null  and attachId != ''">and a.attach_id = #{attachId}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="type != null ">and a.type = #{type}</if>
             <if test="appearTime != null ">and a.appear_time = #{appearTime}</if>
             ${params.dataScope}
@@ -122,8 +134,14 @@
             <if test="longitude != null  and longitude != ''">and a.longitude like concat('%', #{longitude}, '%')</if>
             <if test="latitude != null  and latitude != ''">and a.latitude like concat('%', #{latitude}, '%')</if>
             <if test="attachId != null  and attachId != ''">and a.attach_id = #{attachId}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="appearTime != null ">and a.appear_time = #{appearTime}</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.appear_time desc, a.create_time desc
@@ -140,8 +158,14 @@
             <if test="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="attachId != null  and attachId != ''">and attach_id = #{attachId}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         group by a.type, a.dept_id

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestChangbrandMapper.xml

@@ -44,8 +44,14 @@
             <if test="brandRegion != null  and brandRegion != ''">and brand_region = #{brandRegion}</if>
             <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 dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestChannelMapper.xml

@@ -53,8 +53,14 @@
             <if test="volume != null  and volume != ''">and volume = #{volume}</if>
             <if test="channelPerson != null  and channelPerson != ''">and channel_person like concat('%', #{channelPerson}, '%')</if>
             <if test="channelTel != null  and channelTel != ''">and channel_tel like concat('%', #{channelTel}, '%')</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and data_status = #{dataStatus}</if>
             <if test="forestFarm != null  and forestFarm != ''">and forest_farm = #{forestFarm}</if>
             <if test="administrativePosition != null  and administrativePosition != ''">and administrative_position = #{administrativePosition}</if>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestFireteamMapper.xml

@@ -50,8 +50,14 @@
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="fireteamPerson != null  and fireteamPerson != ''">and fireteam_person = #{fireteamPerson}</if>
             <if test="fireteamTel != null  and fireteamTel != ''">and fireteam_tel = #{fireteamTel}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and data_status = #{dataStatus}</if>
             ${params.dataScope}
         </where>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestGridLevelMapper.xml

@@ -59,8 +59,14 @@
             <if test="longitude != null  and longitude != ''">and a.longitude = #{longitude}</if>
             <if test="person != null  and person != ''">and a.person = #{person}</if>
             <if test="tel != null  and tel != ''">and a.tel = #{tel}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="initParentId != null and initParentId != ''">and a.parent_id in (${initParentId})</if>
             ${params.dataScope}
         </where>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestKeyFireproofPlotsMapper.xml

@@ -37,8 +37,14 @@
             <if test="latitude != null  and latitude != ''">and a.latitude = #{latitude}</if>
             <if test="longitude != null  and longitude != ''">and a.longitude = #{longitude}</if>
             <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="linBan != null  and linBan != ''">and a.lin_ban = #{linBan}</if>
             <if test="xiaoBan != null  and xiaoBan != ''">and a.xiao_ban = #{xiaoBan}</if>
             <if test="forestSpecies != null  and forestSpecies != ''">and a.forest_species like concat('%', #{forestSpecies}, '%')</if>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestLandingMapper.xml

@@ -46,8 +46,14 @@
             <if test="landingTel != null  and landingTel != ''">and a.landing_tel like concat('%', #{landingTel}, '%')</if>
             <if test="landingPerson != null  and landingPerson != ''">and a.landing_person like concat('%', #{landingPerson}, '%')</if>
             <if test="landingArea != null  and landingArea != ''">and a.landing_area = #{landingArea}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and a.data_status = #{dataStatus}</if>
             ${params.dataScope}
         </where>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestLinBanMapper.xml

@@ -38,8 +38,14 @@
             <if test="supermapAddress != null  and supermapAddress != ''">and supermap_address = #{supermapAddress}</if>
             <if test="datasetNames != null  and datasetNames != ''">and dataset_names = #{datasetNames}</if>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="linBanTreesId != null ">and lin_ban_trees_id = #{linBanTreesId}</if>
             <if test="linBanTreesName != null ">and lin_ban_trees_name = #{linBanTreesName}</if>
             ${params.dataScope}

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestLinBanTreesMapper.xml

@@ -54,8 +54,14 @@
                 #{linBanTreesName}, '%')
             </if>
             <if test="supermapAddress != null  and supermapAddress != ''">and supermap_address = #{supermapAddress}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by order_num asc

+ 0 - 1
src/main/resources/mapper/digitalforest/CenterdataTForestLinleaderMapper.xml

@@ -55,7 +55,6 @@
             <if test="linName != null  and linName != ''">and a.lin_name like concat('%', #{linName},'%')</if>
             <if test="linPhone != null  and linPhone != ''">and a.lin_phone like concat('%', #{linPhone},'%')</if>
             <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name like concat('%', #{deptName}, '%')</if>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestResourcesMapper.xml

@@ -38,8 +38,14 @@
             <if test="groundClass != null  and groundClass != ''">and a.ground_class
                 like concat('%',#{groundClass}, '%')
             </if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="dataStatus != null  and dataStatus != ''">and a.data_status = #{dataStatus}</if>
             ${params.dataScope}
         </where>

+ 8 - 2
src/main/resources/mapper/digitalforest/CenterdataTForestTreesMapper.xml

@@ -53,8 +53,14 @@
             <if test="treesSpecies != null  and treesSpecies != ''">and a.trees_species = #{treesSpecies}</if>
             <if test="treesType != null  and treesType != ''">and a.trees_type = #{treesType}</if>
             <if test="treesRemarks != null  and treesRemarks != ''">and a.trees_remarks = #{treesRemarks}</if>
-            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and a.dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 2
src/main/resources/mapper/digitalwater/CenterdataTHydraulicPatrolPlanMapper.xml

@@ -44,8 +44,14 @@
             <if test="rank != null  and rank != ''"> and rank = #{rank}</if>
             <if test="period != null  and period != ''"> and period = #{period}</if>
             <if test="cycleFrequency != null  and cycleFrequency != ''"> and cycle_frequency = #{cycleFrequency}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
+            <if test="deptId != null">
+                <choose>
+                    <when test="deptName != null and deptName == 0">
+                        and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+                    </when>
+                    <otherwise>and d.dept_id = #{deptId}</otherwise>
+                </choose>
+            </if>
             <if test="createName != null  and createName != ''"> and create_name like concat('%', #{createName}, '%')</if>
             <if test="updateName != null  and updateName != ''"> and update_name like concat('%', #{updateName}, '%')</if>
             <if test="dataStatus != null  and dataStatus != ''"> and data_status = #{dataStatus}</if>