添加党员管理

main
hansha 2 years ago
parent 53515711b9
commit d3d663939c

@ -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<SzxcDyManage> 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<SzxcDyManage> list = szxcDyManageService.selectSzxcDyManageList(szxcDyManage);
ExcelUtil<SzxcDyManage> util = new ExcelUtil<SzxcDyManage>(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));
}
}

@ -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();
}
}

@ -8,8 +8,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* szxc_person_tag * szxc_person_tag
* *
* @author ruoyi * @author hs
* @date 2024-03-14 * @date 2024-03-22
*/ */
public class SzxcPersonTag extends BaseEntity public class SzxcPersonTag extends BaseEntity
{ {
@ -22,6 +22,10 @@ public class SzxcPersonTag extends BaseEntity
@Excel(name = "标签名称") @Excel(name = "标签名称")
private String tagName; private String tagName;
/** 允许勾选(0是1否) */
@Excel(name = "允许勾选(0是1否)")
private String checkEnable;
/** 部门id */ /** 部门id */
@Excel(name = "部门id") @Excel(name = "部门id")
private Long deptId; private Long deptId;
@ -48,6 +52,15 @@ public class SzxcPersonTag extends BaseEntity
{ {
return tagName; return tagName;
} }
public void setCheckEnable(String checkEnable)
{
this.checkEnable = checkEnable;
}
public String getCheckEnable()
{
return checkEnable;
}
public void setDeptId(Long deptId) public void setDeptId(Long deptId)
{ {
this.deptId = deptId; this.deptId = deptId;
@ -72,6 +85,7 @@ public class SzxcPersonTag extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("tagName", getTagName()) .append("tagName", getTagName())
.append("checkEnable", getCheckEnable())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

@ -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<SzxcDyManage> 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);
}

@ -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<SzxcDyManage> 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);
}

@ -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<SzxcDyManage> 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);
}
}

@ -1,12 +1,16 @@
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 com.ruoyi.szxc.domain.SzxcJmInfo;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcOffRecardMapper;
import com.ruoyi.szxc.domain.SzxcOffRecard; 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 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 * Service
@ -17,8 +21,10 @@ import com.ruoyi.szxc.service.ISzxcOffRecardService;
@Service @Service
public class SzxcOffRecardServiceImpl implements ISzxcOffRecardService public class SzxcOffRecardServiceImpl implements ISzxcOffRecardService
{ {
@Autowired @Resource
private SzxcOffRecardMapper szxcOffRecardMapper; private SzxcOffRecardMapper szxcOffRecardMapper;
@Resource
private SzxcJmInfoMapper szxcJmInfoMapper;
/** /**
* *
@ -51,9 +57,20 @@ public class SzxcOffRecardServiceImpl implements ISzxcOffRecardService
* @return * @return
*/ */
@Override @Override
@Transactional
public int insertSzxcOffRecard(SzxcOffRecard szxcOffRecard) 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); return szxcOffRecardMapper.insertSzxcOffRecard(szxcOffRecard);
} }

@ -0,0 +1,131 @@
<?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">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcDyManageMapper">
<resultMap type="SzxcDyManage" id="SzxcDyManageResult">
<result property="id" column="id" />
<result property="jmId" column="jm_id" />
<result property="name" column="name" />
<result property="cardId" column="card_id" />
<result property="phone" column="phone" />
<result property="deptName" column="dept_name" />
<result property="deptId" column="dept_id" />
<result property="jg" column="jg" />
<result property="joinDate" column="join_date" />
<result property="joinUnit" column="join_unit" />
<result property="post" column="post" />
<result property="type" column="type" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="userId" column="user_id" />
</resultMap>
<sql id="selectSzxcDyManageVo">
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
</sql>
<select id="selectSzxcDyManageList" parameterType="SzxcDyManage" resultMap="SzxcDyManageResult">
<include refid="selectSzxcDyManageVo"/>
<where>
<if test="jmId != null "> and jm_id = #{jmId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="jg != null and jg != ''"> and jg = #{jg}</if>
<if test="joinDate != null "> and join_date = #{joinDate}</if>
<if test="joinUnit != null and joinUnit != ''"> and join_unit = #{joinUnit}</if>
<if test="post != null and post != ''"> and post = #{post}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where>
</select>
<select id="selectSzxcDyManageById" parameterType="Long" resultMap="SzxcDyManageResult">
<include refid="selectSzxcDyManageVo"/>
where id = #{id}
</select>
<insert id="insertSzxcDyManage" parameterType="SzxcDyManage" useGeneratedKeys="true" keyProperty="id">
insert into szxc_dy_manage
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jmId != null">jm_id,</if>
<if test="name != null">name,</if>
<if test="cardId != null">card_id,</if>
<if test="phone != null">phone,</if>
<if test="deptName != null">dept_name,</if>
<if test="deptId != null">dept_id,</if>
<if test="jg != null">jg,</if>
<if test="joinDate != null">join_date,</if>
<if test="joinUnit != null">join_unit,</if>
<if test="post != null">post,</if>
<if test="type != null">type,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="userId != null">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jmId != null">#{jmId},</if>
<if test="name != null">#{name},</if>
<if test="cardId != null">#{cardId},</if>
<if test="phone != null">#{phone},</if>
<if test="deptName != null">#{deptName},</if>
<if test="deptId != null">#{deptId},</if>
<if test="jg != null">#{jg},</if>
<if test="joinDate != null">#{joinDate},</if>
<if test="joinUnit != null">#{joinUnit},</if>
<if test="post != null">#{post},</if>
<if test="type != null">#{type},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="userId != null">#{userId},</if>
</trim>
</insert>
<update id="updateSzxcDyManage" parameterType="SzxcDyManage">
update szxc_dy_manage
<trim prefix="SET" suffixOverrides=",">
<if test="jmId != null">jm_id = #{jmId},</if>
<if test="name != null">name = #{name},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="jg != null">jg = #{jg},</if>
<if test="joinDate != null">join_date = #{joinDate},</if>
<if test="joinUnit != null">join_unit = #{joinUnit},</if>
<if test="post != null">post = #{post},</if>
<if test="type != null">type = #{type},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSzxcDyManageById" parameterType="Long">
delete from szxc_dy_manage where id = #{id}
</delete>
<delete id="deleteSzxcDyManageByIds" parameterType="String">
delete from szxc_dy_manage where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -7,6 +7,7 @@
<resultMap type="SzxcPersonTag" id="SzxcPersonTagResult"> <resultMap type="SzxcPersonTag" id="SzxcPersonTagResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="tagName" column="tag_name" /> <result property="tagName" column="tag_name" />
<result property="checkEnable" column="check_enable" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -16,7 +17,7 @@
</resultMap> </resultMap>
<sql id="selectSzxcPersonTagVo"> <sql id="selectSzxcPersonTagVo">
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
</sql> </sql>
<select id="selectSzxcPersonTagList" parameterType="SzxcPersonTag" resultMap="SzxcPersonTagResult"> <select id="selectSzxcPersonTagList" parameterType="SzxcPersonTag" resultMap="SzxcPersonTagResult">
@ -24,15 +25,16 @@
<where> <where>
<if test="tagName != null and tagName != ''"> and tag_name like concat('%', #{tagName}, '%')</if> <if test="tagName != null and tagName != ''"> and tag_name like concat('%', #{tagName}, '%')</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
<if test="checkEnable != null and checkEnable != ''"> and check_enable = #{checkEnable}</if>
<if test="deptId != null and deptId != 0">and dept_id = #{deptId}</if> <if test="deptId != null and deptId != 0">and dept_id = #{deptId}</if>
<!-- <if test="deptId != null and deptId != 0"> <!-- <if test="deptId != null and deptId != 0">
AND (d.dept_id = #{deptId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) AND (d.dept_id = #{deptId} OR d.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if>--> </if>-->
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope !=''"> <!--<if test="params.dataScope != null and params.dataScope !=''">
${params.dataScope} ${params.dataScope}
</if> </if>-->
</where> </where>
</select> </select>
@ -45,6 +47,7 @@
insert into szxc_person_tag insert into szxc_person_tag
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tagName != null and tagName != ''">tag_name,</if> <if test="tagName != null and tagName != ''">tag_name,</if>
<if test="checkEnable != null">check_enable,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -54,6 +57,7 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tagName != null and tagName != ''">#{tagName},</if> <if test="tagName != null and tagName != ''">#{tagName},</if>
<if test="checkEnable != null">#{checkEnable},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -67,6 +71,7 @@
update szxc_person_tag update szxc_person_tag
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tagName != null and tagName != ''">tag_name = #{tagName},</if> <if test="tagName != null and tagName != ''">tag_name = #{tagName},</if>
<if test="checkEnable != null">check_enable = #{checkEnable},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

@ -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'
})
}

@ -0,0 +1,409 @@
<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="巡查对像id" prop="jmId">
<el-input
v-model="queryParams.jmId"
placeholder="请输入巡查对像id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="身份证号" prop="cardId">
<el-input
v-model="queryParams.cardId"
placeholder="请输入身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属网格" prop="deptName">
<el-input
v-model="queryParams.deptName"
placeholder="请输入所属网格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="部门id" prop="deptId">
<el-input
v-model="queryParams.deptId"
placeholder="请输入部门id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="籍贯" prop="jg">
<el-input
v-model="queryParams.jg"
placeholder="请输入籍贯"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="入党时间" prop="joinDate">
<el-date-picker clearable
v-model="queryParams.joinDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择入党时间">
</el-date-picker>
</el-form-item>
<el-form-item label="入党单位" prop="joinUnit">
<el-input
v-model="queryParams.joinUnit"
placeholder="请输入入党单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="职务" prop="post">
<el-input
v-model="queryParams.post"
placeholder="请输入职务"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建者ID" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入创建者ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['szxc:dymanage:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['szxc:dymanage:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['szxc:dymanage:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['szxc:dymanage:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dymanageList" @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="巡查对像id" align="center" prop="jmId" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="身份证号" align="center" prop="cardId" />
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="所属网格" align="center" prop="deptName" />
<el-table-column label="部门id" align="center" prop="deptId" />
<el-table-column label="籍贯" align="center" prop="jg" />
<el-table-column label="入党时间" align="center" prop="joinDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.joinDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="入党单位" align="center" prop="joinUnit" />
<el-table-column label="职务" align="center" prop="post" />
<el-table-column label="分类" align="center" prop="type" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建者ID" align="center" prop="userId" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['szxc:dymanage:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['szxc:dymanage:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改党员管理对话框 -->
<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="巡查对像id" prop="jmId">
<el-input v-model="form.jmId" placeholder="请输入巡查对像id" />
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="身份证号" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="所属网格" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入所属网格" />
</el-form-item>
<el-form-item label="部门id" prop="deptId">
<el-input v-model="form.deptId" placeholder="请输入部门id" />
</el-form-item>
<el-form-item label="籍贯" prop="jg">
<el-input v-model="form.jg" placeholder="请输入籍贯" />
</el-form-item>
<el-form-item label="入党时间" prop="joinDate">
<el-date-picker clearable
v-model="form.joinDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择入党时间">
</el-date-picker>
</el-form-item>
<el-form-item label="入党单位" prop="joinUnit">
<el-input v-model="form.joinUnit" placeholder="请输入入党单位" />
</el-form-item>
<el-form-item label="职务" prop="post">
<el-input v-model="form.post" placeholder="请输入职务" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="创建者ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入创建者ID" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDymanage, getDymanage, delDymanage, addDymanage, updateDymanage } from "@/api/szxc/dymanage";
export default {
name: "Dymanage",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dymanageList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
jmId: null,
name: null,
cardId: null,
phone: null,
deptName: null,
deptId: null,
jg: null,
joinDate: null,
joinUnit: null,
post: null,
type: null,
userId: null
},
//
form: {},
//
rules: {
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询党员管理列表 */
getList() {
this.loading = true;
listDymanage(this.queryParams).then(response => {
this.dymanageList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
jmId: null,
name: null,
cardId: null,
phone: null,
deptName: null,
deptId: null,
jg: null,
joinDate: null,
joinUnit: null,
post: null,
type: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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 = "添加党员管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getDymanage(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) {
updateDymanage(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDymanage(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 delDymanage(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/dymanage/export', {
...this.queryParams
}, `dymanage_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save