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();
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
@ -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…
Reference in new issue