瀏覽代碼

秸秆还田管理\农业基础数据管理\农业机械化管理添加部门查询栏

刘浩男 1 年之前
父節點
當前提交
095cbe732f
共有 30 個文件被更改,包括 365 次插入230 次删除
  1. 20 4
      data-ui/src/views/data/digitalagriculture/agricultural_cooperatives/index.vue
  2. 20 4
      data-ui/src/views/data/digitalagriculture/agricultural_machinery_info/index.vue
  3. 18 2
      data-ui/src/views/data/digitalagriculture/along/index.vue
  4. 0 180
      data-ui/src/views/data/digitalagriculture/animalhusbandry_info/index.vue
  5. 19 3
      data-ui/src/views/data/digitalagriculture/botany_protect_info/index.vue
  6. 17 2
      data-ui/src/views/data/digitalagriculture/breedingFarm/index.vue
  7. 16 2
      data-ui/src/views/data/digitalagriculture/cesspitCollect/index.vue
  8. 19 3
      data-ui/src/views/data/digitalagriculture/chemical_fertilizer_info/index.vue
  9. 17 2
      data-ui/src/views/data/digitalagriculture/enterprise/index.vue
  10. 16 2
      data-ui/src/views/data/digitalagriculture/excrementdispose/index.vue
  11. 17 2
      data-ui/src/views/data/digitalagriculture/filingsLivestock/index.vue
  12. 17 1
      data-ui/src/views/data/digitalagriculture/garbage_transfer/index.vue
  13. 16 2
      data-ui/src/views/data/digitalagriculture/greenhousefilm/index.vue
  14. 17 2
      data-ui/src/views/data/digitalagriculture/livestock/index.vue
  15. 16 2
      data-ui/src/views/data/digitalagriculture/modification/index.vue
  16. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalCooperativesMapper.xml
  17. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalMachineryInfoMapper.xml
  18. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalSuperviseMapper.xml
  19. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmAutumnHarvestScheduleMapper.xml
  20. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmBotanyProtectInfoMapper.xml
  21. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmBreedingFarmMapper.xml
  22. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmChemicalFertilizerInfoMapper.xml
  23. 8 2
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmComplexModificationMapper.xml
  24. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmEnterpriseMapper.xml
  25. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmExcrementDisposeMapper.xml
  26. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmFilingsLivestockMapper.xml
  27. 8 1
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmFoodstuffAlongMapper.xml
  28. 8 2
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmGarbageTransferMapper.xml
  29. 8 2
      src/main/resources/mapper/digitalagriculture/CenterdataTFarmGreenhouseFilmMapper.xml
  30. 8 0
      src/main/resources/mapper/digitalagriculture/centerdataTFarmCesspitCollectMapper.xml

+ 20 - 4
data-ui/src/views/data/digitalagriculture/agricultural_cooperatives/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="名称" prop="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入名称"
@@ -27,7 +27,7 @@
           placeholder="选择注册时间">
         </el-date-picker>
       </el-form-item>-->
-      <el-form-item label-width="130px" label="法人姓名" prop="legalPerson">
+      <el-form-item  label="法人姓名" prop="legalPerson">
         <el-input
           v-model="queryParams.legalPerson"
           placeholder="请输入法人姓名"
@@ -36,7 +36,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="联系电话" prop="phone">
+      <el-form-item  label="联系电话" prop="phone">
         <el-input
           v-model="queryParams.phone"
           placeholder="请输入联系电话"
@@ -81,6 +81,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>
@@ -462,6 +471,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -630,6 +641,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -723,6 +735,10 @@
         this.download('/center-data/Cooperatives/export', {
           ...this.queryParams
         }, `农民合作社_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 20 - 4
data-ui/src/views/data/digitalagriculture/agricultural_machinery_info/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="单位名称" prop="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="单位名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入单位名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="法人姓名" prop="legalPerson">
+      <el-form-item  label="法人姓名" prop="legalPerson">
         <el-input
           v-model="queryParams.legalPerson"
           placeholder="请输入法人姓名"
@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="联系电话" prop="phone">
+      <el-form-item  label="联系电话" prop="phone">
         <el-input
           v-model="queryParams.phone"
           placeholder="请输入联系电话"
@@ -28,6 +28,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>
@@ -328,6 +337,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -459,6 +470,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -556,6 +568,10 @@
         this.download('/center-data/AgriculturalMachineryInfo/export', {
           ...this.queryParams
         }, `农机技术推广部门信息_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 18 - 2
data-ui/src/views/data/digitalagriculture/along/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="time">
         <el-date-picker clearable
                         v-model="queryParams.time"
@@ -9,6 +9,15 @@
                         placeholder="选择时间">
         </el-date-picker>
       </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>
@@ -219,7 +228,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           time: null,
           address: null,
           cornGrowingPeriod: null,
@@ -231,6 +241,7 @@
           soyaGrowingPeriod: null,
           soyaHeight: null,
           soyaBladeNum: null
+
         },
         // 表单参数
         form: {},
@@ -331,6 +342,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -392,6 +404,10 @@
         this.download('center-data/along/export', {
           ...this.queryParams
         }, `粮食作物长势_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 0 - 180
data-ui/src/views/data/digitalagriculture/animalhusbandry_info/index.vue

@@ -71,64 +71,14 @@ import {
       return {
         // 遮罩层
         loading: true,
-        // 选中数组
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
         // 显示搜索条件
         showSearch: true,
-        // 显示超图经纬度
-        showLongitude: false,
-        // 显示超图弹层标题
-        titleLongitude: '经纬度',
         // 总条数
         total: 0,
-        // 弹出层宽度
-        labelWidth: '150px',
-        // 文本框宽度
-        inputStyle: 'width: 310px',
         // 畜牧信息统计信息表格数据
         AgriculturalMachineryInfoList: [],
-        // 弹出层标题
-        title: "",
-        // 是否显示弹出层
-        open: false,
         // 部门名称
         deptName: undefined,
-        // 部门树选项
-        deptOptions: undefined,
-        // 导入参数
-        upload: {
-          // 是否显示导入弹出层
-          open: false,
-          // 导入弹出层标题
-          title: '',
-          // 是否禁用上传
-          isUploading: false,
-          // 是否更新已经存在的数据
-          updateSupport: 0,
-          // 设置上传的请求头部
-          headers: {Authorization: 'Bearer ' + getToken()},
-          // 上传的地址
-          url: process.env.VUE_APP_BASE_API + '/center-data/AgriculturalMachineryInfo/import/importData'
-        },
-        // 是否禁用弹出层表单
-        disable: false,
-        // 查询参数
-        queryParams: {
-          pageNum: 1,
-          pageSize: 10,
-          name: null,
-          deptId: null,
-          deptName: null,
-          varieties: null,
-          designMaintainCount: null,
-          designOfftakeCount: null,
-          realityMaintainCount: null,
-          realityOfftakeCount: null,
-        },
         // 表单参数
         form: {},
         // 正整数校验
@@ -167,16 +117,6 @@ import {
         this.form.deptId = e.deptId
         this.form.deptName = e.deptName
       },
-      // 筛选节点
-      filterNode(value, data) {
-        if (!value) return true
-        return data.label.indexOf(value) !== -1
-      },
-      // 节点单击事件
-      handleNodeClick(data) {
-        this.queryParams.deptId = data.id
-        this.handleQuery()
-      },
       /** 查询畜牧信息技术列表 */
       getList() {
         this.loading = true;
@@ -199,126 +139,6 @@ import {
       hx(node) {
         this.queryParams.deptId = node.id
       },
-      // 取消按钮
-      cancel() {
-        this.open = false;
-        this.reset();
-      },
-      // 表单重置
-      reset() {
-        this.form = {
-          name: null,
-          deptId: null,
-          deptName: null,
-          varieties: null,
-          designMaintainCount: null,
-          designOfftakeCount: null,
-          realityMaintainCount: null,
-          realityOfftakeCount: null,
-        };
-        this.resetForm("form");
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams.deptId = undefined;
-        this.queryParams.varieties = undefined;
-        this.resetForm("queryForm");
-        this.handleQuery();
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length !== 1
-        this.multiple = !selection.length
-      },
-      /** 新增按钮操作 */
-      handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加畜牧信息技术信息";
-      },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        this.reset();
-        let _this = this;
-        const id = row.id || this.ids
-        getAgriculturalMachineryInfo(id).then(response => {
-          this.form = response.data;
-          this.title = "修改畜牧信息技术信息";
-          this.open = true;
-          // treeselect().then(response => {
-          //   _this.deptOptions = response.data;
-          //   treeselectAll().then(response => {
-          //     addDeptToTreeSelect(_this.form.deptId, _this.deptOptions, response.data[0]);
-          //     this.open = true;
-          //   });
-          // });
-        });
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            // this.form.deptName = this.deptOptions.filter((item) => {
-            //   return this.form.deptId == item.id;
-            // })[0].label;
-            if (this.form.id != null) {
-              updateAgriculturalMachineryInfo(this.form).then(response => {
-                this.$modal.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addAgriculturalMachineryInfo(this.form).then(response => {
-                this.$modal.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        });
-      },
-      /** 删除按钮操作 */
-      handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$modal.confirm('是否删除选中的数据?').then(function () {
-          return delAgriculturalMachineryInfo(ids);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {
-        });
-      },
-      /** 导入按钮操作 */
-      handleImport() {
-        this.upload.title = '导入'
-        this.upload.open = true
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-        this.download('/center-data/AgriculturalMachineryInfo/importTemplate', {}, `AgriculturalMachineryInfo_template_${new Date().getTime()}.xlsx`)
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-        this.upload.isUploading = true
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-        this.upload.open = false
-        this.upload.isUploading = false
-        this.$refs.upload.clearFiles()
-        this.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', {dangerouslyUseHTMLString: true})
-        this.getList()
-      },
-      // 提交上传文件
-      submitFileForm() {
-        this.$refs.upload.submit()
-      },
       /** 导出按钮操作 */
       handleExport() {
         this.download('/center-data/husbandry/export', {

+ 19 - 3
data-ui/src/views/data/digitalagriculture/botany_protect_info/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="名称" prop="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="详细通讯地址" prop="address">
+      <el-form-item  label="详细通讯地址" prop="address">
         <el-input
           v-model="queryParams.address"
           placeholder="请输入详细通讯地址"
@@ -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>
@@ -443,6 +452,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -602,6 +613,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -695,6 +707,10 @@
         this.download('/center-data/BotanyProtectInfo/export', {
           ...this.queryParams
         }, `农业技术推广总站信息_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/breedingFarm/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true" label-width="90px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="true"  @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>
@@ -342,7 +351,8 @@
           processing: null,
           longitude: null,
           latitude: null,
-
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -487,6 +497,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -549,6 +560,10 @@
         this.download('center-data/breedingFarm/export', {
           ...this.queryParams
         }, `养殖场_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/cesspitCollect/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"
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"
              @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
@@ -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>
@@ -217,7 +226,7 @@ export default {
         createName: null,
         updateName: null,
         deptId: null,
-        deptName: null
+        deptName: 0
       },
       // 表单参数
       form: {},
@@ -327,6 +336,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -388,6 +398,10 @@ export default {
       this.download('center-data/cesspitCollect/export', {
         ...this.queryParams
       }, `粪污收集点_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 19 - 3
data-ui/src/views/data/digitalagriculture/chemical_fertilizer_info/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
-      <el-form-item label-width="130px" label="化肥名称" prop="name">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
+      <el-form-item  label="化肥名称" prop="name">
         <el-input
           v-model="queryParams.name"
           placeholder="请输入化肥名称"
@@ -10,7 +10,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label-width="130px" label="厂家" prop="manufactor">
+      <el-form-item  label="厂家" prop="manufactor">
         <el-input
           v-model="queryParams.manufactor"
           placeholder="请输入厂家"
@@ -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>
         <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>
@@ -330,6 +339,8 @@ export default {
         createDate: null,
         updateDate: null,
         remarks: null,
+        deptId: null,
+        deptName: 0,
       },
       // 表单参数
       form: {},
@@ -425,6 +436,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -511,6 +523,10 @@ export default {
       this.download('/center-data/ChemicalFertilizerInfo/export', {
         ...this.queryParams
       }, `化肥信息_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/enterprise/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"
@@ -17,6 +17,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>
@@ -309,7 +318,7 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           name: null,
@@ -323,6 +332,7 @@
           designScale: null,
           contacts: null,
           phone: null,
+          deptId: null,
         },
 
         // 表单参数
@@ -471,6 +481,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -574,6 +585,10 @@
         this.download('center-data/enterprise/export', {
           ...this.queryParams
         }, str+`_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/excrementdispose/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"
@@ -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>
@@ -282,7 +291,7 @@
           updateTime: null,
           remarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -404,6 +413,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -471,6 +481,10 @@
         this.download('center-data/excrementdispose/export', {
           ...this.queryParams
         }, `区域性粪污处置中心_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/filingsLivestock/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" @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"
@@ -25,6 +25,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>
@@ -332,7 +341,7 @@
           pageSize: 10,
           name: null,
           address: null,
-          deptName: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           contacts: null,
@@ -344,6 +353,7 @@
           realityOfftakeCount: null,
           urineReservoirArea: null,
           dumpArea: null,
+          deptId: null,
           dataSource: null
         },
         // 表单参数
@@ -494,6 +504,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -564,6 +575,10 @@
         this.download('center-data/filingsLivestock/export', {
           ...this.queryParams
         }, `备案畜禽规模养殖场_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 1
data-ui/src/views/data/digitalagriculture/garbage_transfer/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch" label-width="68px" @submit.native.prevent>
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-if="showSearch"  @submit.native.prevent>
       <el-form-item label-width="100px" 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>
@@ -233,6 +242,8 @@
           createDate: null,
           updateDate: null,
           remarks: null,
+          deptId: null,
+          deptName: 0,
         },
         // 表单参数
         form: {},
@@ -350,6 +361,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -420,6 +432,10 @@
         this.download('/center-data/garbageTransfer/export', {
           ...this.queryParams
         }, `垃圾转输站_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/greenhousefilm/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px" @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"
@@ -25,6 +25,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>
@@ -372,7 +381,7 @@
           greenhouseArea: null,
           hothouseBuilds: null,
           hothouseArea: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -519,6 +528,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -586,6 +596,10 @@
         this.download('center-data/greenhousefilm/export', {
           ...this.queryParams
         }, `棚膜信息_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 17 - 2
data-ui/src/views/data/digitalagriculture/livestock/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" @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"
@@ -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>
@@ -303,7 +312,8 @@
         queryParams: {
           pageNum: 1,
           pageSize: 10,
-          deptName: null,
+          deptId: null,
+          deptName: 0,
           longitude: null,
           latitude: null,
           name: null,
@@ -476,6 +486,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -543,6 +554,10 @@
         this.download('center-data/livestock/export', {
           ...this.queryParams
         }, `种畜禽养殖场_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName === 0 ? 1 : 0;
       }
     }
   };

+ 16 - 2
data-ui/src/views/data/digitalagriculture/modification/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"
@@ -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>
@@ -275,7 +284,7 @@
           updateTime: null,
           remarks: null,
           deptId: null,
-          deptName: null
+          deptName: 0
         },
         // 表单参数
         form: {},
@@ -393,6 +402,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams.deptName = 0;
         this.resetForm("queryForm");
         this.handleQuery();
       },
@@ -460,6 +470,10 @@
         this.download('center-data/modification/export', {
           ...this.queryParams
         }, `肉牛基层繁改站_${format_date(new Date())}.xlsx`)
+      },
+      // 点击按钮修改是否只查询本级部门用户
+      changeQueryType() {
+        this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
       }
     }
   };

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalCooperativesMapper.xml

@@ -67,7 +67,14 @@
             </if>
             <if test="landAddress != null  and landAddress != ''">and a.land_address = #{landAddress}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{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>
             ${params.dataScope}
         </where>
         order BY create_time DESC

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalMachineryInfoMapper.xml

@@ -61,7 +61,14 @@
             <if test="updateName != null and updateName != ''">and updat_name = #{updateName}</if>
             <if test="updateTime != null ">and update_time = #{updateTime}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{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>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmAgriculturalSuperviseMapper.xml

@@ -38,7 +38,14 @@
         from centerdata_t_farm_agricultural_supervise a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <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="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="time != null ">and time = #{time}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmAutumnHarvestScheduleMapper.xml

@@ -43,7 +43,14 @@
         from centerdata_t_farm_autumn_harvest_schedule a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <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="time != null ">and time = #{time}</if>
             <if test="address != null  and address != ''">and address = #{address}</if>
             <if test="cornReapArea != null  and cornReapArea != ''">and corn_reap_area = #{cornReapArea}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmBotanyProtectInfoMapper.xml

@@ -59,7 +59,14 @@
             <if test="createDate != null ">and a.create_date = #{createDate}</if>
             <if test="updateDate != null ">and a.update_date = #{updateDate}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{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>
             ${params.dataScope}
         </where>
         ORDER BY create_time DESC

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmBreedingFarmMapper.xml

@@ -42,7 +42,14 @@
         <where>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
             <if test="address != null  and address != ''">and address = #{address}</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="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="varieties != null  and varieties != ''">and varieties = #{varieties}</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmChemicalFertilizerInfoMapper.xml

@@ -45,7 +45,14 @@
             <if test="createDate != null ">and a.create_date = #{createDate}</if>
             <if test="updateDate != null ">and a.update_date = #{updateDate}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</if>
-            <if test="deptId != null  and deptId != ''">and a.deptId = #{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>
             ${params.dataScope}
         </where>
         ORDER BY create_time DESC

+ 8 - 2
src/main/resources/mapper/digitalagriculture/CenterdataTFarmComplexModificationMapper.xml

@@ -43,8 +43,14 @@
             <if test="phone != null  and phone != ''">and a.phone = #{phone}</if>
             <if test="content != null  and content != ''">and a.content = #{content}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</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 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmEnterpriseMapper.xml

@@ -42,7 +42,14 @@
         left join centerdata_t_attach b on b.bus_id = a.attach_id
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <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="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmExcrementDisposeMapper.xml

@@ -43,7 +43,14 @@
             <if test="contacts != null  and contacts != ''">and a.contacts like concat('%', #{contacts}, '%')</if>
             <if test="phone != null  and phone != ''">and a.phone = #{phone}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</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>
             ${params.dataScope}
         </where>
         order by a.create_time desc

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmFilingsLivestockMapper.xml

@@ -45,7 +45,14 @@
         <where>
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
             <if test="address != null  and address != ''">and address = #{address}</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="longitude != null  and longitude != ''">and longitude = #{longitude}</if>
             <if test="latitude != null  and latitude != ''">and latitude = #{latitude}</if>
             <if test="contacts != null  and contacts != ''">and contacts like concat('%', #{contacts}, '%')</if>

+ 8 - 1
src/main/resources/mapper/digitalagriculture/CenterdataTFarmFoodstuffAlongMapper.xml

@@ -39,7 +39,14 @@
         from centerdata_t_farm_foodstuff_along a
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <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="time != null ">and time = #{time}</if>
             <if test="address != null  and address != ''">and address = #{address}</if>
             <if test="cornGrowingPeriod != null  and cornGrowingPeriod != ''">and corn_growing_period =

+ 8 - 2
src/main/resources/mapper/digitalagriculture/CenterdataTFarmGarbageTransferMapper.xml

@@ -51,8 +51,14 @@
             <if test="updateBy != null  and updateBy != ''">and update_by = #{updateBy}</if>
             <if test="updateName != null  and updateName != ''">and update_name = #{updateName}</if>
             <if test="updateTime != null ">and update_time = #{updateTime}</if>
-            <if test="deptId != null  and deptId != ''">and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''">and dept_name = #{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/digitalagriculture/CenterdataTFarmGreenhouseFilmMapper.xml

@@ -60,8 +60,14 @@
             <if test="contacts != null  and contacts != ''">and a.contacts like concat('%', #{contacts}, '%')</if>
             <if test="phone != null  and phone != ''">and a.phone = #{phone}</if>
             <if test="remarks != null  and remarks != ''">and a.remarks = #{remarks}</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 - 0
src/main/resources/mapper/digitalagriculture/centerdataTFarmCesspitCollectMapper.xml

@@ -29,6 +29,14 @@
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
             <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</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