楼栋添加小区名称

main
hansha 2 years ago
parent 342b178654
commit 59b001f6f3

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_ld_info * szxc_ld_info
* *
* @author hs * @author hs
* @date 2024-03-16 * @date 2024-03-28
*/ */
public class SzxcLdInfo extends BaseEntity public class SzxcLdInfo extends BaseEntity
{ {
@ -18,10 +18,14 @@ public class SzxcLdInfo extends BaseEntity
/** id */ /** id */
private Long id; private Long id;
/** 所属小区 */ /** 所属小区id */
@Excel(name = "所属小区") @Excel(name = "所属小区id")
private Long xqId; private Long xqId;
/** 小区名称 */
@Excel(name = "小区名称")
private String xqName;
/** 楼栋名称 */ /** 楼栋名称 */
@Excel(name = "楼栋名称") @Excel(name = "楼栋名称")
private String ldName; private String ldName;
@ -88,6 +92,15 @@ public class SzxcLdInfo extends BaseEntity
{ {
return xqId; return xqId;
} }
public void setXqName(String xqName)
{
this.xqName = xqName;
}
public String getXqName()
{
return xqName;
}
public void setLdName(String ldName) public void setLdName(String ldName)
{ {
this.ldName = ldName; this.ldName = ldName;
@ -202,6 +215,7 @@ public class SzxcLdInfo extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("xqId", getXqId()) .append("xqId", getXqId())
.append("xqName", getXqName())
.append("ldName", getLdName()) .append("ldName", getLdName())
.append("xqType", getXqType()) .append("xqType", getXqType())
.append("ldSort", getLdSort()) .append("ldSort", getLdSort())

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcLdInfoMapper"> <mapper namespace="com.ruoyi.szxc.mapper.SzxcLdInfoMapper">
<resultMap type="SzxcLdInfo" id="SzxcLdInfoResult"> <resultMap type="SzxcLdInfo" id="SzxcLdInfoResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="xqId" column="xq_id" /> <result property="xqId" column="xq_id" />
<result property="xqName" column="xq_name" />
<result property="ldName" column="ld_name" /> <result property="ldName" column="ld_name" />
<result property="xqType" column="xq_type" /> <result property="xqType" column="xq_type" />
<result property="ldSort" column="ld_sort" /> <result property="ldSort" column="ld_sort" />
@ -26,13 +27,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectSzxcLdInfoVo"> <sql id="selectSzxcLdInfoVo">
select id, xq_id, ld_name, xq_type, ld_sort, ldjg, qnfs, lc_num, unit_num, hu_num, ld_describe, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_ld_info select id, xq_id, xq_name, ld_name, xq_type, ld_sort, ldjg, qnfs, lc_num, unit_num, hu_num, ld_describe, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_ld_info
</sql> </sql>
<select id="selectSzxcLdInfoList" parameterType="SzxcLdInfo" resultMap="SzxcLdInfoResult"> <select id="selectSzxcLdInfoList" parameterType="SzxcLdInfo" resultMap="SzxcLdInfoResult">
<include refid="selectSzxcLdInfoVo"/> <include refid="selectSzxcLdInfoVo"/>
<where> <where>
<if test="xqId != null "> and xq_id = #{xqId}</if> <if test="xqId != null "> and xq_id = #{xqId}</if>
<if test="xqName != null and xqName != ''"> and xq_name like concat('%', #{xqName}, '%')</if>
<if test="ldName != null and ldName != ''"> and ld_name like concat('%', #{ldName}, '%')</if> <if test="ldName != null and ldName != ''"> and ld_name like concat('%', #{ldName}, '%')</if>
<if test="xqType != null and xqType != ''"> and xq_type = #{xqType}</if> <if test="xqType != null and xqType != ''"> and xq_type = #{xqType}</if>
<if test="ldSort != null and ldSort != ''"> and ld_sort = #{ldSort}</if> <if test="ldSort != null and ldSort != ''"> and ld_sort = #{ldSort}</if>
@ -57,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into szxc_ld_info insert into szxc_ld_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="xqId != null">xq_id,</if> <if test="xqId != null">xq_id,</if>
<if test="xqName != null">xq_name,</if>
<if test="ldName != null">ld_name,</if> <if test="ldName != null">ld_name,</if>
<if test="xqType != null">xq_type,</if> <if test="xqType != null">xq_type,</if>
<if test="ldSort != null">ld_sort,</if> <if test="ldSort != null">ld_sort,</if>
@ -76,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="xqId != null">#{xqId},</if> <if test="xqId != null">#{xqId},</if>
<if test="xqName != null">#{xqName},</if>
<if test="ldName != null">#{ldName},</if> <if test="ldName != null">#{ldName},</if>
<if test="xqType != null">#{xqType},</if> <if test="xqType != null">#{xqType},</if>
<if test="ldSort != null">#{ldSort},</if> <if test="ldSort != null">#{ldSort},</if>
@ -99,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update szxc_ld_info update szxc_ld_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="xqId != null">xq_id = #{xqId},</if> <if test="xqId != null">xq_id = #{xqId},</if>
<if test="xqName != null">xq_name = #{xqName},</if>
<if test="ldName != null">ld_name = #{ldName},</if> <if test="ldName != null">ld_name = #{ldName},</if>
<if test="xqType != null">xq_type = #{xqType},</if> <if test="xqType != null">xq_type = #{xqType},</if>
<if test="ldSort != null">ld_sort = #{ldSort},</if> <if test="ldSort != null">ld_sort = #{ldSort},</if>

@ -1,10 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="所属小区" prop="xqId"> <el-form-item label="所属小区id" prop="xqId">
<el-input <el-input
v-model="queryParams.xqId" v-model="queryParams.xqId"
placeholder="请输入所属小区" placeholder="请输入所属小区id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="小区名称" prop="xqName">
<el-input
v-model="queryParams.xqName"
placeholder="请输入小区名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -152,7 +160,8 @@
<el-table v-loading="loading" :data="ldinfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ldinfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" /> <el-table-column label="id" align="center" prop="id" />
<el-table-column label="所属小区" align="center" prop="xqId" /> <el-table-column label="所属小区id" align="center" prop="xqId" />
<el-table-column label="小区名称" align="center" prop="xqName" />
<el-table-column label="楼栋名称" align="center" prop="ldName" /> <el-table-column label="楼栋名称" align="center" prop="ldName" />
<el-table-column label="类型(0小区楼栋1独立房2其它)" align="center" prop="xqType" /> <el-table-column label="类型(0小区楼栋1独立房2其它)" align="center" prop="xqType" />
<el-table-column label="类别字典" align="center" prop="ldSort" /> <el-table-column label="类别字典" align="center" prop="ldSort" />
@ -196,8 +205,11 @@
<!-- 添加或修改楼栋信息对话框 --> <!-- 添加或修改楼栋信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属小区" prop="xqId"> <el-form-item label="所属小区id" prop="xqId">
<el-input v-model="form.xqId" placeholder="请输入所属小区" /> <el-input v-model="form.xqId" placeholder="请输入所属小区id" />
</el-form-item>
<el-form-item label="小区名称" prop="xqName">
<el-input v-model="form.xqName" placeholder="请输入小区名称" />
</el-form-item> </el-form-item>
<el-form-item label="楼栋名称" prop="ldName"> <el-form-item label="楼栋名称" prop="ldName">
<el-input v-model="form.ldName" placeholder="请输入楼栋名称" /> <el-input v-model="form.ldName" placeholder="请输入楼栋名称" />
@ -242,9 +254,9 @@
</template> </template>
<script> <script>
import { listLdinfo, getLdinfo, delLdinfo, addLdinfo, updateLdinfo } from "@/api/szxc/ldinfo"; import { listLdinfo, getLdinfo, delLdinfo, addLdinfo, updateLdinfo } from "@/api/szxc/ldinfo";
export default { export default {
name: "Ldinfo", name: "Ldinfo",
data() { data() {
return { return {
@ -271,6 +283,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
xqId: null, xqId: null,
xqName: null,
ldName: null, ldName: null,
xqType: null, xqType: null,
ldSort: null, ldSort: null,
@ -289,7 +302,7 @@ export default {
// //
rules: { rules: {
xqId: [ xqId: [
{ required: true, message: "所属小区不能为空", trigger: "blur" } { required: true, message: "所属小区id不能为空", trigger: "blur" }
], ],
deptId: [ deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" } { required: true, message: "部门id不能为空", trigger: "blur" }
@ -320,6 +333,7 @@ export default {
this.form = { this.form = {
id: null, id: null,
xqId: null, xqId: null,
xqName: null,
ldName: null, ldName: null,
xqType: null, xqType: null,
ldSort: null, ldSort: null,
@ -408,5 +422,5 @@ export default {
}, `ldinfo_${new Date().getTime()}.xlsx`) }, `ldinfo_${new Date().getTime()}.xlsx`)
} }
} }
}; };
</script> </script>

Loading…
Cancel
Save