diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcDyManageController.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcDyManageController.java new file mode 100644 index 0000000..0c85f7c --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/controller/SzxcDyManageController.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.SzxcDyManage; +import com.ruoyi.szxc.service.ISzxcDyManageService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 党员管理Controller + * + * @author hs + * @date 2024-03-22 + */ +@RestController +@RequestMapping("/szxc/dymanage") +public class SzxcDyManageController extends BaseController +{ + @Autowired + private ISzxcDyManageService szxcDyManageService; + + /** + * 查询党员管理列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:list')") + @GetMapping("/list") + public TableDataInfo list(SzxcDyManage szxcDyManage) + { + startPage(); + List list = szxcDyManageService.selectSzxcDyManageList(szxcDyManage); + return getDataTable(list); + } + + /** + * 导出党员管理列表 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:export')") + @Log(title = "党员管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SzxcDyManage szxcDyManage) + { + List list = szxcDyManageService.selectSzxcDyManageList(szxcDyManage); + ExcelUtil util = new ExcelUtil(SzxcDyManage.class); + util.exportExcel(response, list, "党员管理数据"); + } + + /** + * 获取党员管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(szxcDyManageService.selectSzxcDyManageById(id)); + } + + /** + * 新增党员管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:add')") + @Log(title = "党员管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SzxcDyManage szxcDyManage) + { + return toAjax(szxcDyManageService.insertSzxcDyManage(szxcDyManage)); + } + + /** + * 修改党员管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:edit')") + @Log(title = "党员管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SzxcDyManage szxcDyManage) + { + return toAjax(szxcDyManageService.updateSzxcDyManage(szxcDyManage)); + } + + /** + * 删除党员管理 + */ + @PreAuthorize("@ss.hasPermi('szxc:dymanage:remove')") + @Log(title = "党员管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(szxcDyManageService.deleteSzxcDyManageByIds(ids)); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcDyManage.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcDyManage.java new file mode 100644 index 0000000..4766691 --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcDyManage.java @@ -0,0 +1,214 @@ +package com.ruoyi.szxc.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +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_dy_manage + * + * @author hs + * @date 2024-03-22 + */ +public class SzxcDyManage extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 巡查对像id */ + @Excel(name = "巡查对像id") + private Long jmId; + + /** 姓名 */ + @Excel(name = "姓名") + private String name; + + /** 身份证号 */ + @Excel(name = "身份证号") + private String cardId; + + /** 手机号 */ + @Excel(name = "手机号") + private String phone; + + /** 所属网格 */ + @Excel(name = "所属网格") + private String deptName; + + /** 部门id */ + @Excel(name = "部门id") + private Long deptId; + + /** 籍贯 */ + @Excel(name = "籍贯") + private String jg; + + /** 入党时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "入党时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date joinDate; + + /** 入党单位 */ + @Excel(name = "入党单位") + private String joinUnit; + + /** 职务 */ + @Excel(name = "职务") + private String post; + + /** 分类 */ + @Excel(name = "分类") + private String type; + + /** 创建者ID */ + @Excel(name = "创建者ID") + private Long userId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setJmId(Long jmId) + { + this.jmId = jmId; + } + + public Long getJmId() + { + return jmId; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setCardId(String cardId) + { + this.cardId = cardId; + } + + public String getCardId() + { + return cardId; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getDeptName() + { + return deptName; + } + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + public Long getDeptId() + { + return deptId; + } + public void setJg(String jg) + { + this.jg = jg; + } + + public String getJg() + { + return jg; + } + public void setJoinDate(Date joinDate) + { + this.joinDate = joinDate; + } + + public Date getJoinDate() + { + return joinDate; + } + public void setJoinUnit(String joinUnit) + { + this.joinUnit = joinUnit; + } + + public String getJoinUnit() + { + return joinUnit; + } + public void setPost(String post) + { + this.post = post; + } + + public String getPost() + { + return post; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("jmId", getJmId()) + .append("name", getName()) + .append("cardId", getCardId()) + .append("phone", getPhone()) + .append("deptName", getDeptName()) + .append("deptId", getDeptId()) + .append("jg", getJg()) + .append("joinDate", getJoinDate()) + .append("joinUnit", getJoinUnit()) + .append("post", getPost()) + .append("type", getType()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("userId", getUserId()) + .toString(); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPersonTag.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPersonTag.java index 913a393..0acfac2 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPersonTag.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/domain/SzxcPersonTag.java @@ -8,8 +8,8 @@ import com.ruoyi.common.core.domain.BaseEntity; /** * 人员标签对象 szxc_person_tag * - * @author ruoyi - * @date 2024-03-14 + * @author hs + * @date 2024-03-22 */ public class SzxcPersonTag extends BaseEntity { @@ -22,6 +22,10 @@ public class SzxcPersonTag extends BaseEntity @Excel(name = "标签名称") private String tagName; + /** 允许勾选(0是1否) */ + @Excel(name = "允许勾选(0是1否)") + private String checkEnable; + /** 部门id */ @Excel(name = "部门id") private Long deptId; @@ -48,6 +52,15 @@ public class SzxcPersonTag extends BaseEntity { return tagName; } + public void setCheckEnable(String checkEnable) + { + this.checkEnable = checkEnable; + } + + public String getCheckEnable() + { + return checkEnable; + } public void setDeptId(Long deptId) { this.deptId = deptId; @@ -72,6 +85,7 @@ public class SzxcPersonTag extends BaseEntity return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("tagName", getTagName()) + .append("checkEnable", getCheckEnable()) .append("deptId", getDeptId()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcDyManageMapper.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcDyManageMapper.java new file mode 100644 index 0000000..9924d9d --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/mapper/SzxcDyManageMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.mapper; + +import com.ruoyi.szxc.domain.SzxcDyManage; + +import java.util.List; + +/** + * 党员管理Mapper接口 + * + * @author hs + * @date 2024-03-22 + */ +public interface SzxcDyManageMapper +{ + /** + * 查询党员管理 + * + * @param id 党员管理主键 + * @return 党员管理 + */ + public SzxcDyManage selectSzxcDyManageById(Long id); + + /** + * 查询党员管理列表 + * + * @param szxcDyManage 党员管理 + * @return 党员管理集合 + */ + public List selectSzxcDyManageList(SzxcDyManage szxcDyManage); + + /** + * 新增党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + public int insertSzxcDyManage(SzxcDyManage szxcDyManage); + + /** + * 修改党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + public int updateSzxcDyManage(SzxcDyManage szxcDyManage); + + /** + * 删除党员管理 + * + * @param id 党员管理主键 + * @return 结果 + */ + public int deleteSzxcDyManageById(Long id); + + /** + * 批量删除党员管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSzxcDyManageByIds(Long[] ids); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcDyManageService.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcDyManageService.java new file mode 100644 index 0000000..37d624d --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/ISzxcDyManageService.java @@ -0,0 +1,62 @@ +package com.ruoyi.szxc.service; + +import com.ruoyi.szxc.domain.SzxcDyManage; + +import java.util.List; + +/** + * 党员管理Service接口 + * + * @author hs + * @date 2024-03-22 + */ +public interface ISzxcDyManageService +{ + /** + * 查询党员管理 + * + * @param id 党员管理主键 + * @return 党员管理 + */ + public SzxcDyManage selectSzxcDyManageById(Long id); + + /** + * 查询党员管理列表 + * + * @param szxcDyManage 党员管理 + * @return 党员管理集合 + */ + public List selectSzxcDyManageList(SzxcDyManage szxcDyManage); + + /** + * 新增党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + public int insertSzxcDyManage(SzxcDyManage szxcDyManage); + + /** + * 修改党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + public int updateSzxcDyManage(SzxcDyManage szxcDyManage); + + /** + * 批量删除党员管理 + * + * @param ids 需要删除的党员管理主键集合 + * @return 结果 + */ + public int deleteSzxcDyManageByIds(Long[] ids); + + /** + * 删除党员管理信息 + * + * @param id 党员管理主键 + * @return 结果 + */ + public int deleteSzxcDyManageById(Long id); +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcDyManageServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcDyManageServiceImpl.java new file mode 100644 index 0000000..a38215a --- /dev/null +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcDyManageServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.szxc.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.szxc.domain.SzxcDyManage; +import com.ruoyi.szxc.mapper.SzxcDyManageMapper; +import com.ruoyi.szxc.service.ISzxcDyManageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 党员管理Service业务层处理 + * + * @author hs + * @date 2024-03-22 + */ +@Service +public class SzxcDyManageServiceImpl implements ISzxcDyManageService +{ + @Autowired + private SzxcDyManageMapper szxcDyManageMapper; + + /** + * 查询党员管理 + * + * @param id 党员管理主键 + * @return 党员管理 + */ + @Override + public SzxcDyManage selectSzxcDyManageById(Long id) + { + return szxcDyManageMapper.selectSzxcDyManageById(id); + } + + /** + * 查询党员管理列表 + * + * @param szxcDyManage 党员管理 + * @return 党员管理 + */ + @Override + public List selectSzxcDyManageList(SzxcDyManage szxcDyManage) + { + return szxcDyManageMapper.selectSzxcDyManageList(szxcDyManage); + } + + /** + * 新增党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + @Override + public int insertSzxcDyManage(SzxcDyManage szxcDyManage) + { + szxcDyManage.setCreateTime(DateUtils.getNowDate()); + return szxcDyManageMapper.insertSzxcDyManage(szxcDyManage); + } + + /** + * 修改党员管理 + * + * @param szxcDyManage 党员管理 + * @return 结果 + */ + @Override + public int updateSzxcDyManage(SzxcDyManage szxcDyManage) + { + szxcDyManage.setUpdateTime(DateUtils.getNowDate()); + return szxcDyManageMapper.updateSzxcDyManage(szxcDyManage); + } + + /** + * 批量删除党员管理 + * + * @param ids 需要删除的党员管理主键 + * @return 结果 + */ + @Override + public int deleteSzxcDyManageByIds(Long[] ids) + { + return szxcDyManageMapper.deleteSzxcDyManageByIds(ids); + } + + /** + * 删除党员管理信息 + * + * @param id 党员管理主键 + * @return 结果 + */ + @Override + public int deleteSzxcDyManageById(Long id) + { + return szxcDyManageMapper.deleteSzxcDyManageById(id); + } +} diff --git a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcOffRecardServiceImpl.java b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcOffRecardServiceImpl.java index b5b9a7f..7aa9911 100644 --- a/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcOffRecardServiceImpl.java +++ b/ruoyi-szxc/src/main/java/com/ruoyi/szxc/service/impl/SzxcOffRecardServiceImpl.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.SzxcOffRecardMapper; +import com.ruoyi.szxc.domain.SzxcJmInfo; import com.ruoyi.szxc.domain.SzxcOffRecard; +import com.ruoyi.szxc.mapper.SzxcJmInfoMapper; +import com.ruoyi.szxc.mapper.SzxcOffRecardMapper; import com.ruoyi.szxc.service.ISzxcOffRecardService; +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.ISzxcOffRecardService; @Service public class SzxcOffRecardServiceImpl implements ISzxcOffRecardService { - @Autowired + @Resource private SzxcOffRecardMapper szxcOffRecardMapper; + @Resource + private SzxcJmInfoMapper szxcJmInfoMapper; /** * 查询注销登记记录 @@ -51,9 +57,20 @@ public class SzxcOffRecardServiceImpl implements ISzxcOffRecardService * @return 结果 */ @Override + @Transactional public int insertSzxcOffRecard(SzxcOffRecard szxcOffRecard) { - szxcOffRecard.setCreateTime(DateUtils.getNowDate()); + //修改居民信息 注销状态 + try { + SzxcJmInfo jmInfo = new SzxcJmInfo(); + jmInfo.setId(szxcOffRecard.getJmId()); + jmInfo.setOff("1"); + szxcJmInfoMapper.updateSzxcJmInfo(jmInfo); + szxcOffRecard.setCreateTime(DateUtils.getNowDate()); + } catch (Exception e) { + e.printStackTrace(); + return 0; + } return szxcOffRecardMapper.insertSzxcOffRecard(szxcOffRecard); } diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcDyManageMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcDyManageMapper.xml new file mode 100644 index 0000000..a29c6e6 --- /dev/null +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcDyManageMapper.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, jm_id, name, card_id, phone, dept_name, dept_id, jg, join_date, join_unit, post, type, remark, create_by, create_time, update_by, update_time, user_id from szxc_dy_manage + + + + + + + + insert into szxc_dy_manage + + jm_id, + name, + card_id, + phone, + dept_name, + dept_id, + jg, + join_date, + join_unit, + post, + type, + remark, + create_by, + create_time, + update_by, + update_time, + user_id, + + + #{jmId}, + #{name}, + #{cardId}, + #{phone}, + #{deptName}, + #{deptId}, + #{jg}, + #{joinDate}, + #{joinUnit}, + #{post}, + #{type}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{userId}, + + + + + update szxc_dy_manage + + jm_id = #{jmId}, + name = #{name}, + card_id = #{cardId}, + phone = #{phone}, + dept_name = #{deptName}, + dept_id = #{deptId}, + jg = #{jg}, + join_date = #{joinDate}, + join_unit = #{joinUnit}, + post = #{post}, + type = #{type}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + user_id = #{userId}, + + where id = #{id} + + + + delete from szxc_dy_manage where id = #{id} + + + + delete from szxc_dy_manage where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPersonTagMapper.xml b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPersonTagMapper.xml index 5fdd362..c620584 100644 --- a/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPersonTagMapper.xml +++ b/ruoyi-szxc/src/main/resources/mapper/szxc/SzxcPersonTagMapper.xml @@ -7,6 +7,7 @@ + @@ -16,7 +17,7 @@ - select id, tag_name, dept_id, create_by, create_time, update_by, update_time, user_id from szxc_person_tag + select id, tag_name,check_enable, dept_id, create_by, create_time, update_by, update_time, user_id from szxc_person_tag @@ -45,6 +47,7 @@ insert into szxc_person_tag tag_name, + check_enable, dept_id, create_by, create_time, @@ -54,6 +57,7 @@ #{tagName}, + #{checkEnable}, #{deptId}, #{createBy}, #{createTime}, @@ -67,6 +71,7 @@ update szxc_person_tag tag_name = #{tagName}, + check_enable = #{checkEnable}, dept_id = #{deptId}, create_by = #{createBy}, create_time = #{createTime}, diff --git a/ruoyi-ui/src/api/szxc/dymanage.js b/ruoyi-ui/src/api/szxc/dymanage.js new file mode 100644 index 0000000..7ac4587 --- /dev/null +++ b/ruoyi-ui/src/api/szxc/dymanage.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询党员管理列表 +export function listDymanage(query) { + return request({ + url: '/szxc/dymanage/list', + method: 'get', + params: query + }) +} + +// 查询党员管理详细 +export function getDymanage(id) { + return request({ + url: '/szxc/dymanage/' + id, + method: 'get' + }) +} + +// 新增党员管理 +export function addDymanage(data) { + return request({ + url: '/szxc/dymanage', + method: 'post', + data: data + }) +} + +// 修改党员管理 +export function updateDymanage(data) { + return request({ + url: '/szxc/dymanage', + method: 'put', + data: data + }) +} + +// 删除党员管理 +export function delDymanage(id) { + return request({ + url: '/szxc/dymanage/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/szxc/dymanage/index.vue b/ruoyi-ui/src/views/szxc/dymanage/index.vue new file mode 100644 index 0000000..976adff --- /dev/null +++ b/ruoyi-ui/src/views/szxc/dymanage/index.vue @@ -0,0 +1,409 @@ + + +