diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcJmTagController.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcJmTagController.java new file mode 100644 index 0000000..e9600e8 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcJmTagController.java @@ -0,0 +1,104 @@ +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.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.szxc.domain.SzxcJmTag; +import com.ruoyi.szxc.service.ISzxcJmTagService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 居民标签关联Controller + * + * @author hs + * @date 2024-03-21 + */ +@RestController +@RequestMapping("/szxc/jmtag") +public class SzxcJmTagController extends BaseController +{ + @Autowired + private ISzxcJmTagService szxcJmTagService; + + /** + * 查询居民标签关联列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:list')") + @GetMapping("/list") + public TableDataInfo list(SzxcJmTag szxcJmTag) + { + startPage(); + List list = szxcJmTagService.selectSzxcJmTagList(szxcJmTag); + return getDataTable(list); + } + + /** + * 导出居民标签关联列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:export')") + @Log(title = "居民标签关联", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SzxcJmTag szxcJmTag) + { + List list = szxcJmTagService.selectSzxcJmTagList(szxcJmTag); + ExcelUtil util = new ExcelUtil(SzxcJmTag.class); + util.exportExcel(response, list, "居民标签关联数据"); + } + + /** + * 获取居民标签关联详细信息 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:query')") + @GetMapping(value = "/{jmId}") + public AjaxResult getInfo(@PathVariable("jmId") Long jmId) + { + return success(szxcJmTagService.selectSzxcJmTagByJmId(jmId)); + } + + /** + * 新增居民标签关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:add')") + @Log(title = "居民标签关联", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SzxcJmTag szxcJmTag) + { + return toAjax(szxcJmTagService.insertSzxcJmTag(szxcJmTag)); + } + + /** + * 修改居民标签关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:edit')") + @Log(title = "居民标签关联", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SzxcJmTag szxcJmTag) + { + return toAjax(szxcJmTagService.updateSzxcJmTag(szxcJmTag)); + } + + /** + * 删除居民标签关联 + */ + @PreAuthorize("@ss.hasPermi('szxc:jmtag:remove')") + @Log(title = "居民标签关联", businessType = BusinessType.DELETE) + @DeleteMapping("/{jmIds}") + public AjaxResult remove(@PathVariable Long[] jmIds) + { + return toAjax(szxcJmTagService.deleteSzxcJmTagByJmIds(jmIds)); + } +} 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 8ebec6a..930d4dd 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 @@ -1,17 +1,18 @@ package com.ruoyi.szxc.domain; -import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; /** * 户口变更记录对象 szxc_hkbg_recard - * + * * @author hs - * @date 2024-03-15 + * @date 2024-03-21 */ public class SzxcHkbgRecard extends BaseEntity { @@ -20,6 +21,10 @@ public class SzxcHkbgRecard extends BaseEntity /** id */ private Long id; + /** 居民id */ + @Excel(name = "居民id") + private Long jmId; + /** 姓名 */ @Excel(name = "姓名") private String name; @@ -61,102 +66,111 @@ public class SzxcHkbgRecard extends BaseEntity @Excel(name = "创建者ID") private Long userId; - public void setId(Long id) + public void setId(Long id) { this.id = id; } - public Long getId() + public Long getId() { return id; } - public void setName(String name) + public void setJmId(Long jmId) + { + this.jmId = jmId; + } + + public Long getJmId() + { + return jmId; + } + public void setName(String name) { this.name = name; } - public String getName() + public String getName() { return name; } - public void setIdCard(String idCard) + public void setIdCard(String idCard) { this.idCard = idCard; } - public String getIdCard() + public String getIdCard() { return idCard; } - public void setAcountNo(Long acountNo) + public void setAcountNo(Long acountNo) { this.acountNo = acountNo; } - public Long getAcountNo() + public Long getAcountNo() { return acountNo; } - public void setRelation(String relation) + public void setRelation(String relation) { this.relation = relation; } - public String getRelation() + public String getRelation() { return relation; } - public void setBgType(String bgType) + public void setBgType(String bgType) { this.bgType = bgType; } - public String getBgType() + public String getBgType() { return bgType; } - public void setNumber(String number) + public void setNumber(String number) { this.number = number; } - public String getNumber() + public String getNumber() { return number; } - public void setBgTime(Date bgTime) + public void setBgTime(Date bgTime) { this.bgTime = bgTime; } - public Date getBgTime() + public Date getBgTime() { return bgTime; } - public void setBgReason(String bgReason) + public void setBgReason(String bgReason) { this.bgReason = bgReason; } - public String getBgReason() + public String getBgReason() { return bgReason; } - public void setDeptId(Long deptId) + public void setDeptId(Long deptId) { this.deptId = deptId; } - public Long getDeptId() + public Long getDeptId() { return deptId; } - public void setUserId(Long userId) + public void setUserId(Long userId) { this.userId = userId; } - public Long getUserId() + public Long getUserId() { return userId; } @@ -164,21 +178,22 @@ public class SzxcHkbgRecard extends BaseEntity @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("idCard", getIdCard()) - .append("acountNo", getAcountNo()) - .append("relation", getRelation()) - .append("bgType", getBgType()) - .append("number", getNumber()) - .append("bgTime", getBgTime()) - .append("bgReason", getBgReason()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("deptId", getDeptId()) - .append("userId", getUserId()) - .toString(); + .append("id", getId()) + .append("jmId", getJmId()) + .append("name", getName()) + .append("idCard", getIdCard()) + .append("acountNo", getAcountNo()) + .append("relation", getRelation()) + .append("bgType", getBgType()) + .append("number", getNumber()) + .append("bgTime", getBgTime()) + .append("bgReason", getBgReason()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("deptId", getDeptId()) + .append("userId", getUserId()) + .toString(); } } diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcJmTagService.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcJmTagService.java new file mode 100644 index 0000000..14f16d0 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcJmTagService.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.service; + +import com.ruoyi.szxc.domain.SzxcJmTag; + +import java.util.List; + +/** + * 居民标签关联Service接口 + * + * @author hs + * @date 2024-03-21 + */ +public interface ISzxcJmTagService +{ + /** + * 查询居民标签关联 + * + * @param jmId 居民标签关联主键 + * @return 居民标签关联 + */ + public SzxcJmTag selectSzxcJmTagByJmId(Long jmId); + + /** + * 查询居民标签关联列表 + * + * @param szxcJmTag 居民标签关联 + * @return 居民标签关联集合 + */ + public List selectSzxcJmTagList(SzxcJmTag szxcJmTag); + + /** + * 新增居民标签关联 + * + * @param szxcJmTag 居民标签关联 + * @return 结果 + */ + public int insertSzxcJmTag(SzxcJmTag szxcJmTag); + + /** + * 修改居民标签关联 + * + * @param szxcJmTag 居民标签关联 + * @return 结果 + */ + public int updateSzxcJmTag(SzxcJmTag szxcJmTag); + + /** + * 批量删除居民标签关联 + * + * @param jmIds 需要删除的居民标签关联主键集合 + * @return 结果 + */ + public int deleteSzxcJmTagByJmIds(Long[] jmIds); + + /** + * 删除居民标签关联信息 + * + * @param jmId 居民标签关联主键 + * @return 结果 + */ + public int deleteSzxcJmTagByJmId(Long jmId); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcJmTagServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcJmTagServiceImpl.java new file mode 100644 index 0000000..feda89c --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcJmTagServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.szxc.service.impl; + +import com.ruoyi.szxc.domain.SzxcJmTag; +import com.ruoyi.szxc.mapper.SzxcJmTagMapper; +import com.ruoyi.szxc.service.ISzxcJmTagService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 居民标签关联Service业务层处理 + * + * @author hs + * @date 2024-03-21 + */ +@Service +public class SzxcJmTagServiceImpl implements ISzxcJmTagService +{ + @Autowired + private SzxcJmTagMapper szxcJmTagMapper; + + /** + * 查询居民标签关联 + * + * @param jmId 居民标签关联主键 + * @return 居民标签关联 + */ + @Override + public SzxcJmTag selectSzxcJmTagByJmId(Long jmId) + { + return szxcJmTagMapper.selectSzxcJmTagByJmId(jmId); + } + + /** + * 查询居民标签关联列表 + * + * @param szxcJmTag 居民标签关联 + * @return 居民标签关联 + */ + @Override + public List selectSzxcJmTagList(SzxcJmTag szxcJmTag) + { + return szxcJmTagMapper.selectSzxcJmTagList(szxcJmTag); + } + + /** + * 新增居民标签关联 + * + * @param szxcJmTag 居民标签关联 + * @return 结果 + */ + @Override + public int insertSzxcJmTag(SzxcJmTag szxcJmTag) + { + return szxcJmTagMapper.insertSzxcJmTag(szxcJmTag); + } + + /** + * 修改居民标签关联 + * + * @param szxcJmTag 居民标签关联 + * @return 结果 + */ + @Override + public int updateSzxcJmTag(SzxcJmTag szxcJmTag) + { + return szxcJmTagMapper.updateSzxcJmTag(szxcJmTag); + } + + /** + * 批量删除居民标签关联 + * + * @param jmIds 需要删除的居民标签关联主键 + * @return 结果 + */ + @Override + public int deleteSzxcJmTagByJmIds(Long[] jmIds) + { + return szxcJmTagMapper.deleteSzxcJmTagByJmIds(jmIds); + } + + /** + * 删除居民标签关联信息 + * + * @param jmId 居民标签关联主键 + * @return 结果 + */ + @Override + public int deleteSzxcJmTagByJmId(Long jmId) + { + return szxcJmTagMapper.deleteSzxcJmTagByJmId(jmId); + } +} diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml index b5e3ddc..d697d3e 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcHkbgRecardMapper.xml @@ -1,11 +1,12 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + + @@ -23,12 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, name, id_card, acount_no, relation, bg_type, number, bg_time, bg_reason, create_by, create_time, update_by, update_time, dept_id, user_id from szxc_hkbg_recard + select id, jm_id, name, id_card, acount_no, relation, bg_type, number, bg_time, bg_reason, create_by, create_time, update_by, update_time, dept_id, user_id from szxc_hkbg_recard - + - + insert into szxc_hkbg_recard + jm_id, name, id_card, acount_no, @@ -64,8 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time, dept_id, user_id, - + + #{jmId}, #{name}, #{idCard}, #{acountNo}, @@ -80,12 +84,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{deptId}, #{userId}, - + update szxc_hkbg_recard + jm_id = #{jmId}, name = #{name}, id_card = #{idCard}, acount_no = #{acountNo}, @@ -109,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from szxc_hkbg_recard where id in + delete from szxc_hkbg_recard where id in #{id} diff --git a/ruoyi-ui/src/api/szxc/jmtag.js b/ruoyi-ui/src/api/szxc/jmtag.js new file mode 100644 index 0000000..fe8a080 --- /dev/null +++ b/ruoyi-ui/src/api/szxc/jmtag.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询居民标签关联列表 +export function listJmtag(query) { + return request({ + url: '/szxc/jmtag/list', + method: 'get', + params: query + }) +} + +// 查询居民标签关联详细 +export function getJmtag(jmId) { + return request({ + url: '/szxc/jmtag/' + jmId, + method: 'get' + }) +} + +// 新增居民标签关联 +export function addJmtag(data) { + return request({ + url: '/szxc/jmtag', + method: 'post', + data: data + }) +} + +// 修改居民标签关联 +export function updateJmtag(data) { + return request({ + url: '/szxc/jmtag', + method: 'put', + data: data + }) +} + +// 删除居民标签关联 +export function delJmtag(jmId) { + return request({ + url: '/szxc/jmtag/' + jmId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/szxc/jmtag/index.vue b/ruoyi-ui/src/views/szxc/jmtag/index.vue new file mode 100644 index 0000000..b739d4f --- /dev/null +++ b/ruoyi-ui/src/views/szxc/jmtag/index.vue @@ -0,0 +1,233 @@ + + +