菜地划分模块完善,菜园关联对象查询的Mapper处理,去掉菜地划分列表中用不到的字段,修复菜地名称提交的Bug。
This commit is contained in:
parent
3c83bf252c
commit
7690c7e74f
@ -23,6 +23,9 @@ public class Garden extends BaseEntity
|
||||
@Excel(name = "农场分区")
|
||||
private Long zoneId;
|
||||
|
||||
/** 农场分区对象 */
|
||||
private FarmZone farmZone;
|
||||
|
||||
/** 菜地编号 */
|
||||
@Excel(name = "菜地编号")
|
||||
private String code;
|
||||
@ -93,6 +96,14 @@ public class Garden extends BaseEntity
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public FarmZone getFarmZone() {
|
||||
return farmZone;
|
||||
}
|
||||
|
||||
public void setFarmZone(FarmZone farmZone) {
|
||||
this.farmZone = farmZone;
|
||||
}
|
||||
|
||||
public String getCode()
|
||||
{
|
||||
return code;
|
||||
|
@ -26,11 +26,19 @@
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="GardenResultVo" type="Garden" extends="GardenResult">
|
||||
<association property="farmZone" javaType="FarmZone" column="zone_id" select="getFarmZone" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGardenVo">
|
||||
select id, zone_id, code, name, m2, member_id, manager_id, worker_id, contacter_id, is_farming, is_selled, is_completed, status, del_flag, create_by, create_time, update_by, update_time, remark from csa_garden
|
||||
</sql>
|
||||
|
||||
<select id="selectGardenList" parameterType="Garden" resultMap="GardenResult">
|
||||
<select id="getFarmZone" resultMap="com.jlt.csa.mapper.FarmZoneMapper.FarmZoneResult" parameterType="java.lang.Long">
|
||||
select * from csa_farm_zone where id = #{zoneId, jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectGardenList" parameterType="Garden" resultMap="GardenResultVo">
|
||||
<include refid="selectGardenVo"/>
|
||||
<where>
|
||||
<if test="zoneId != null "> and zone_id = #{zoneId}</if>
|
||||
@ -104,7 +112,7 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="code != null and code != ''">code = #{code},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="m2 != null">m2 = #{m2},</if>
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="managerId != null">manager_id = #{managerId},</if>
|
||||
|
@ -93,7 +93,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="gardenList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="农场分区" align="center" prop="zoneId" />
|
||||
<el-table-column label="农场分区" align="center" prop="farmZone.name" />
|
||||
<el-table-column label="菜地编号" align="center" prop="code">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
@ -105,8 +105,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="菜地名称" align="center" prop="name" />
|
||||
<el-table-column label="平方米" align="center" prop="m2" />
|
||||
<el-table-column label="会员" align="center" prop="memberId" />
|
||||
<el-table-column label="管理员" align="center" prop="managerId" />
|
||||
<el-table-column label="耕作" align="center" prop="isFarming">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isFarming"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user