diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcHkbgRecard.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcHkbgRecard.java index ffddd6c..f456ba9 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcHkbgRecard.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcHkbgRecard.java @@ -12,7 +12,7 @@ import java.util.Date; * 户口变更记录对象 szxc_hkbg_recard * * @author hs - * @date 2024-03-26 + * @date 2024-03-27 */ public class SzxcHkbgRecard extends BaseEntity { @@ -69,15 +69,23 @@ public class SzxcHkbgRecard extends BaseEntity @Excel(name = "与户主关系") private String relation; - /** 变更编号 */ - @Excel(name = "变更编号") - private String number; - /** 变更时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd") private Date bgTime; + /** 户籍地址 */ + @Excel(name = "户籍地址") + private String hjAddress; + + /** 户籍性质 */ + @Excel(name = "户籍性质") + private String jgNature; + + /** 是否常住(0是 1否) */ + @Excel(name = "是否常住", readConverterExp = "0=是,1=否") + private String longLive; + /** 部门id */ @Excel(name = "部门id") private Long deptId; @@ -86,6 +94,10 @@ public class SzxcHkbgRecard extends BaseEntity @Excel(name = "创建者ID") private Long userId; + /** 所属网格 */ + @Excel(name = "所属网格") + private String deptName; + public void setId(Long id) { this.id = id; @@ -203,23 +215,41 @@ public class SzxcHkbgRecard extends BaseEntity { return relation; } - public void setNumber(String number) + public void setBgTime(Date bgTime) { - this.number = number; + this.bgTime = bgTime; } - public String getNumber() + public Date getBgTime() { - return number; + return bgTime; } - public void setBgTime(Date bgTime) + public void setHjAddress(String hjAddress) { - this.bgTime = bgTime; + this.hjAddress = hjAddress; } - public Date getBgTime() + public String getHjAddress() { - return bgTime; + return hjAddress; + } + public void setJgNature(String jgNature) + { + this.jgNature = jgNature; + } + + public String getJgNature() + { + return jgNature; + } + public void setLongLive(String longLive) + { + this.longLive = longLive; + } + + public String getLongLive() + { + return longLive; } public void setDeptId(Long deptId) { @@ -239,6 +269,15 @@ public class SzxcHkbgRecard extends BaseEntity { return userId; } + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getDeptName() + { + return deptName; + } @Override public String toString() { @@ -256,8 +295,10 @@ public class SzxcHkbgRecard extends BaseEntity .append("xName", getxName()) .append("xIdCard", getxIdCard()) .append("relation", getRelation()) - .append("number", getNumber()) .append("bgTime", getBgTime()) + .append("hjAddress", getHjAddress()) + .append("jgNature", getJgNature()) + .append("longLive", getLongLive()) .append("remark", getRemark()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) @@ -265,6 +306,7 @@ public class SzxcHkbgRecard extends BaseEntity .append("updateTime", getUpdateTime()) .append("deptId", getDeptId()) .append("userId", getUserId()) + .append("deptName", getDeptName()) .toString(); } } diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcHkbgRecardServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcHkbgRecardServiceImpl.java index 38e6ae9..8947a67 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcHkbgRecardServiceImpl.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcHkbgRecardServiceImpl.java @@ -1,12 +1,16 @@ package com.ruoyi.szxc.service.impl; -import java.util.List; import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.szxc.mapper.SzxcHkbgRecardMapper; import com.ruoyi.szxc.domain.SzxcHkbgRecard; +import com.ruoyi.szxc.domain.SzxcJmInfo; +import com.ruoyi.szxc.mapper.SzxcHkbgRecardMapper; +import com.ruoyi.szxc.mapper.SzxcJmInfoMapper; import com.ruoyi.szxc.service.ISzxcHkbgRecardService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; /** * 户口变更记录Service业务层处理 @@ -17,8 +21,10 @@ import com.ruoyi.szxc.service.ISzxcHkbgRecardService; @Service public class SzxcHkbgRecardServiceImpl implements ISzxcHkbgRecardService { - @Autowired + @Resource private SzxcHkbgRecardMapper szxcHkbgRecardMapper; + @Resource + private SzxcJmInfoMapper szxcJmInfoMapper; /** * 查询户口变更记录 @@ -51,8 +57,25 @@ public class SzxcHkbgRecardServiceImpl implements ISzxcHkbgRecardService * @return 结果 */ @Override + @Transactional public int insertSzxcHkbgRecard(SzxcHkbgRecard szxcHkbgRecard) { + //先修改居民所属户主信息 + SzxcJmInfo jmInfo = new SzxcJmInfo(); + jmInfo.setAcountNo(szxcHkbgRecard.getAcountNo()); + jmInfo.setDeptId(szxcHkbgRecard.getDeptId()); + jmInfo.setDeptName(szxcHkbgRecard.getDeptName()); + jmInfo.setHjAddress(szxcHkbgRecard.getHjAddress()); + jmInfo.setRelation(szxcHkbgRecard.getRelation()); + jmInfo.setLongLive(szxcHkbgRecard.getLongLive()); + jmInfo.setJgNature(szxcHkbgRecard.getJgNature()); + try { + szxcJmInfoMapper.updateSzxcJmInfo(jmInfo); + } catch (Exception e) { + e.printStackTrace(); + return 0; + } + //添加户口变更记录 szxcHkbgRecard.setCreateTime(DateUtils.getNowDate()); return szxcHkbgRecardMapper.insertSzxcHkbgRecard(szxcHkbgRecard); } diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml index d4639dc..0ade021 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml @@ -18,8 +18,10 @@ - + + + @@ -27,10 +29,11 @@ + - select id, acount_no, jm_id, name, id_card, y_jm_id, y_name, y_id_card, bg_reason, x_jm_id, x_name, x_id_card, relation, number, bg_time, remark, create_by, create_time, update_by, update_time, dept_id, user_id from szxc_hkbg_recard + select id, acount_no, jm_id, name, id_card, y_jm_id, y_name, y_id_card, bg_reason, x_jm_id, x_name, x_id_card, relation, bg_time, hj_address, jg_nature, long_live, remark, create_by, create_time, update_by, update_time, dept_id, user_id, dept_name from szxc_hkbg_recard @@ -75,8 +81,10 @@ x_name, x_id_card, relation, - number, bg_time, + hj_address, + jg_nature, + long_live, remark, create_by, create_time, @@ -84,6 +92,7 @@ update_time, dept_id, user_id, + dept_name, #{acountNo}, @@ -98,8 +107,10 @@ #{xName}, #{xIdCard}, #{relation}, - #{number}, #{bgTime}, + #{hjAddress}, + #{jgNature}, + #{longLive}, #{remark}, #{createBy}, #{createTime}, @@ -107,6 +118,7 @@ #{updateTime}, #{deptId}, #{userId}, + #{deptName}, @@ -125,8 +137,10 @@ x_name = #{xName}, x_id_card = #{xIdCard}, relation = #{relation}, - number = #{number}, bg_time = #{bgTime}, + hj_address = #{hjAddress}, + jg_nature = #{jgNature}, + long_live = #{longLive}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, @@ -134,6 +148,7 @@ update_time = #{updateTime}, dept_id = #{deptId}, user_id = #{userId}, + dept_name = #{deptName}, where id = #{id} diff --git a/ruoyi-ui/src/views/szxc/recard/index.vue b/ruoyi-ui/src/views/szxc/recard/index.vue index 541754d..5513482 100644 --- a/ruoyi-ui/src/views/szxc/recard/index.vue +++ b/ruoyi-ui/src/views/szxc/recard/index.vue @@ -97,14 +97,6 @@ @keyup.enter.native="handleQuery" /> - - - + + + + + + + + + + + + 搜索 重置 @@ -196,15 +220,18 @@ - + + + +