|
@@ -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>
|