数据表添加、用户添加身份证号及验证

main
hansha 2 years ago
parent c5123d0c12
commit 8786e12d76

@ -65,6 +65,10 @@ public class SysProfileController extends BaseController
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
if (StringUtils.isNotEmpty(user.getCardId()) && !userService.checkCardIdUnique(currentUser))
{
return error("修改用户'" + loginUser.getUsername() + "'失败,身份证号已存在");
}
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
{
return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在");

@ -1,21 +1,5 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@ -31,6 +15,16 @@ import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.stream.Collectors;
/**
*
@ -128,6 +122,10 @@ public class SysUserController extends BaseController
{
return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
}
else if (StringUtils.isNotEmpty(user.getCardId()) && !userService.checkCardIdUnique(user))
{
return error("新增用户'" + user.getUserName() + "'失败,身份证号已存在");
}
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
{
return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
@ -158,8 +156,10 @@ public class SysUserController extends BaseController
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
{
return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
}else if(StringUtils.isNotEmpty(user.getCardId()) && !userService.checkCardIdUnique(user))
{
return error("修改用户'" + user.getUserName() + "'失败,身份证号已存在");
}else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
{
return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}

@ -1,16 +1,19 @@
package com.ruoyi.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.annotation.Excel.Type;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
/**
* sys_user
@ -45,6 +48,10 @@ public class SysUser extends BaseEntity
@Excel(name = "手机号码")
private String phonenumber;
/** 身份证号 */
@Excel(name = "身份证号")
private String cardId;
/** 用户性别 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
@ -177,7 +184,15 @@ public class SysUser extends BaseEntity
this.phonenumber = phonenumber;
}
public String getSex()
public void setCardId(String cardId)
{
this.cardId = cardId;
}
public String getCardId() {
return cardId;
}
public String getSex()
{
return sex;
}
@ -306,6 +321,7 @@ public class SysUser extends BaseEntity
.append("nickName", getNickName())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
.append("cardId", getCardId())
.append("sex", getSex())
.append("avatar", getAvatar())
.append("password", getPassword())

@ -1,8 +1,9 @@
package com.ruoyi.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
@ -124,4 +125,12 @@ public interface SysUserMapper
* @return
*/
public SysUser checkEmailUnique(String email);
/**
* cardId
*
* @param cardId
* @return
*/
public SysUser checkCardIdUnique(String cardId);
}

@ -1,8 +1,9 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import java.util.List;
/**
*
*
@ -90,6 +91,14 @@ public interface ISysUserService
*/
public boolean checkEmailUnique(SysUser user);
/**
* cardId
*
* @param user
* @return
*/
public boolean checkCardIdUnique(SysUser user);
/**
*
*

@ -1,15 +1,5 @@
package com.ruoyi.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.validation.Validator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysRole;
@ -22,13 +12,20 @@ import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.SysPostMapper;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserPostMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.mapper.*;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.validation.Validator;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
*
@ -212,6 +209,24 @@ public class SysUserServiceImpl implements ISysUserService
return UserConstants.UNIQUE;
}
/**
* email
*
* @param user
* @return
*/
@Override
public boolean checkCardIdUnique(SysUser user)
{
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
SysUser info = userMapper.checkCardIdUnique(user.getCardId());
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
}
/**
*
*

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="nickName" column="nick_name" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="cardId" column="card_id" />
<result property="sex" column="sex" />
<result property="avatar" column="avatar" />
<result property="password" column="password" />
@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber,u.card_id, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
@ -57,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber,u.card_id, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
@ -72,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
@ -86,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber,u.card_id, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -98,12 +100,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber,u.card_id, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -116,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
@ -142,6 +146,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select>
<select id="checkCardIdUnique" parameterType="String" resultMap="SysUserResult">
select user_id, card_id from sys_user where card_id = #{cardId} and del_flag = '0' limit 1
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
@ -151,6 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
<if test="cardId != null">card_id,</if>
<if test="sex != null and sex != ''">sex,</if>
<if test="password != null and password != ''">password,</if>
<if test="status != null and status != ''">status,</if>
@ -165,6 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
<if test="cardId != null">#{cardId},</if>
<if test="sex != null and sex != ''">#{sex},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="status != null and status != ''">#{status},</if>
@ -182,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="password != null and password != ''">password = #{password},</if>

@ -1,48 +1,42 @@
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.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.szxc.domain.News;
import com.ruoyi.szxc.service.INewsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.szxc.domain.SzxcNews;
import com.ruoyi.szxc.service.ISzxcNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author hs
* @date 2024-03-15
* @date 2024-03-16
*/
@RestController
@RequestMapping("/szxc/news")
public class NewsController extends BaseController
public class SzxcNewsController extends BaseController
{
@Autowired
private INewsService newsService;
private ISzxcNewsService szxcNewsService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('szxc:news:list')")
@GetMapping("/list")
public TableDataInfo list(News news)
public TableDataInfo list(SzxcNews szxcNews)
{
startPage();
List<News> list = newsService.selectNewsList(news);
List<SzxcNews> list = szxcNewsService.selectSzxcNewsList(szxcNews);
return getDataTable(list);
}
@ -52,10 +46,10 @@ public class NewsController extends BaseController
@PreAuthorize("@ss.hasPermi('szxc:news:export')")
@Log(title = "公告资讯", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, News news)
public void export(HttpServletResponse response, SzxcNews szxcNews)
{
List<News> list = newsService.selectNewsList(news);
ExcelUtil<News> util = new ExcelUtil<News>(News.class);
List<SzxcNews> list = szxcNewsService.selectSzxcNewsList(szxcNews);
ExcelUtil<SzxcNews> util = new ExcelUtil<SzxcNews>(SzxcNews.class);
util.exportExcel(response, list, "公告资讯数据");
}
@ -66,7 +60,7 @@ public class NewsController extends BaseController
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(newsService.selectNewsById(id));
return success(szxcNewsService.selectSzxcNewsById(id));
}
/**
@ -75,9 +69,9 @@ public class NewsController extends BaseController
@PreAuthorize("@ss.hasPermi('szxc:news:add')")
@Log(title = "公告资讯", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody News news)
public AjaxResult add(@RequestBody SzxcNews szxcNews)
{
return toAjax(newsService.insertNews(news));
return toAjax(szxcNewsService.insertSzxcNews(szxcNews));
}
/**
@ -86,9 +80,9 @@ public class NewsController extends BaseController
@PreAuthorize("@ss.hasPermi('szxc:news:edit')")
@Log(title = "公告资讯", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody News news)
public AjaxResult edit(@RequestBody SzxcNews szxcNews)
{
return toAjax(newsService.updateNews(news));
return toAjax(szxcNewsService.updateSzxcNews(szxcNews));
}
/**
@ -99,6 +93,6 @@ public class NewsController extends BaseController
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(newsService.deleteNewsByIds(ids));
return toAjax(szxcNewsService.deleteSzxcNewsByIds(ids));
}
}

@ -0,0 +1,49 @@
package com.ruoyi.szxc.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* szxc_jm_car
*
* @author hs
* @date 2024-03-16
*/
public class SzxcJmCar extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 居民id */
private Long jmId;
/** 车辆id */
private Long carId;
public void setJmId(Long jmId)
{
this.jmId = jmId;
}
public Long getJmId()
{
return jmId;
}
public void setCarId(Long carId)
{
this.carId = carId;
}
public Long getCarId()
{
return carId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("jmId", getJmId())
.append("carId", getCarId())
.toString();
}
}

@ -0,0 +1,50 @@
package com.ruoyi.szxc.domain;
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;
/**
* szxc_jm_house
*
* @author hs
* @date 2024-03-16
*/
public class SzxcJmHouse extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 居民id */
private Long jmId;
/** 房屋id */
private Long houseId;
public void setJmId(Long jmId)
{
this.jmId = jmId;
}
public Long getJmId()
{
return jmId;
}
public void setHouseId(Long houseId)
{
this.houseId = houseId;
}
public Long getHouseId()
{
return houseId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("jmId", getJmId())
.append("houseId", getHouseId())
.toString();
}
}

@ -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_jm_info
*
* @author hs
* @date 2024-03-15
* @date 2024-03-16
*/
public class SzxcJmInfo extends BaseEntity
{
@ -42,7 +43,7 @@ public class SzxcJmInfo extends BaseEntity
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
private String cardId;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ -53,8 +54,8 @@ public class SzxcJmInfo extends BaseEntity
@Excel(name = "年龄")
private Long age;
/** 用户性别0男 1女 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女")
/** 性别0男 1女 2未知 */
@Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 籍贯 */
@ -151,14 +152,14 @@ public class SzxcJmInfo extends BaseEntity
{
return nationality;
}
public void setIdCard(String idCard)
public void setCardId(String cardId)
{
this.idCard = idCard;
this.cardId = cardId;
}
public String getIdCard()
public String getCardId()
{
return idCard;
return cardId;
}
public void setBornDate(Date bornDate)
{
@ -281,30 +282,30 @@ public class SzxcJmInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("name", getName())
.append("oldName", getOldName())
.append("nationality", getNationality())
.append("idCard", getIdCard())
.append("bornDate", getBornDate())
.append("age", getAge())
.append("sex", getSex())
.append("jg", getJg())
.append("relation", getRelation())
.append("jgNature", getJgNature())
.append("longLive", getLongLive())
.append("hjAddress", getHjAddress())
.append("phone", getPhone())
.append("head", getHead())
.append("sameHeadIds", getSameHeadIds())
.append("off", getOff())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("userId", getUserId())
.toString();
.append("id", getId())
.append("deptId", getDeptId())
.append("deptName", getDeptName())
.append("name", getName())
.append("oldName", getOldName())
.append("nationality", getNationality())
.append("cardId", getCardId())
.append("bornDate", getBornDate())
.append("age", getAge())
.append("sex", getSex())
.append("jg", getJg())
.append("relation", getRelation())
.append("jgNature", getJgNature())
.append("longLive", getLongLive())
.append("hjAddress", getHjAddress())
.append("phone", getPhone())
.append("head", getHead())
.append("sameHeadIds", getSameHeadIds())
.append("off", getOff())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("userId", getUserId())
.toString();
}
}

@ -0,0 +1,50 @@
package com.ruoyi.szxc.domain;
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;
/**
* szxc_jm_tag
*
* @author hs
* @date 2024-03-16
*/
public class SzxcJmTag extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 居民id */
private Long jmId;
/** 标签id */
private Long tagId;
public void setJmId(Long jmId)
{
this.jmId = jmId;
}
public Long getJmId()
{
return jmId;
}
public void setTagId(Long tagId)
{
this.tagId = tagId;
}
public Long getTagId()
{
return tagId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("jmId", getJmId())
.append("tagId", getTagId())
.toString();
}
}

@ -6,12 +6,12 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* news
* szxc_news
*
* @author hs
* @date 2024-03-15
* @date 2024-03-16
*/
public class News extends BaseEntity
public class SzxcNews extends BaseEntity
{
private static final long serialVersionUID = 1L;

@ -0,0 +1,62 @@
package com.ruoyi.szxc.mapper;
import com.ruoyi.szxc.domain.SzxcJmCar;
import java.util.List;
/**
* Mapper
*
* @author hs
* @date 2024-03-16
*/
public interface SzxcJmCarMapper
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmCar selectSzxcJmCarByJmId(Long jmId);
/**
*
*
* @param szxcJmCar
* @return
*/
public List<SzxcJmCar> selectSzxcJmCarList(SzxcJmCar szxcJmCar);
/**
*
*
* @param szxcJmCar
* @return
*/
public int insertSzxcJmCar(SzxcJmCar szxcJmCar);
/**
*
*
* @param szxcJmCar
* @return
*/
public int updateSzxcJmCar(SzxcJmCar szxcJmCar);
/**
*
*
* @param jmId
* @return
*/
public int deleteSzxcJmCarByJmId(Long jmId);
/**
*
*
* @param jmIds
* @return
*/
public int deleteSzxcJmCarByJmIds(Long[] jmIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.szxc.mapper;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcJmHouse;
/**
* Mapper
*
* @author hs
* @date 2024-03-16
*/
public interface SzxcJmHouseMapper
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmHouse selectSzxcJmHouseByJmId(Long jmId);
/**
*
*
* @param szxcJmHouse
* @return
*/
public List<SzxcJmHouse> selectSzxcJmHouseList(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param szxcJmHouse
* @return
*/
public int insertSzxcJmHouse(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param szxcJmHouse
* @return
*/
public int updateSzxcJmHouse(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param jmId
* @return
*/
public int deleteSzxcJmHouseByJmId(Long jmId);
/**
*
*
* @param jmIds
* @return
*/
public int deleteSzxcJmHouseByJmIds(Long[] jmIds);
}

@ -0,0 +1,61 @@
package com.ruoyi.szxc.mapper;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcJmTag;
/**
* Mapper
*
* @author hs
* @date 2024-03-16
*/
public interface SzxcJmTagMapper
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmTag selectSzxcJmTagByJmId(Long jmId);
/**
*
*
* @param szxcJmTag
* @return
*/
public List<SzxcJmTag> selectSzxcJmTagList(SzxcJmTag szxcJmTag);
/**
*
*
* @param szxcJmTag
* @return
*/
public int insertSzxcJmTag(SzxcJmTag szxcJmTag);
/**
*
*
* @param szxcJmTag
* @return
*/
public int updateSzxcJmTag(SzxcJmTag szxcJmTag);
/**
*
*
* @param jmId
* @return
*/
public int deleteSzxcJmTagByJmId(Long jmId);
/**
*
*
* @param jmIds
* @return
*/
public int deleteSzxcJmTagByJmIds(Long[] jmIds);
}

@ -1,16 +1,15 @@
package com.ruoyi.szxc.mapper;
import com.ruoyi.szxc.domain.News;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcNews;
/**
* Mapper
*
* @author hs
* @date 2024-03-15
* @date 2024-03-16
*/
public interface NewsMapper
public interface SzxcNewsMapper
{
/**
*
@ -18,31 +17,31 @@ public interface NewsMapper
* @param id
* @return
*/
public News selectNewsById(Long id);
public SzxcNews selectSzxcNewsById(Long id);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public List<News> selectNewsList(News news);
public List<SzxcNews> selectSzxcNewsList(SzxcNews szxcNews);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public int insertNews(News news);
public int insertSzxcNews(SzxcNews szxcNews);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public int updateNews(News news);
public int updateSzxcNews(SzxcNews szxcNews);
/**
*
@ -50,7 +49,7 @@ public interface NewsMapper
* @param id
* @return
*/
public int deleteNewsById(Long id);
public int deleteSzxcNewsById(Long id);
/**
*
@ -58,5 +57,5 @@ public interface NewsMapper
* @param ids
* @return
*/
public int deleteNewsByIds(Long[] ids);
public int deleteSzxcNewsByIds(Long[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.szxc.service;
import com.ruoyi.szxc.domain.SzxcJmCar;
import java.util.List;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
public interface ISzxcJmCarService
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmCar selectSzxcJmCarByJmId(Long jmId);
/**
*
*
* @param szxcJmCar
* @return
*/
public List<SzxcJmCar> selectSzxcJmCarList(SzxcJmCar szxcJmCar);
/**
*
*
* @param szxcJmCar
* @return
*/
public int insertSzxcJmCar(SzxcJmCar szxcJmCar);
/**
*
*
* @param szxcJmCar
* @return
*/
public int updateSzxcJmCar(SzxcJmCar szxcJmCar);
/**
*
*
* @param jmIds
* @return
*/
public int deleteSzxcJmCarByJmIds(Long[] jmIds);
/**
*
*
* @param jmId
* @return
*/
public int deleteSzxcJmCarByJmId(Long jmId);
}

@ -0,0 +1,61 @@
package com.ruoyi.szxc.service;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcJmHouse;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
public interface ISzxcJmHouseService
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmHouse selectSzxcJmHouseByJmId(Long jmId);
/**
*
*
* @param szxcJmHouse
* @return
*/
public List<SzxcJmHouse> selectSzxcJmHouseList(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param szxcJmHouse
* @return
*/
public int insertSzxcJmHouse(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param szxcJmHouse
* @return
*/
public int updateSzxcJmHouse(SzxcJmHouse szxcJmHouse);
/**
*
*
* @param jmIds
* @return
*/
public int deleteSzxcJmHouseByJmIds(Long[] jmIds);
/**
*
*
* @param jmId
* @return
*/
public int deleteSzxcJmHouseByJmId(Long jmId);
}

@ -0,0 +1,61 @@
package com.ruoyi.szxc.service;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcJmTag;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
public interface ISzxcJmTagService
{
/**
*
*
* @param jmId
* @return
*/
public SzxcJmTag selectSzxcJmTagByJmId(Long jmId);
/**
*
*
* @param szxcJmTag
* @return
*/
public List<SzxcJmTag> 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);
}

@ -1,16 +1,15 @@
package com.ruoyi.szxc.service;
import com.ruoyi.szxc.domain.News;
import java.util.List;
import com.ruoyi.szxc.domain.SzxcNews;
/**
* Service
*
* @author hs
* @date 2024-03-15
* @date 2024-03-16
*/
public interface INewsService
public interface ISzxcNewsService
{
/**
*
@ -18,31 +17,31 @@ public interface INewsService
* @param id
* @return
*/
public News selectNewsById(Long id);
public SzxcNews selectSzxcNewsById(Long id);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public List<News> selectNewsList(News news);
public List<SzxcNews> selectSzxcNewsList(SzxcNews szxcNews);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public int insertNews(News news);
public int insertSzxcNews(SzxcNews szxcNews);
/**
*
*
* @param news
* @param szxcNews
* @return
*/
public int updateNews(News news);
public int updateSzxcNews(SzxcNews szxcNews);
/**
*
@ -50,7 +49,7 @@ public interface INewsService
* @param ids
* @return
*/
public int deleteNewsByIds(Long[] ids);
public int deleteSzxcNewsByIds(Long[] ids);
/**
*
@ -58,5 +57,5 @@ public interface INewsService
* @param id
* @return
*/
public int deleteNewsById(Long id);
public int deleteSzxcNewsById(Long id);
}

@ -1,97 +0,0 @@
package com.ruoyi.szxc.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.szxc.domain.News;
import com.ruoyi.szxc.mapper.NewsMapper;
import com.ruoyi.szxc.service.INewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author hs
* @date 2024-03-15
*/
@Service
public class NewsServiceImpl implements INewsService
{
@Autowired
private NewsMapper newsMapper;
/**
*
*
* @param id
* @return
*/
@Override
public News selectNewsById(Long id)
{
return newsMapper.selectNewsById(id);
}
/**
*
*
* @param news
* @return
*/
@Override
public List<News> selectNewsList(News news)
{
return newsMapper.selectNewsList(news);
}
/**
*
*
* @param news
* @return
*/
@Override
public int insertNews(News news)
{
news.setCreateTime(DateUtils.getNowDate());
return newsMapper.insertNews(news);
}
/**
*
*
* @param news
* @return
*/
@Override
public int updateNews(News news)
{
news.setUpdateTime(DateUtils.getNowDate());
return newsMapper.updateNews(news);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteNewsByIds(Long[] ids)
{
return newsMapper.deleteNewsByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteNewsById(Long id)
{
return newsMapper.deleteNewsById(id);
}
}

@ -0,0 +1,94 @@
package com.ruoyi.szxc.service.impl;
import com.ruoyi.szxc.domain.SzxcJmCar;
import com.ruoyi.szxc.mapper.SzxcJmCarMapper;
import com.ruoyi.szxc.service.ISzxcJmCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
@Service
public class SzxcJmCarServiceImpl implements ISzxcJmCarService
{
@Autowired
private SzxcJmCarMapper szxcJmCarMapper;
/**
*
*
* @param jmId
* @return
*/
@Override
public SzxcJmCar selectSzxcJmCarByJmId(Long jmId)
{
return szxcJmCarMapper.selectSzxcJmCarByJmId(jmId);
}
/**
*
*
* @param szxcJmCar
* @return
*/
@Override
public List<SzxcJmCar> selectSzxcJmCarList(SzxcJmCar szxcJmCar)
{
return szxcJmCarMapper.selectSzxcJmCarList(szxcJmCar);
}
/**
*
*
* @param szxcJmCar
* @return
*/
@Override
public int insertSzxcJmCar(SzxcJmCar szxcJmCar)
{
return szxcJmCarMapper.insertSzxcJmCar(szxcJmCar);
}
/**
*
*
* @param szxcJmCar
* @return
*/
@Override
public int updateSzxcJmCar(SzxcJmCar szxcJmCar)
{
return szxcJmCarMapper.updateSzxcJmCar(szxcJmCar);
}
/**
*
*
* @param jmIds
* @return
*/
@Override
public int deleteSzxcJmCarByJmIds(Long[] jmIds)
{
return szxcJmCarMapper.deleteSzxcJmCarByJmIds(jmIds);
}
/**
*
*
* @param jmId
* @return
*/
@Override
public int deleteSzxcJmCarByJmId(Long jmId)
{
return szxcJmCarMapper.deleteSzxcJmCarByJmId(jmId);
}
}

@ -0,0 +1,93 @@
package com.ruoyi.szxc.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcJmHouseMapper;
import com.ruoyi.szxc.domain.SzxcJmHouse;
import com.ruoyi.szxc.service.ISzxcJmHouseService;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
@Service
public class SzxcJmHouseServiceImpl implements ISzxcJmHouseService
{
@Autowired
private SzxcJmHouseMapper szxcJmHouseMapper;
/**
*
*
* @param jmId
* @return
*/
@Override
public SzxcJmHouse selectSzxcJmHouseByJmId(Long jmId)
{
return szxcJmHouseMapper.selectSzxcJmHouseByJmId(jmId);
}
/**
*
*
* @param szxcJmHouse
* @return
*/
@Override
public List<SzxcJmHouse> selectSzxcJmHouseList(SzxcJmHouse szxcJmHouse)
{
return szxcJmHouseMapper.selectSzxcJmHouseList(szxcJmHouse);
}
/**
*
*
* @param szxcJmHouse
* @return
*/
@Override
public int insertSzxcJmHouse(SzxcJmHouse szxcJmHouse)
{
return szxcJmHouseMapper.insertSzxcJmHouse(szxcJmHouse);
}
/**
*
*
* @param szxcJmHouse
* @return
*/
@Override
public int updateSzxcJmHouse(SzxcJmHouse szxcJmHouse)
{
return szxcJmHouseMapper.updateSzxcJmHouse(szxcJmHouse);
}
/**
*
*
* @param jmIds
* @return
*/
@Override
public int deleteSzxcJmHouseByJmIds(Long[] jmIds)
{
return szxcJmHouseMapper.deleteSzxcJmHouseByJmIds(jmIds);
}
/**
*
*
* @param jmId
* @return
*/
@Override
public int deleteSzxcJmHouseByJmId(Long jmId)
{
return szxcJmHouseMapper.deleteSzxcJmHouseByJmId(jmId);
}
}

@ -0,0 +1,93 @@
package com.ruoyi.szxc.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.szxc.mapper.SzxcJmTagMapper;
import com.ruoyi.szxc.domain.SzxcJmTag;
import com.ruoyi.szxc.service.ISzxcJmTagService;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
@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<SzxcJmTag> 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);
}
}

@ -0,0 +1,97 @@
package com.ruoyi.szxc.service.impl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.szxc.domain.SzxcNews;
import com.ruoyi.szxc.mapper.SzxcNewsMapper;
import com.ruoyi.szxc.service.ISzxcNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author hs
* @date 2024-03-16
*/
@Service
public class SzxcNewsServiceImpl implements ISzxcNewsService
{
@Autowired
private SzxcNewsMapper szxcNewsMapper;
/**
*
*
* @param id
* @return
*/
@Override
public SzxcNews selectSzxcNewsById(Long id)
{
return szxcNewsMapper.selectSzxcNewsById(id);
}
/**
*
*
* @param szxcNews
* @return
*/
@Override
public List<SzxcNews> selectSzxcNewsList(SzxcNews szxcNews)
{
return szxcNewsMapper.selectSzxcNewsList(szxcNews);
}
/**
*
*
* @param szxcNews
* @return
*/
@Override
public int insertSzxcNews(SzxcNews szxcNews)
{
szxcNews.setCreateTime(DateUtils.getNowDate());
return szxcNewsMapper.insertSzxcNews(szxcNews);
}
/**
*
*
* @param szxcNews
* @return
*/
@Override
public int updateSzxcNews(SzxcNews szxcNews)
{
szxcNews.setUpdateTime(DateUtils.getNowDate());
return szxcNewsMapper.updateSzxcNews(szxcNews);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteSzxcNewsByIds(Long[] ids)
{
return szxcNewsMapper.deleteSzxcNewsByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteSzxcNewsById(Long id)
{
return szxcNewsMapper.deleteSzxcNewsById(id);
}
}

@ -1,7 +1,7 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcJmInfoMapper">
<resultMap type="SzxcJmInfo" id="SzxcJmInfoResult">
@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="name" column="name" />
<result property="oldName" column="old_name" />
<result property="nationality" column="nationality" />
<result property="idCard" column="id_card" />
<result property="cardId" column="card_id" />
<result property="bornDate" column="born_date" />
<result property="age" column="age" />
<result property="sex" column="sex" />
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSzxcJmInfoVo">
select id, dept_id, dept_name, name, old_name, nationality, id_card, born_date, age, sex, jg, relation, jg_nature, long_live, hj_address, phone, head, same_head_ids, off, create_by, create_time, update_by, update_time, user_id from szxc_jm_info
select id, dept_id, dept_name, name, old_name, nationality, card_id, born_date, age, sex, jg, relation, jg_nature, long_live, hj_address, phone, head, same_head_ids, off, create_by, create_time, update_by, update_time, user_id from szxc_jm_info
</sql>
<select id="selectSzxcJmInfoList" parameterType="SzxcJmInfo" resultMap="SzxcJmInfoResult">
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="oldName != null and oldName != ''"> and old_name like concat('%', #{oldName}, '%')</if>
<if test="nationality != null and nationality != ''"> and nationality = #{nationality}</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="bornDate != null "> and born_date = #{bornDate}</if>
<if test="age != null "> and age = #{age}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null">name,</if>
<if test="oldName != null">old_name,</if>
<if test="nationality != null">nationality,</if>
<if test="idCard != null">id_card,</if>
<if test="cardId != null">card_id,</if>
<if test="bornDate != null">born_date,</if>
<if test="age != null">age,</if>
<if test="sex != null">sex,</if>
@ -91,14 +91,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="userId != null">user_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="deptName != null">#{deptName},</if>
<if test="name != null">#{name},</if>
<if test="oldName != null">#{oldName},</if>
<if test="nationality != null">#{nationality},</if>
<if test="idCard != null">#{idCard},</if>
<if test="cardId != null">#{cardId},</if>
<if test="bornDate != null">#{bornDate},</if>
<if test="age != null">#{age},</if>
<if test="sex != null">#{sex},</if>
@ -116,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="userId != null">#{userId},</if>
</trim>
</trim>
</insert>
<update id="updateSzxcJmInfo" parameterType="SzxcJmInfo">
@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="name != null">name = #{name},</if>
<if test="oldName != null">old_name = #{oldName},</if>
<if test="nationality != null">nationality = #{nationality},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="cardId != null">card_id = #{cardId},</if>
<if test="bornDate != null">born_date = #{bornDate},</if>
<if test="age != null">age = #{age},</if>
<if test="sex != null">sex = #{sex},</if>

@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.szxc.mapper.NewsMapper">
<mapper namespace="com.ruoyi.szxc.mapper.SzxcNewsMapper">
<resultMap type="News" id="NewsResult">
<resultMap type="SzxcNews" id="SzxcNewsResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="type" column="type" />
@ -20,12 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="userId" column="user_id" />
</resultMap>
<sql id="selectNewsVo">
select id, title, type, picture, content, leave, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from news
<sql id="selectSzxcNewsVo">
select id, title, type, picture, content, leave, create_by, create_time, update_by, update_time, dept_id, dept_name, user_id from szxc_news
</sql>
<select id="selectNewsList" parameterType="News" resultMap="NewsResult">
<include refid="selectNewsVo"/>
<select id="selectSzxcNewsList" parameterType="SzxcNews" resultMap="SzxcNewsResult">
<include refid="selectSzxcNewsVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
@ -38,13 +38,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectNewsById" parameterType="Long" resultMap="NewsResult">
<include refid="selectNewsVo"/>
<select id="selectSzxcNewsById" parameterType="Long" resultMap="SzxcNewsResult">
<include refid="selectSzxcNewsVo"/>
where id = #{id}
</select>
<insert id="insertNews" parameterType="News" useGeneratedKeys="true" keyProperty="id">
insert into news
<insert id="insertSzxcNews" parameterType="SzxcNews" useGeneratedKeys="true" keyProperty="id">
insert into szxc_news
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="type != null">type,</if>
@ -75,8 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateNews" parameterType="News">
update news
<update id="updateSzxcNews" parameterType="SzxcNews">
update szxc_news
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="type != null">type = #{type},</if>
@ -94,12 +94,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteNewsById" parameterType="Long">
delete from news where id = #{id}
<delete id="deleteSzxcNewsById" parameterType="Long">
delete from szxc_news where id = #{id}
</delete>
<delete id="deleteNewsByIds" parameterType="String">
delete from news where id in
<delete id="deleteSzxcNewsByIds" parameterType="String">
delete from szxc_news where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -41,9 +41,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-form-item label="身份证号" prop="cardId">
<el-input
v-model="queryParams.idCard"
v-model="queryParams.cardId"
placeholder="请输入身份证号"
clearable
@keyup.enter.native="handleQuery"
@ -51,10 +51,10 @@
</el-form-item>
<el-form-item label="出生日期" prop="bornDate">
<el-date-picker clearable
v-model="queryParams.bornDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择出生日期">
v-model="queryParams.bornDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择出生日期">
</el-date-picker>
</el-form-item>
<el-form-item label="年龄" prop="age">
@ -205,14 +205,14 @@
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="曾用名" align="center" prop="oldName" />
<el-table-column label="国籍" align="center" prop="nationality" />
<el-table-column label="身份证号" align="center" prop="idCard" />
<el-table-column label="身份证号" align="center" prop="cardId" />
<el-table-column label="出生日期" align="center" prop="bornDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.bornDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="用户性别" align="center" prop="sex" />
<el-table-column label="性别" align="center" prop="sex" />
<el-table-column label="籍贯" align="center" prop="jg" />
<el-table-column label="与户主关系" align="center" prop="relation" />
<el-table-column label="籍贯性质" align="center" prop="jgNature" />
@ -269,15 +269,15 @@
<el-form-item label="国籍" prop="nationality">
<el-input v-model="form.nationality" placeholder="请输入国籍" />
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
<el-form-item label="身份证号" prop="cardId">
<el-input v-model="form.cardId" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="出生日期" prop="bornDate">
<el-date-picker clearable
v-model="form.bornDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择出生日期">
v-model="form.bornDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择出生日期">
</el-date-picker>
</el-form-item>
<el-form-item label="年龄" prop="age">
@ -323,186 +323,186 @@
</template>
<script>
import { listJminfo, getJminfo, delJminfo, addJminfo, updateJminfo } from "@/api/szxc/jminfo";
import { listJminfo, getJminfo, delJminfo, addJminfo, updateJminfo } from "@/api/szxc/jminfo";
export default {
name: "Jminfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
jminfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
deptName: null,
name: null,
oldName: null,
nationality: null,
idCard: null,
bornDate: null,
age: null,
sex: null,
jg: null,
relation: null,
jgNature: null,
longLive: null,
hjAddress: null,
phone: null,
head: null,
sameHeadIds: null,
off: null,
userId: null
},
//
form: {},
//
rules: {
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
head: [
{ required: true, message: "是否户主 0:户主 1:非户主不能为空", trigger: "blur" }
],
off: [
{ required: true, message: "是否注销 0:正常 1:注销不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询居民信息列表 */
getList() {
this.loading = true;
listJminfo(this.queryParams).then(response => {
this.jminfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
deptName: null,
name: null,
oldName: null,
nationality: null,
idCard: null,
bornDate: null,
age: null,
sex: null,
jg: null,
relation: null,
jgNature: null,
longLive: null,
hjAddress: null,
phone: null,
head: null,
sameHeadIds: null,
off: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
userId: null
export default {
name: "Jminfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
jminfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
deptName: null,
name: null,
oldName: null,
nationality: null,
cardId: null,
bornDate: null,
age: null,
sex: null,
jg: null,
relation: null,
jgNature: null,
longLive: null,
hjAddress: null,
phone: null,
head: null,
sameHeadIds: null,
off: null,
userId: null
},
//
form: {},
//
rules: {
deptId: [
{ required: true, message: "部门id不能为空", trigger: "blur" }
],
head: [
{ required: true, message: "是否户主 0:户主 1:非户主不能为空", trigger: "blur" }
],
off: [
{ required: true, message: "是否注销 0:正常 1:注销不能为空", trigger: "blur" }
],
}
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
created() {
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
getJminfo(id).then(response => {
this.form = response.data;
methods: {
/** 查询居民信息列表 */
getList() {
this.loading = true;
listJminfo(this.queryParams).then(response => {
this.jminfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
deptId: null,
deptName: null,
name: null,
oldName: null,
nationality: null,
cardId: null,
bornDate: null,
age: null,
sex: null,
jg: null,
relation: null,
jgNature: null,
longLive: null,
hjAddress: null,
phone: null,
head: null,
sameHeadIds: null,
off: 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 = "修改居民信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateJminfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJminfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.title = "添加居民信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getJminfo(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) {
updateJminfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJminfo(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 delJminfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/jminfo/export', {
...this.queryParams
}, `jminfo_${new Date().getTime()}.xlsx`)
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除居民信息编号为"' + ids + '"的数据项?').then(function() {
return delJminfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('szxc/jminfo/export', {
...this.queryParams
}, `jminfo_${new Date().getTime()}.xlsx`)
}
}
}
};
};
</script>

Loading…
Cancel
Save