楼栋添加小区名称

main
hansha 2 years ago
parent 342b178654
commit 59b001f6f3

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_ld_info
*
* @author hs
* @date 2024-03-16
* @date 2024-03-28
*/
public class SzxcLdInfo extends BaseEntity
{
@ -18,10 +18,14 @@ public class SzxcLdInfo extends BaseEntity
/** id */
private Long id;
/** 所属小区 */
@Excel(name = "所属小区")
/** 所属小区id */
@Excel(name = "所属小区id")
private Long xqId;
/** 小区名称 */
@Excel(name = "小区名称")
private String xqName;
/** 楼栋名称 */
@Excel(name = "楼栋名称")
private String ldName;
@ -88,6 +92,15 @@ public class SzxcLdInfo extends BaseEntity
{
return xqId;
}
public void setXqName(String xqName)
{
this.xqName = xqName;
}
public String getXqName()
{
return xqName;
}
public void setLdName(String ldName)
{
this.ldName = ldName;
@ -200,24 +213,25 @@ public class SzxcLdInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("xqId", getXqId())
.append("ldName", getLdName())
.append("xqType", getXqType())
.append("ldSort", getLdSort())
.append("ldjg", getLdjg())
.append("qnfs", getQnfs())
.append("lcNum", getLcNum())
.append("unitNum", getUnitNum())
.append("huNum", getHuNum())
.append("ldDescribe", getLdDescribe())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("userId", getUserId())
.toString();
.append("id", getId())
.append("xqId", getXqId())
.append("xqName", getXqName())
.append("ldName", getLdName())
.append("xqType", getXqType())
.append("ldSort", getLdSort())
.append("ldjg", getLdjg())
.append("qnfs", getQnfs())
.append("lcNum", getLcNum())
.append("unitNum", getUnitNum())
.append("huNum", getHuNum())
.append("ldDescribe", getLdDescribe())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("userId", getUserId())
.toString();
}
}

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcLdInfoMapper">
<resultMap type="SzxcLdInfo" id="SzxcLdInfoResult">
<result property="id" column="id" />
<result property="xqId" column="xq_id" />
<result property="xqName" column="xq_name" />
<result property="ldName" column="ld_name" />
<result property="xqType" column="xq_type" />
<result property="ldSort" column="ld_sort" />
@ -26,13 +27,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<select id="selectSzxcLdInfoList" parameterType="SzxcLdInfo" resultMap="SzxcLdInfoResult">
<include refid="selectSzxcLdInfoVo"/>
<where>
<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="xqType != null and xqType != ''"> and xq_type = #{xqType}</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
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="xqId != null">xq_id,</if>
<if test="xqName != null">xq_name,</if>
<if test="ldName != null">ld_name,</if>
<if test="xqType != null">xq_type,</if>
<if test="ldSort != null">ld_sort,</if>
@ -73,9 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if>
<if test="userId != null">user_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="xqId != null">#{xqId},</if>
<if test="xqName != null">#{xqName},</if>
<if test="ldName != null">#{ldName},</if>
<if test="xqType != null">#{xqType},</if>
<if test="ldSort != null">#{ldSort},</if>
@ -92,13 +96,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="userId != null">#{userId},</if>
</trim>
</trim>
</insert>
<update id="updateSzxcLdInfo" parameterType="SzxcLdInfo">
update szxc_ld_info
<trim prefix="SET" suffixOverrides=",">
<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="xqType != null">xq_type = #{xqType},</if>
<if test="ldSort != null">ld_sort = #{ldSort},</if>

@ -1,10 +1,18 @@
<template>
<div class="app-container">
<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
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
@keyup.enter.native="handleQuery"
/>
@ -152,7 +160,8 @@
<el-table v-loading="loading" :data="ldinfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<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="类型(0小区楼栋1独立房2其它)" align="center" prop="xqType" />
<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-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属小区" prop="xqId">
<el-input v-model="form.xqId" placeholder="请输入所属小区" />
<el-form-item label="所属小区id" prop="xqId">
<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 label="楼栋名称" prop="ldName">
<el-input v-model="form.ldName" placeholder="请输入楼栋名称" />
@ -242,171 +254,173 @@
</template>
<script>
import { listLdinfo, getLdinfo, delLdinfo, addLdinfo, updateLdinfo } from "@/api/szxc/ldinfo";
import { listLdinfo, getLdinfo, delLdinfo, addLdinfo, updateLdinfo } from "@/api/szxc/ldinfo";
export default {
name: "Ldinfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ldinfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
xqId: null,
ldName: null,
xqType: null,
ldSort: null,
ldjg: null,
qnfs: null,
lcNum: null,
unitNum: null,
huNum: null,
ldDescribe: null,
deptId: null,
deptName: null,
userId: null
},
//
form: {},
//
rules: {
xqId: [
{ required: true, message: "所属小区不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询楼栋信息列表 */
getList() {
this.loading = true;
listLdinfo(this.queryParams).then(response => {
this.ldinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
xqId: null,
ldName: null,
xqType: null,
ldSort: null,
ldjg: null,
qnfs: null,
lcNum: null,
unitNum: null,
huNum: null,
ldDescribe: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
deptId: null,
deptName: null,
userId: null
export default {
name: "Ldinfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
ldinfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
xqId: null,
xqName: null,
ldName: null,
xqType: null,
ldSort: null,
ldjg: null,
qnfs: null,
lcNum: null,
unitNum: null,
huNum: null,
ldDescribe: null,
deptId: null,
deptName: null,
userId: null
},
//
form: {},
//
rules: {
xqId: [
{ required: true, message: "所属小区id不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
}
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
created() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
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();
const id = row.id || this.ids
getLdinfo(id).then(response => {
this.form = response.data;
methods: {
/** 查询楼栋信息列表 */
getList() {
this.loading = true;
listLdinfo(this.queryParams).then(response => {
this.ldinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
xqId: null,
xqName: null,
ldName: null,
xqType: null,
ldSort: null,
ldjg: null,
qnfs: null,
lcNum: null,
unitNum: null,
huNum: null,
ldDescribe: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
deptId: null,
deptName: null,
userId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
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 = "修改楼栋信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateLdinfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addLdinfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.title = "添加楼栋信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getLdinfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改楼栋信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateLdinfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addLdinfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除楼栋信息编号为"' + ids + '"的数据项?').then(function() {
return delLdinfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/ldinfo/export', {
...this.queryParams
}, `ldinfo_${new Date().getTime()}.xlsx`)
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除楼栋信息编号为"' + ids + '"的数据项?').then(function() {
return delLdinfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/ldinfo/export', {
...this.queryParams
}, `ldinfo_${new Date().getTime()}.xlsx`)
}
}
}
};
};
</script>

Loading…
Cancel
Save