房屋信息字段调整

main
hansha 2 years ago
parent 1f1acf725a
commit ec8e6de5cf

@ -1,31 +1,25 @@
package com.ruoyi.szxc.controller; package com.ruoyi.szxc.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.szxc.domain.SzxcHouseInfo; import com.ruoyi.szxc.domain.SzxcHouseInfo;
import com.ruoyi.szxc.service.ISzxcHouseInfoService; import com.ruoyi.szxc.service.ISzxcHouseInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.core.page.TableDataInfo; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* Controller * Controller
* *
* @author hs * @author hs
* @date 2024-03-15 * @date 2024-03-21
*/ */
@RestController @RestController
@RequestMapping("/szxc/houseinfo") @RequestMapping("/szxc/houseinfo")
@ -96,7 +90,7 @@ public class SzxcHouseInfoController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('szxc:houseinfo:remove')") @PreAuthorize("@ss.hasPermi('szxc:houseinfo:remove')")
@Log(title = "房屋信息", businessType = BusinessType.DELETE) @Log(title = "房屋信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(szxcHouseInfoService.deleteSzxcHouseInfoByIds(ids)); return toAjax(szxcHouseInfoService.deleteSzxcHouseInfoByIds(ids));

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_house_info * szxc_house_info
* *
* @author hs * @author hs
* @date 2024-03-15 * @date 2024-03-21
*/ */
public class SzxcHouseInfo extends BaseEntity public class SzxcHouseInfo extends BaseEntity
{ {
@ -30,13 +30,29 @@ public class SzxcHouseInfo extends BaseEntity
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String cardId; private String cardId;
/** 房屋名称 */ /** 小区id */
@Excel(name = "房屋名称") @Excel(name = "小区id")
private Long xqId;
/** 小区名称 */
@Excel(name = "小区名称")
private String houseName; private String houseName;
/** 房号 */ /** 楼栋id */
@Excel(name = "房号") @Excel(name = "楼栋id")
private String houseNo; private Long buildId;
/** 楼栋名称 */
@Excel(name = "楼栋名称")
private String ldName;
/** 单元 */
@Excel(name = "单元")
private String unit;
/** 门牌号 */
@Excel(name = "门牌号")
private String doorNo;
/** 房屋类型 */ /** 房屋类型 */
@Excel(name = "房屋类型") @Excel(name = "房屋类型")
@ -50,18 +66,6 @@ public class SzxcHouseInfo extends BaseEntity
@Excel(name = "房屋性质") @Excel(name = "房屋性质")
private String houseProp; private String houseProp;
/** 楼栋 */
@Excel(name = "楼栋")
private String buildNo;
/** 单元 */
@Excel(name = "单元")
private String unit;
/** 门牌号 */
@Excel(name = "门牌号")
private String doorNo;
/** 取暖方式 */ /** 取暖方式 */
@Excel(name = "取暖方式") @Excel(name = "取暖方式")
private String qnfs; private String qnfs;
@ -126,6 +130,15 @@ public class SzxcHouseInfo extends BaseEntity
{ {
return cardId; return cardId;
} }
public void setXqId(Long xqId)
{
this.xqId = xqId;
}
public Long getXqId()
{
return xqId;
}
public void setHouseName(String houseName) public void setHouseName(String houseName)
{ {
this.houseName = houseName; this.houseName = houseName;
@ -135,68 +148,68 @@ public class SzxcHouseInfo extends BaseEntity
{ {
return houseName; return houseName;
} }
public void setHouseNo(String houseNo) public void setBuildId(Long buildId)
{ {
this.houseNo = houseNo; this.buildId = buildId;
} }
public String getHouseNo() public Long getBuildId()
{ {
return houseNo; return buildId;
} }
public void setHouseType(String houseType) public void setLdName(String ldName)
{ {
this.houseType = houseType; this.ldName = ldName;
} }
public String getHouseType() public String getLdName()
{ {
return houseType; return ldName;
} }
public void setHouseArea(String houseArea) public void setUnit(String unit)
{ {
this.houseArea = houseArea; this.unit = unit;
} }
public String getHouseArea() public String getUnit()
{ {
return houseArea; return unit;
} }
public void setHouseProp(String houseProp) public void setDoorNo(String doorNo)
{ {
this.houseProp = houseProp; this.doorNo = doorNo;
} }
public String getHouseProp() public String getDoorNo()
{ {
return houseProp; return doorNo;
} }
public void setBuildNo(String buildNo) public void setHouseType(String houseType)
{ {
this.buildNo = buildNo; this.houseType = houseType;
} }
public String getBuildNo() public String getHouseType()
{ {
return buildNo; return houseType;
} }
public void setUnit(String unit) public void setHouseArea(String houseArea)
{ {
this.unit = unit; this.houseArea = houseArea;
} }
public String getUnit() public String getHouseArea()
{ {
return unit; return houseArea;
} }
public void setDoorNo(String doorNo) public void setHouseProp(String houseProp)
{ {
this.doorNo = doorNo; this.houseProp = houseProp;
} }
public String getDoorNo() public String getHouseProp()
{ {
return doorNo; return houseProp;
} }
public void setQnfs(String qnfs) public void setQnfs(String qnfs)
{ {
@ -265,29 +278,30 @@ public class SzxcHouseInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("ownerId", getOwnerId()) .append("ownerId", getOwnerId())
.append("ownerName", getOwnerName()) .append("ownerName", getOwnerName())
.append("cardId", getCardId()) .append("cardId", getCardId())
.append("houseName", getHouseName()) .append("xqId", getXqId())
.append("houseNo", getHouseNo()) .append("houseName", getHouseName())
.append("houseType", getHouseType()) .append("buildId", getBuildId())
.append("houseArea", getHouseArea()) .append("ldName", getLdName())
.append("houseProp", getHouseProp()) .append("unit", getUnit())
.append("buildNo", getBuildNo()) .append("doorNo", getDoorNo())
.append("unit", getUnit()) .append("houseType", getHouseType())
.append("doorNo", getDoorNo()) .append("houseArea", getHouseArea())
.append("qnfs", getQnfs()) .append("houseProp", getHouseProp())
.append("toiletType", getToiletType()) .append("qnfs", getQnfs())
.append("houseIntro", getHouseIntro()) .append("toiletType", getToiletType())
.append("housePicture", getHousePicture()) .append("houseIntro", getHouseIntro())
.append("createBy", getCreateBy()) .append("housePicture", getHousePicture())
.append("createTime", getCreateTime()) .append("createBy", getCreateBy())
.append("updateBy", getUpdateBy()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateBy", getUpdateBy())
.append("deptId", getDeptId()) .append("updateTime", getUpdateTime())
.append("deptName", getDeptName()) .append("deptId", getDeptId())
.append("userId", getUserId()) .append("deptName", getDeptName())
.toString(); .append("userId", getUserId())
.toString();
} }
} }

@ -1,13 +1,14 @@
package com.ruoyi.szxc.mapper; package com.ruoyi.szxc.mapper;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcHouseInfo; import com.ruoyi.szxc.domain.SzxcHouseInfo;
import java.util.List;
/** /**
* Mapper * Mapper
* *
* @author hs * @author hs
* @date 2024-03-15 * @date 2024-03-21
*/ */
public interface SzxcHouseInfoMapper public interface SzxcHouseInfoMapper
{ {

@ -1,13 +1,14 @@
package com.ruoyi.szxc.service; package com.ruoyi.szxc.service;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcHouseInfo; import com.ruoyi.szxc.domain.SzxcHouseInfo;
import java.util.List;
/** /**
* Service * Service
* *
* @author hs * @author hs
* @date 2024-03-15 * @date 2024-03-21
*/ */
public interface ISzxcHouseInfoService public interface ISzxcHouseInfoService
{ {

@ -1,18 +1,19 @@
package com.ruoyi.szxc.service.impl; package com.ruoyi.szxc.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcHouseInfoMapper;
import com.ruoyi.szxc.domain.SzxcHouseInfo; import com.ruoyi.szxc.domain.SzxcHouseInfo;
import com.ruoyi.szxc.mapper.SzxcHouseInfoMapper;
import com.ruoyi.szxc.service.ISzxcHouseInfoService; import com.ruoyi.szxc.service.ISzxcHouseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* Service * Service
* *
* @author hs * @author hs
* @date 2024-03-15 * @date 2024-03-21
*/ */
@Service @Service
public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService public class SzxcHouseInfoServiceImpl implements ISzxcHouseInfoService

@ -1,7 +1,7 @@
<?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.SzxcHouseInfoMapper"> <mapper namespace="com.ruoyi.szxc.mapper.SzxcHouseInfoMapper">
<resultMap type="SzxcHouseInfo" id="SzxcHouseInfoResult"> <resultMap type="SzxcHouseInfo" id="SzxcHouseInfoResult">
@ -9,14 +9,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="ownerId" column="owner_id" /> <result property="ownerId" column="owner_id" />
<result property="ownerName" column="owner_name" /> <result property="ownerName" column="owner_name" />
<result property="cardId" column="card_id" /> <result property="cardId" column="card_id" />
<result property="xqId" column="xq_id" />
<result property="houseName" column="house_name" /> <result property="houseName" column="house_name" />
<result property="houseNo" column="house_no" /> <result property="buildId" column="build_id" />
<result property="ldName" column="ld_name" />
<result property="unit" column="unit" />
<result property="doorNo" column="door_no" />
<result property="houseType" column="house_type" /> <result property="houseType" column="house_type" />
<result property="houseArea" column="house_area" /> <result property="houseArea" column="house_area" />
<result property="houseProp" column="house_prop" /> <result property="houseProp" column="house_prop" />
<result property="buildNo" column="build_no" />
<result property="unit" column="unit" />
<result property="doorNo" column="door_no" />
<result property="qnfs" column="qnfs" /> <result property="qnfs" column="qnfs" />
<result property="toiletType" column="toilet_type" /> <result property="toiletType" column="toilet_type" />
<result property="houseIntro" column="house_intro" /> <result property="houseIntro" column="house_intro" />
@ -31,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectSzxcHouseInfoVo"> <sql id="selectSzxcHouseInfoVo">
select id, owner_id, owner_name, card_id, house_name, house_no, house_type, house_area, house_prop, build_no, unit, door_no, qnfs, toilet_type, house_intro, house_picture, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_house_info select id, owner_id, owner_name, card_id, xq_id, house_name, build_id, ld_name, unit, door_no, house_type, house_area, house_prop, qnfs, toilet_type, house_intro, house_picture, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_house_info
</sql> </sql>
<select id="selectSzxcHouseInfoList" parameterType="SzxcHouseInfo" resultMap="SzxcHouseInfoResult"> <select id="selectSzxcHouseInfoList" parameterType="SzxcHouseInfo" resultMap="SzxcHouseInfoResult">
@ -40,14 +41,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerId != null "> and owner_id = #{ownerId}</if> <if test="ownerId != null "> and owner_id = #{ownerId}</if>
<if test="ownerName != null and ownerName != ''"> and owner_name like concat('%', #{ownerName}, '%')</if> <if test="ownerName != null and ownerName != ''"> and owner_name like concat('%', #{ownerName}, '%')</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if> <if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="xqId != null "> and xq_id = #{xqId}</if>
<if test="houseName != null and houseName != ''"> and house_name like concat('%', #{houseName}, '%')</if> <if test="houseName != null and houseName != ''"> and house_name like concat('%', #{houseName}, '%')</if>
<if test="houseNo != null and houseNo != ''"> and house_no = #{houseNo}</if> <if test="buildId != null "> and build_id = #{buildId}</if>
<if test="ldName != null and ldName != ''"> and ld_name like concat('%', #{ldName}, '%')</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="doorNo != null and doorNo != ''"> and door_no = #{doorNo}</if>
<if test="houseType != null and houseType != ''"> and house_type = #{houseType}</if> <if test="houseType != null and houseType != ''"> and house_type = #{houseType}</if>
<if test="houseArea != null and houseArea != ''"> and house_area = #{houseArea}</if> <if test="houseArea != null and houseArea != ''"> and house_area = #{houseArea}</if>
<if test="houseProp != null and houseProp != ''"> and house_prop = #{houseProp}</if> <if test="houseProp != null and houseProp != ''"> and house_prop = #{houseProp}</if>
<if test="buildNo != null and buildNo != ''"> and build_no = #{buildNo}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="doorNo != null and doorNo != ''"> and door_no = #{doorNo}</if>
<if test="qnfs != null and qnfs != ''"> and qnfs = #{qnfs}</if> <if test="qnfs != null and qnfs != ''"> and qnfs = #{qnfs}</if>
<if test="toiletType != null and toiletType != ''"> and toilet_type = #{toiletType}</if> <if test="toiletType != null and toiletType != ''"> and toilet_type = #{toiletType}</if>
<if test="houseIntro != null and houseIntro != ''"> and house_intro = #{houseIntro}</if> <if test="houseIntro != null and houseIntro != ''"> and house_intro = #{houseIntro}</if>
@ -69,14 +71,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerId != null">owner_id,</if> <if test="ownerId != null">owner_id,</if>
<if test="ownerName != null and ownerName != ''">owner_name,</if> <if test="ownerName != null and ownerName != ''">owner_name,</if>
<if test="cardId != null">card_id,</if> <if test="cardId != null">card_id,</if>
<if test="xqId != null">xq_id,</if>
<if test="houseName != null and houseName != ''">house_name,</if> <if test="houseName != null and houseName != ''">house_name,</if>
<if test="houseNo != null">house_no,</if> <if test="buildId != null">build_id,</if>
<if test="ldName != null">ld_name,</if>
<if test="unit != null">unit,</if>
<if test="doorNo != null">door_no,</if>
<if test="houseType != null">house_type,</if> <if test="houseType != null">house_type,</if>
<if test="houseArea != null">house_area,</if> <if test="houseArea != null">house_area,</if>
<if test="houseProp != null">house_prop,</if> <if test="houseProp != null">house_prop,</if>
<if test="buildNo != null">build_no,</if>
<if test="unit != null">unit,</if>
<if test="doorNo != null">door_no,</if>
<if test="qnfs != null">qnfs,</if> <if test="qnfs != null">qnfs,</if>
<if test="toiletType != null">toilet_type,</if> <if test="toiletType != null">toilet_type,</if>
<if test="houseIntro != null">house_intro,</if> <if test="houseIntro != null">house_intro,</if>
@ -88,19 +91,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="deptName != null">dept_name,</if> <if test="deptName != null">dept_name,</if>
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ownerId != null">#{ownerId},</if> <if test="ownerId != null">#{ownerId},</if>
<if test="ownerName != null and ownerName != ''">#{ownerName},</if> <if test="ownerName != null and ownerName != ''">#{ownerName},</if>
<if test="cardId != null">#{cardId},</if> <if test="cardId != null">#{cardId},</if>
<if test="xqId != null">#{xqId},</if>
<if test="houseName != null and houseName != ''">#{houseName},</if> <if test="houseName != null and houseName != ''">#{houseName},</if>
<if test="houseNo != null">#{houseNo},</if> <if test="buildId != null">#{buildId},</if>
<if test="ldName != null">#{ldName},</if>
<if test="unit != null">#{unit},</if>
<if test="doorNo != null">#{doorNo},</if>
<if test="houseType != null">#{houseType},</if> <if test="houseType != null">#{houseType},</if>
<if test="houseArea != null">#{houseArea},</if> <if test="houseArea != null">#{houseArea},</if>
<if test="houseProp != null">#{houseProp},</if> <if test="houseProp != null">#{houseProp},</if>
<if test="buildNo != null">#{buildNo},</if>
<if test="unit != null">#{unit},</if>
<if test="doorNo != null">#{doorNo},</if>
<if test="qnfs != null">#{qnfs},</if> <if test="qnfs != null">#{qnfs},</if>
<if test="toiletType != null">#{toiletType},</if> <if test="toiletType != null">#{toiletType},</if>
<if test="houseIntro != null">#{houseIntro},</if> <if test="houseIntro != null">#{houseIntro},</if>
@ -112,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if> <if test="deptName != null">#{deptName},</if>
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
<update id="updateSzxcHouseInfo" parameterType="SzxcHouseInfo"> <update id="updateSzxcHouseInfo" parameterType="SzxcHouseInfo">
@ -121,14 +125,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ownerId != null">owner_id = #{ownerId},</if> <if test="ownerId != null">owner_id = #{ownerId},</if>
<if test="ownerName != null and ownerName != ''">owner_name = #{ownerName},</if> <if test="ownerName != null and ownerName != ''">owner_name = #{ownerName},</if>
<if test="cardId != null">card_id = #{cardId},</if> <if test="cardId != null">card_id = #{cardId},</if>
<if test="xqId != null">xq_id = #{xqId},</if>
<if test="houseName != null and houseName != ''">house_name = #{houseName},</if> <if test="houseName != null and houseName != ''">house_name = #{houseName},</if>
<if test="houseNo != null">house_no = #{houseNo},</if> <if test="buildId != null">build_id = #{buildId},</if>
<if test="ldName != null">ld_name = #{ldName},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="doorNo != null">door_no = #{doorNo},</if>
<if test="houseType != null">house_type = #{houseType},</if> <if test="houseType != null">house_type = #{houseType},</if>
<if test="houseArea != null">house_area = #{houseArea},</if> <if test="houseArea != null">house_area = #{houseArea},</if>
<if test="houseProp != null">house_prop = #{houseProp},</if> <if test="houseProp != null">house_prop = #{houseProp},</if>
<if test="buildNo != null">build_no = #{buildNo},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="doorNo != null">door_no = #{doorNo},</if>
<if test="qnfs != null">qnfs = #{qnfs},</if> <if test="qnfs != null">qnfs = #{qnfs},</if>
<if test="toiletType != null">toilet_type = #{toiletType},</if> <if test="toiletType != null">toilet_type = #{toiletType},</if>
<if test="houseIntro != null">house_intro = #{houseIntro},</if> <if test="houseIntro != null">house_intro = #{houseIntro},</if>

@ -25,42 +25,34 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="房屋名称" prop="houseName"> <el-form-item label="小区id" prop="xqId">
<el-input <el-input
v-model="queryParams.houseName" v-model="queryParams.xqId"
placeholder="请输入房屋名称" placeholder="请输入小区id"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="房号" prop="houseNo"> <el-form-item label="小区名称" prop="houseName">
<el-input <el-input
v-model="queryParams.houseNo" v-model="queryParams.houseName"
placeholder="请输入房号" placeholder="请输入小区名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input
v-model="queryParams.houseArea"
placeholder="请输入房屋面积"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="房屋性质" prop="houseProp"> <el-form-item label="楼栋id" prop="buildId">
<el-input <el-input
v-model="queryParams.houseProp" v-model="queryParams.buildId"
placeholder="请输入房屋性质" placeholder="请输入楼栋id"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="楼栋" prop="buildNo"> <el-form-item label="楼栋名称" prop="ldName">
<el-input <el-input
v-model="queryParams.buildNo" v-model="queryParams.ldName"
placeholder="请输入楼栋" placeholder="请输入楼栋名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -81,6 +73,22 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input
v-model="queryParams.houseArea"
placeholder="请输入房屋面积"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-input
v-model="queryParams.houseProp"
placeholder="请输入房屋性质"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="取暖方式" prop="qnfs"> <el-form-item label="取暖方式" prop="qnfs">
<el-input <el-input
v-model="queryParams.qnfs" v-model="queryParams.qnfs"
@ -187,14 +195,15 @@
<el-table-column label="居民id" align="center" prop="ownerId" /> <el-table-column label="居民id" align="center" prop="ownerId" />
<el-table-column label="户主姓名" align="center" prop="ownerName" /> <el-table-column label="户主姓名" align="center" prop="ownerName" />
<el-table-column label="身份证号" align="center" prop="cardId" /> <el-table-column label="身份证号" align="center" prop="cardId" />
<el-table-column label="房屋名称" align="center" prop="houseName" /> <el-table-column label="小区id" align="center" prop="xqId" />
<el-table-column label="房号" align="center" prop="houseNo" /> <el-table-column label="小区名称" align="center" prop="houseName" />
<el-table-column label="楼栋id" align="center" prop="buildId" />
<el-table-column label="楼栋名称" align="center" prop="ldName" />
<el-table-column label="单元" align="center" prop="unit" />
<el-table-column label="门牌号" align="center" prop="doorNo" />
<el-table-column label="房屋类型" align="center" prop="houseType" /> <el-table-column label="房屋类型" align="center" prop="houseType" />
<el-table-column label="房屋面积" align="center" prop="houseArea" /> <el-table-column label="房屋面积" align="center" prop="houseArea" />
<el-table-column label="房屋性质" align="center" prop="houseProp" /> <el-table-column label="房屋性质" align="center" prop="houseProp" />
<el-table-column label="楼栋" align="center" prop="buildNo" />
<el-table-column label="单元" align="center" prop="unit" />
<el-table-column label="门牌号" align="center" prop="doorNo" />
<el-table-column label="取暖方式" align="center" prop="qnfs" /> <el-table-column label="取暖方式" align="center" prop="qnfs" />
<el-table-column label="厕所类型" align="center" prop="toiletType" /> <el-table-column label="厕所类型" align="center" prop="toiletType" />
<el-table-column label="房屋简介" align="center" prop="houseIntro" /> <el-table-column label="房屋简介" align="center" prop="houseIntro" />
@ -242,20 +251,17 @@
<el-form-item label="身份证号" prop="cardId"> <el-form-item label="身份证号" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入身份证号" /> <el-input v-model="form.cardId" placeholder="请输入身份证号" />
</el-form-item> </el-form-item>
<el-form-item label="房屋名称" prop="houseName"> <el-form-item label="小区id" prop="xqId">
<el-input v-model="form.houseName" placeholder="请输入房屋名称" /> <el-input v-model="form.xqId" placeholder="请输入小区id" />
</el-form-item> </el-form-item>
<el-form-item label="房号" prop="houseNo"> <el-form-item label="小区名称" prop="houseName">
<el-input v-model="form.houseNo" placeholder="请输入房号" /> <el-input v-model="form.houseName" placeholder="请输入小区名称" />
</el-form-item> </el-form-item>
<el-form-item label="房屋面积" prop="houseArea"> <el-form-item label="楼栋id" prop="buildId">
<el-input v-model="form.houseArea" placeholder="请输入房屋面积" /> <el-input v-model="form.buildId" placeholder="请输入楼栋id" />
</el-form-item> </el-form-item>
<el-form-item label="房屋性质" prop="houseProp"> <el-form-item label="楼栋名称" prop="ldName">
<el-input v-model="form.houseProp" placeholder="请输入房屋性质" /> <el-input v-model="form.ldName" placeholder="请输入楼栋名称" />
</el-form-item>
<el-form-item label="楼栋" prop="buildNo">
<el-input v-model="form.buildNo" placeholder="请输入楼栋" />
</el-form-item> </el-form-item>
<el-form-item label="单元" prop="unit"> <el-form-item label="单元" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单元" /> <el-input v-model="form.unit" placeholder="请输入单元" />
@ -263,6 +269,12 @@
<el-form-item label="门牌号" prop="doorNo"> <el-form-item label="门牌号" prop="doorNo">
<el-input v-model="form.doorNo" placeholder="请输入门牌号" /> <el-input v-model="form.doorNo" placeholder="请输入门牌号" />
</el-form-item> </el-form-item>
<el-form-item label="房屋面积" prop="houseArea">
<el-input v-model="form.houseArea" placeholder="请输入房屋面积" />
</el-form-item>
<el-form-item label="房屋性质" prop="houseProp">
<el-input v-model="form.houseProp" placeholder="请输入房屋性质" />
</el-form-item>
<el-form-item label="取暖方式" prop="qnfs"> <el-form-item label="取暖方式" prop="qnfs">
<el-input v-model="form.qnfs" placeholder="请输入取暖方式" /> <el-input v-model="form.qnfs" placeholder="请输入取暖方式" />
</el-form-item> </el-form-item>
@ -291,184 +303,186 @@
</template> </template>
<script> <script>
import { listHouseinfo, getHouseinfo, delHouseinfo, addHouseinfo, updateHouseinfo } from "@/api/szxc/houseinfo"; import { listHouseinfo, getHouseinfo, delHouseinfo, addHouseinfo, updateHouseinfo } from "@/api/szxc/houseinfo";
export default { export default {
name: "Houseinfo", name: "Houseinfo",
data() { data() {
return { return {
// //
loading: true, loading: true,
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
houseinfoList: [], houseinfoList: [],
// //
title: "", title: "",
// //
open: false, open: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
ownerId: null, ownerId: null,
ownerName: null, ownerName: null,
cardId: null, cardId: null,
houseName: null, xqId: null,
houseNo: null, houseName: null,
houseType: null, buildId: null,
houseArea: null, ldName: null,
houseProp: null, unit: null,
buildNo: null, doorNo: null,
unit: null, houseType: null,
doorNo: null, houseArea: null,
qnfs: null, houseProp: null,
toiletType: null, qnfs: null,
houseIntro: null, toiletType: null,
housePicture: null, houseIntro: null,
deptId: null, housePicture: null,
deptName: null, deptId: null,
userId: null deptName: null,
}, userId: null
// },
form: {}, //
// form: {},
rules: { //
ownerName: [ rules: {
{ required: true, message: "户主姓名不能为空", trigger: "blur" } ownerName: [
], { required: true, message: "户主姓名不能为空", trigger: "blur" }
houseName: [ ],
{ required: true, message: "房屋名称不能为空", trigger: "blur" } houseName: [
], { required: true, message: "小区名称不能为空", trigger: "blur" }
deptId: [ ],
{ required: true, message: "部门id不能为空", trigger: "blur" } deptId: [
], { required: true, message: "部门id不能为空", trigger: "blur" }
} ],
}; }
},
created() {
this.getList();
},
methods: {
/** 查询房屋信息列表 */
getList() {
this.loading = true;
listHouseinfo(this.queryParams).then(response => {
this.houseinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
ownerId: null,
ownerName: null,
cardId: null,
houseName: null,
houseNo: null,
houseType: null,
houseArea: null,
houseProp: null,
buildNo: null,
unit: null,
doorNo: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
deptId: null,
deptName: null,
userId: null
}; };
this.resetForm("form");
}, },
/** 搜索按钮操作 */ created() {
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ methods: {
resetQuery() { /** 查询房屋信息列表 */
this.resetForm("queryForm"); getList() {
this.handleQuery(); this.loading = true;
}, listHouseinfo(this.queryParams).then(response => {
// this.houseinfoList = response.rows;
handleSelectionChange(selection) { this.total = response.total;
this.ids = selection.map(item => item.id) this.loading = false;
this.single = selection.length!==1 });
this.multiple = !selection.length },
}, //
/** 新增按钮操作 */ cancel() {
handleAdd() { this.open = false;
this.reset(); this.reset();
this.open = true; },
this.title = "添加房屋信息"; //
}, reset() {
/** 修改按钮操作 */ this.form = {
handleUpdate(row) { id: null,
this.reset(); ownerId: null,
const id = row.id || this.ids ownerName: null,
getHouseinfo(id).then(response => { cardId: null,
this.form = response.data; xqId: null,
houseName: null,
buildId: null,
ldName: null,
unit: null,
doorNo: null,
houseType: null,
houseArea: null,
houseProp: null,
qnfs: null,
toiletType: null,
houseIntro: null,
housePicture: 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.open = true;
this.title = "修改房屋信息"; this.title = "添加房屋信息";
}); },
}, /** 修改按钮操作 */
/** 提交按钮 */ handleUpdate(row) {
submitForm() { this.reset();
this.$refs["form"].validate(valid => { const id = row.id || this.ids
if (valid) { getHouseinfo(id).then(response => {
if (this.form.id != null) { this.form = response.data;
updateHouseinfo(this.form).then(response => { this.open = true;
this.$modal.msgSuccess("修改成功"); this.title = "修改房屋信息";
this.open = false; });
this.getList(); },
}); /** 提交按钮 */
} else { submitForm() {
addHouseinfo(this.form).then(response => { this.$refs["form"].validate(valid => {
this.$modal.msgSuccess("新增成功"); if (valid) {
this.open = false; if (this.form.id != null) {
this.getList(); updateHouseinfo(this.form).then(response => {
}); this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHouseinfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
} }
} });
}); },
}, /** 删除按钮操作 */
/** 删除按钮操作 */ handleDelete(row) {
handleDelete(row) { const ids = row.id || this.ids;
const ids = row.id || this.ids; this.$modal.confirm('是否确认删除房屋信息编号为"' + ids + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除房屋信息编号为"' + ids + '"的数据项?').then(function() { return delHouseinfo(ids);
return delHouseinfo(ids); }).then(() => {
}).then(() => { this.getList();
this.getList(); this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess("删除成功"); }).catch(() => {});
}).catch(() => {}); },
}, /** 导出按钮操作 */
/** 导出按钮操作 */ handleExport() {
handleExport() { this.download('szxc/houseinfo/export', {
this.download('szxc/houseinfo/export', { ...this.queryParams
...this.queryParams }, `houseinfo_${new Date().getTime()}.xlsx`)
}, `houseinfo_${new Date().getTime()}.xlsx`) }
} }
} };
};
</script> </script>

Loading…
Cancel
Save