Jelajahi Sumber

农村集体耕地

hanfucheng 1 tahun lalu
induk
melakukan
68d841f110

+ 184 - 38
data-ui/src/views/data/digitalagriculture/collective_farmland/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" label-width="90px"
              @submit.native.prevent>
       <el-form-item label="名称" prop="name">
         <el-input
@@ -11,15 +11,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-<!--      <el-form-item label="许可证号" prop="license">-->
-<!--        <el-input-->
-<!--          v-model="queryParams.license"-->
-<!--          placeholder="请输入许可证号"-->
-<!--          clearable-->
-<!--          size="small"-->
-<!--          @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>
@@ -79,12 +79,12 @@
     <el-table v-loading="loading" :data="farmlandList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="名称" align="center" prop="name"/>
-      <el-table-column label="联系人" align="center" prop="contacts"/>
-      <el-table-column label="联系电话" align="center" prop="phone"/>
+      <el-table-column label="类型" align="center" prop="typeLabel"/>
+      <el-table-column label="集体耕地总面积合计(亩)" align="center" prop="collectiveFarmland"/>
+      <el-table-column label="家庭承包面积(亩)" align="center" prop="homeContracting"/>
+      <el-table-column label="其他集体耕地面积合计(亩)" align="center" prop="otherCollectiveFarmland"/>
       <el-table-column label="经度" align="center" prop="longitude"/>
       <el-table-column label="纬度" align="center" prop="latitude"/>
-      <el-table-column label="经营范围" align="center" prop="limits"/>
-      <el-table-column label="许可证号" align="center" prop="license"/>
       <el-table-column label="所属部门" align="center" prop="deptName"/>
       <el-table-column label="创建人" align="center" prop="createName"/>
       <el-table-column label="创建时间" align="center" prop="createTime"/>
@@ -121,8 +121,8 @@
     />
 
     <!-- 添加或修改农村集体耕地对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="1000px"  class="form-style">
-      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+    <el-dialog :title="title" :visible.sync="open" width="1200px"  class="form-style">
+      <el-form ref="form" :model="form" :rules="rules" label-width="240px">
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="名称" prop="name">
@@ -130,8 +130,15 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="许可证号" prop="license">
-              <el-input v-model="form.license" placeholder="请输入许可证号" maxlength="32"/>
+            <el-form-item label="类型" prop="type">
+              <el-select v-model="form.type" placeholder="请选择类型">
+                <el-option
+                  v-for="item in dict.type.centerdata_land_type"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -149,25 +156,85 @@
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item label="联系人" prop="contacts">
-              <el-input v-model="form.contacts" placeholder="请输入联系人" maxlength="20"/>
+            <el-form-item label="承包地(亩)" prop="contractedLand">
+              <el-input v-model="form.contractedLand" placeholder="请输入承包地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="机动地(亩)" prop="maneuverableLand">
+              <el-input v-model="form.maneuverableLand" placeholder="请输入机动地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="独生子女地(亩)" prop="onlyChildLand">
+              <el-input v-model="form.onlyChildLand" placeholder="请输入独生子女地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="全户消亡地(亩)" prop="extinctionLand">
+              <el-input v-model="form.extinctionLand" placeholder="请输入全户消亡地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="其他集体耕地面积合计(亩)" prop="otherCollectiveFarmland">
+              <el-input v-model="form.otherCollectiveFarmland" placeholder="请输入其他集体耕地面积合计(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="四荒地" prop="fourWastelandsLand">
+              <el-input v-model="form.fourWastelandsLand" placeholder="请输入四荒地" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="集体耕地总面积合计(亩)" prop="collectiveFarmland">
+              <el-input v-model="form.collectiveFarmland" placeholder="请输入集体耕地总面积合计(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="家庭承包面积(亩)" prop="homeContracting">
+              <el-input v-model="form.homeContracting" placeholder="请输入家庭承包面积(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="二轮承包地后开垦地、复垦地(亩)" prop="reclaimLang">
+              <el-input v-model="form.reclaimLang" placeholder="请输入二轮承包地后开垦地、复垦地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="农户交回的家庭承包地(亩)" prop="returnableLand">
+              <el-input v-model="form.returnableLand" placeholder="请输入农户交回的家庭承包地(亩)" maxlength="13"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="校田地" prop="schoolLand">
+              <el-input v-model="form.schoolLand" placeholder="请输入校田地" maxlength="13"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="联系电话" prop="phone">
-              <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="13"/>
+            <el-form-item label="其中:由村经营的校田地" prop="villageSchoolLand">
+              <el-input v-model="form.villageSchoolLand" placeholder="请输入其中:由村经营的校田地" maxlength="13"/>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item label="经营范围" prop="limits">
-              <el-input v-model="form.limits" placeholder="请输入经营范围" maxlength="32"/>
+            <el-form-item label="水面" prop="waterArea">
+              <el-input v-model="form.waterArea" placeholder="请输入水面" maxlength="13"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="地点" prop="address">
-              <el-input v-model="form.address" placeholder="请输入地点" maxlength="255"/>
+            <el-form-item label="林地面积" prop="forestArea">
+              <el-input v-model="form.forestArea" placeholder="请输入林地面积" maxlength="13"/>
             </el-form-item>
           </el-col>
         </el-row>
@@ -192,6 +259,13 @@
           </el-col>
         </el-row>
         <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" maxlength="255"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="图片" prop="attachPaths">
               <ImageUpload ref="ImageUpload" :limit="1" :fileType="['png', 'jpg', 'jpeg']"
@@ -224,16 +298,19 @@ import Treeselect from "@riophae/vue-treeselect";
 import {treeselect} from "@/api/system/dept";
 import {format_date} from "@/views/data/common/dateExport";
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-import {checkLat, checkLon, validPhoneMobile} from "@/api/rules/rules";
+import {checkLat, checkLon, checkPositiveDecimal, validPhoneMobile} from "@/api/rules/rules";
 import ISuperMap from "@/views/data/common/ISuperMap.vue";
 
 export default {
   name: "Farmland",
   components: {ISuperMap, Treeselect, DataImageUpload},
+  dicts: ['centerdata_land_type'],
   data() {
     return {
       ISuperMapvisible: false,
       sign: 1,
+      // 部门名称
+      deptName: undefined,
       // 遮罩层
       loading: true,
       cameraList: [],//设备集合
@@ -260,17 +337,28 @@ export default {
         pageNum: 1,
         pageSize: 10,
         deptId: null,
-        deptName: null,
+        deptName: 0,
         createName: null,
         updateName: null,
         longitude: null,
         latitude: null,
         name: null,
-        contacts: null,
-        phone: null,
-        address: null,
-        limits: null,
-        license: null,
+        type: null,
+        collectiveFarmland: null,
+        homeContracting: null,
+        otherCollectiveFarmland: null,
+        maneuverableLand: null,
+        contractedLand: null,
+        extinctionLand: null,
+        onlyChildLand: null,
+        returnableLand: null,
+        reclaimLang: null,
+        fourWastelandsLand: null,
+        schoolLand: null,
+        villageSchoolLand: null,
+        waterArea: null,
+        forestArea: null,
+        remark: null,
       },
       // 表单参数
       form: {},
@@ -293,6 +381,48 @@ export default {
         phone: [
           {validator: validPhoneMobile, trigger: 'blur'}
         ],
+        contractedLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        maneuverableLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        onlyChildLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        extinctionLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        otherCollectiveFarmland: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        fourWastelandsLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        collectiveFarmland: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        homeContracting: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        reclaimLang: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        returnableLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        schoolLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        villageSchoolLand: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        waterArea: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
+        forestArea: [
+          {validator: checkPositiveDecimal, trigger: 'blur'}
+        ],
       }
     };
   },
@@ -369,11 +499,22 @@ export default {
         longitude: null,
         latitude: null,
         name: null,
-        contacts: null,
-        phone: null,
-        address: null,
-        limits: null,
-        license: null
+        type: null,
+        collectiveFarmland: null,
+        homeContracting: null,
+        otherCollectiveFarmland: null,
+        maneuverableLand: null,
+        contractedLand: null,
+        extinctionLand: null,
+        onlyChildLand: null,
+        returnableLand: null,
+        reclaimLang: null,
+        fourWastelandsLand: null,
+        schoolLand: null,
+        villageSchoolLand: null,
+        waterArea: null,
+        forestArea: null,
+        remark: null
       };
       this.resetForm("form");
     },
@@ -384,6 +525,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.deptName = 0;
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -451,6 +593,10 @@ export default {
       this.download('center-data/collectiveFarmland/export', {
         ...this.queryParams
       }, `农村集体耕地_${format_date(new Date())}.xlsx`)
+    },
+    // 点击按钮修改是否只查询本级部门用户
+    changeQueryType() {
+      this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
     }
   }
 };

+ 1 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/controller/CenterdataTFarmCollectiveFarmlandController.java

@@ -2,7 +2,6 @@ package com.sooka.sponest.data.digitalagriculture.controller;
 
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.core.constant.DocumentNameConstants;
-import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -14,6 +13,7 @@ import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiv
 import com.sooka.sponest.data.digitalagriculture.service.ICenterdataTFarmCollectiveFarmlandService;
 import com.sooka.sponest.data.utils.DataAttachUtil;
 import com.sooka.sponest.data.utils.DataProducerUtil;
+import com.sooka.sponest.data.utils.ExcelUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 83 - 15
src/main/java/com/sooka/sponest/data/digitalagriculture/domain/CenterdataTFarmCollectiveFarmland.java

@@ -52,34 +52,102 @@ public class CenterdataTFarmCollectiveFarmland extends BaseBusinessEntity {
     private String name;
 
     /**
-     * 联系人
+     * 类型
      */
-    @Excel(name = "联系人")
-    private String contacts;
+    @Excel(name = "类型", dictType = "centerdata_land_type")
+    private String type;
+
+    private String typeLabel;
+
+    /**
+     * 集体耕地总面积合计(亩)
+     */
+    @Excel(name = "集体耕地总面积合计(亩)")
+    private String collectiveFarmland;
+
+    /**
+     * 家庭承包面积(亩)
+     */
+    @Excel(name = "家庭承包面积(亩)")
+    private String homeContracting;
+
+    /**
+     * 其他集体耕地面积合计(亩)
+     */
+    @Excel(name = "其他集体耕地面积合计(亩)")
+    private String otherCollectiveFarmland;
+
+    /**
+     * 机动地(亩)
+     */
+    @Excel(name = "机动地(亩)")
+    private String maneuverableLand;
+
+    /**
+     * 承包地(亩)
+     */
+    @Excel(name = "承包地(亩)")
+    private String contractedLand;
+
+    /**
+     * 全户消亡地(亩)
+     */
+    @Excel(name = "全户消亡地(亩)")
+    private String extinctionLand;
+
+    /**
+     * 独生子女地(亩)
+     */
+    @Excel(name = "独生子女地(亩)")
+    private String onlyChildLand;
+
+    /**
+     * 农户交回的家庭承包地(亩)
+     */
+    @Excel(name = "农户交回的家庭承包地(亩)")
+    private String returnableLand;
+
+    /**
+     * 二轮承包地后开垦地、复垦地(亩)
+     */
+    @Excel(name = "二轮承包地后开垦地、复垦地(亩)")
+    private String reclaimLang;
+
+    /**
+     * 四荒地
+     */
+    @Excel(name = "四荒地")
+    private String fourWastelandsLand;
+
+    /**
+     * 校田地
+     */
+    @Excel(name = "校田地")
+    private String schoolLand;
 
     /**
-     * 联系电话
+     * 其中:由村经营的校田地
      */
-    @Excel(name = "联系电话")
-    private String phone;
+    @Excel(name = "其中:由村经营的校田地")
+    private String villageSchoolLand;
 
     /**
-     * 地点
+     * 水面
      */
-    @Excel(name = "地点")
-    private String address;
+    @Excel(name = "水面")
+    private String waterArea;
 
     /**
-     * 经营范围
+     * 林地面积
      */
-    @Excel(name = "经营范围")
-    private String limits;
+    @Excel(name = "林地面积")
+    private String forestArea;
 
     /**
-     * 许可证号
+     * 备注
      */
-    @Excel(name = "许可证号")
-    private String license;
+    @Excel(name = "备注")
+    private String remark;
 
     /**
      * 设备中间表主键

+ 7 - 1
src/main/java/com/sooka/sponest/data/digitalagriculture/service/impl/CenterdataTFarmCollectiveFarmlandServiceImpl.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.uuid.IdUtils;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
+import com.ruoyi.common.security.utils.DictUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalagriculture.domain.CenterdataTFarmCollectiveFarmland;
@@ -39,6 +40,7 @@ public class CenterdataTFarmCollectiveFarmlandServiceImpl extends BaseServiceImp
     @Override
     public CenterdataTFarmCollectiveFarmland selectCenterdataTFarmCollectiveFarmlandById(String id) {
         CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland = centerdataTFarmCollectiveFarmlandMapper.selectCenterdataTFarmCollectiveFarmlandById(id);
+        centerdataTFarmCollectiveFarmland.setTypeLabel(DictUtils.getDictDataByValue("centerdata_land_type",centerdataTFarmCollectiveFarmland.getType()));
         centerdataTFarmCollectiveFarmland.setDeviceList(centerdataTEquipmentCameraService.selectCenterdataTEquipmentCameraByBusinessId(id));
         return centerdataTFarmCollectiveFarmland;
     }
@@ -53,7 +55,11 @@ public class CenterdataTFarmCollectiveFarmlandServiceImpl extends BaseServiceImp
     @DataScopeMutiDept(deptAlias = "d")
     public List<CenterdataTFarmCollectiveFarmland> selectCenterdataTFarmCollectiveFarmlandList(CenterdataTFarmCollectiveFarmland centerdataTFarmCollectiveFarmland) {
         setSookaDataBase(centerdataTFarmCollectiveFarmland);
-        return centerdataTFarmCollectiveFarmlandMapper.selectCenterdataTFarmCollectiveFarmlandList(centerdataTFarmCollectiveFarmland);
+        List<CenterdataTFarmCollectiveFarmland> list = centerdataTFarmCollectiveFarmlandMapper.selectCenterdataTFarmCollectiveFarmlandList(centerdataTFarmCollectiveFarmland);
+        list.forEach(item -> {
+            item.setTypeLabel(DictUtils.getDictDataByValue("centerdata_land_type",item.getType()));
+        });
+        return list;
     }
 
     /**

+ 76 - 33
src/main/resources/mapper/digitalagriculture/CenterdataTFarmCollectiveFarmlandMapper.xml

@@ -17,33 +17,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="longitude"    column="longitude"    />
         <result property="latitude"    column="latitude"    />
         <result property="name"    column="name"    />
-        <result property="contacts"    column="contacts"    />
-        <result property="phone"    column="phone"    />
-        <result property="address"    column="address"    />
-        <result property="limits"    column="limits"    />
-        <result property="license"    column="license"    />
+        <result property="type"    column="type"    />
+        <result property="collectiveFarmland"    column="collective_farmland"    />
+        <result property="homeContracting"    column="home_contracting"    />
+        <result property="otherCollectiveFarmland"    column="other_collective_farmland"    />
+        <result property="maneuverableLand"    column="maneuverable_land"    />
+        <result property="contractedLand"    column="contracted_land"    />
+        <result property="extinctionLand"    column="extinction_land"    />
+        <result property="onlyChildLand"    column="only_child_land"    />
+        <result property="returnableLand"    column="returnable_land"    />
+        <result property="reclaimLang"    column="reclaim_lang"    />
+        <result property="fourWastelandsLand"    column="four_wastelands_land"    />
+        <result property="schoolLand"    column="school_land"    />
+        <result property="villageSchoolLand"    column="village_school_land"    />
+        <result property="waterArea"    column="water_area"    />
+        <result property="forestArea"    column="forest_area"    />
+        <result property="remark"    column="remark"    />
     </resultMap>
 
     <sql id="selectCenterdataTFarmCollectiveFarmlandVo">
-        select a.id, a.dept_id, a.dept_name, a.create_by, a.create_name, a.create_time, a.update_by,a.update_name, a.update_time, a.longitude, a.latitude, a.name, a.contacts, a.phone, a.address, a.limits, a.license from centerdata_t_farm_collective_farmland a
+        select a.id, a.dept_id, a.dept_name, a.create_by, a.create_name, a.create_time, a.update_by,a.update_name, a.update_time, a.longitude, a.latitude, a.name,
+        a.type, a.collective_farmland, a.home_contracting, a.other_collective_farmland, a.maneuverable_land,a.contracted_land,a.extinction_land,a.only_child_land,a.returnable_land,
+        a.reclaim_lang,a.four_wastelands_land,a.school_land,a.village_school_land,a.water_area,a.forest_area,a.remark from centerdata_t_farm_collective_farmland a
     </sql>
 
     <select id="selectCenterdataTFarmCollectiveFarmlandList" parameterType="CenterdataTFarmCollectiveFarmland" resultMap="CenterdataTFarmCollectiveFarmlandResult">
         <include refid="selectCenterdataTFarmCollectiveFarmlandVo"/>
         left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
         <where>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</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="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>
-            <if test="contacts != null  and contacts != ''"> and contacts = #{contacts}</if>
-            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
-            <if test="address != null  and address != ''"> and address = #{address}</if>
-            <if test="limits != null  and limits != ''"> and limits = #{limits}</if>
-            <if test="license != null  and license != ''"> and license = #{license}</if>
+            <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
@@ -69,11 +79,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="longitude != null">longitude,</if>
             <if test="latitude != null">latitude,</if>
             <if test="name != null">name,</if>
-            <if test="contacts != null">contacts,</if>
-            <if test="phone != null">phone,</if>
-            <if test="address != null">address,</if>
-            <if test="limits != null">limits,</if>
-            <if test="license != null">license,</if>
+            <if test="type != null">type,</if>
+            <if test="collectiveFarmland != null">collective_farmland,</if>
+            <if test="homeContracting != null">home_contracting,</if>
+            <if test="otherCollectiveFarmland != null">other_collective_farmland,</if>
+            <if test="maneuverableLand != null">maneuverable_land,</if>
+            <if test="contractedLand != null">contracted_land,</if>
+            <if test="extinctionLand != null">extinction_land,</if>
+            <if test="onlyChildLand != null">only_child_land,</if>
+            <if test="returnableLand != null">returnable_land,</if>
+            <if test="reclaimLang != null">reclaim_lang,</if>
+            <if test="fourWastelandsLand != null">four_wastelands_land,</if>
+            <if test="schoolLand != null">school_land,</if>
+            <if test="villageSchoolLand != null">village_school_land,</if>
+            <if test="waterArea != null">water_area,</if>
+            <if test="forestArea != null">forest_area,</if>
+            <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -88,11 +109,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="longitude != null">#{longitude},</if>
             <if test="latitude != null">#{latitude},</if>
             <if test="name != null">#{name},</if>
-            <if test="contacts != null">#{contacts},</if>
-            <if test="phone != null">#{phone},</if>
-            <if test="address != null">#{address},</if>
-            <if test="limits != null">#{limits},</if>
-            <if test="license != null">#{license},</if>
+            <if test="type != null">#{type},</if>
+            <if test="collectiveFarmland != null">#{collectiveFarmland},</if>
+            <if test="homeContracting != null">#{homeContracting},</if>
+            <if test="otherCollectiveFarmland != null">#{otherCollectiveFarmland},</if>
+            <if test="maneuverableLand != null">#{maneuverableLand},</if>
+            <if test="contractedLand != null">#{contractedLand},</if>
+            <if test="extinctionLand != null">#{extinctionLand},</if>
+            <if test="onlyChildLand != null">#{onlyChildLand},</if>
+            <if test="returnableLand != null">#{returnableLand},</if>
+            <if test="reclaimLang != null">#{reclaimLang},</if>
+            <if test="fourWastelandsLand != null">#{fourWastelandsLand},</if>
+            <if test="schoolLand != null">#{schoolLand},</if>
+            <if test="villageSchoolLand != null">#{villageSchoolLand},</if>
+            <if test="waterArea != null">#{waterArea},</if>
+            <if test="forestArea != null">#{forestArea},</if>
+            <if test="remark != null">#{remark},</if>
          </trim>
     </insert>
 
@@ -110,11 +142,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="longitude != null">longitude = #{longitude},</if>
             <if test="latitude != null">latitude = #{latitude},</if>
             <if test="name != null">name = #{name},</if>
-            <if test="contacts != null">contacts = #{contacts},</if>
-            <if test="phone != null">phone = #{phone},</if>
-            <if test="address != null">address = #{address},</if>
-            <if test="limits != null">limits = #{limits},</if>
-            <if test="license != null">license = #{license},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="collectiveFarmland != null">collective_farmland = #{collectiveFarmland},</if>
+            <if test="homeContracting != null">home_contracting = #{homeContracting},</if>
+            <if test="otherCollectiveFarmland != null">other_collective_farmland = #{otherCollectiveFarmland},</if>
+            <if test="maneuverableLand != null">maneuverable_land = #{maneuverableLand},</if>
+            <if test="contractedLand != null">contracted_land = #{contractedLand},</if>
+            <if test="extinctionLand != null">extinction_land = #{extinctionLand},</if>
+            <if test="onlyChildLand != null">only_child_land = #{onlyChildLand},</if>
+            <if test="returnableLand != null">returnable_land = #{returnableLand},</if>
+            <if test="reclaimLang != null">reclaim_lang = #{reclaimLang},</if>
+            <if test="fourWastelandsLand != null">four_wastelands_land = #{fourWastelandsLand},</if>
+            <if test="schoolLand != null">school_land = #{schoolLand},</if>
+            <if test="villageSchoolLand != null">village_school_land = #{villageSchoolLand},</if>
+            <if test="waterArea != null">water_area = #{waterArea},</if>
+            <if test="forestArea != null">forest_area = #{forestArea},</if>
+            <if test="remark != null">remark = #{remark},</if>
         </trim>
         where id = #{id}
     </update>