diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java new file mode 100644 index 0000000000..18bc3cc7c8 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/MoveOutMemberFormDTO.java @@ -0,0 +1,136 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class MoveOutMemberFormDTO implements Serializable { + + private static final long serialVersionUID = 7059338517023959372L; + + /** + * 客户id + */ + private String customerId; + + /** + * 居民信息ID + */ + private String icResiUserId; + + /** + * 居民所在网格ID + */ + private String gridId; + + /** + * 迁出到网格名 迁出类型为in时必填 + */ + private String gridName; + + /** + * 迁出到小区名 迁出类型为in时必填 + */ + private String villageName; + + /** + * 迁出到楼栋名 迁出类型为in时必填 + */ + private String buildName; + + /** + * 迁出到单元名 迁出类型为in时必填 + */ + private String unitName; + + /** + * 迁出到房屋名 迁出类型为in时必填 + */ + private String homeName; + + /** + * 外迁详细地址 迁出类型为out时必填 + */ + private String xxdz; + + /** + * 迁出类型 迁出客户外out 迁出客户内in + */ + private String submitType; + + /** + * 迁出原因 + */ + private String deleteReason; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 房屋ID + */ + private String houseId; + + /** + * 名字 + */ + private String allName; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别 + */ + private String gender; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 户籍所在地 + */ + private String hjszd; + + /** + * 现居住地 + */ + private String xjzd; + + /** + * 民族 + */ + private String mz; + + /** + * 与户主关系 + */ + private String yhzgx; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java index 4b28ce6ac2..fc5e8a86e3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java @@ -11,6 +11,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.dto.form.RegisterAndBindFormDTO; import com.epmet.dto.result.HomeInfoResultDTO; import com.epmet.dto.result.HomeUserBriefResultDTO; @@ -80,15 +81,16 @@ public class MyHomeController { // return icResiUserConfirmService.editMember(dto); // } // + /** - * @describe: 删除家庭成员 - * @author wangtong - * @date 2022/6/1 16:10 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 删除家庭成员 + * @author wangtong + * @date 2022/6/1 16:10 + * @params [dto] + */ @PostMapping("delMember") - public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result delMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); dto.setSubmitType(HomeMemberOperationEnum.DELETE.getCode()); @@ -96,44 +98,43 @@ public class MyHomeController { } /** + * @return com.epmet.commons.tools.utils.Result * @describe: 新增家庭成员 * @author wangtong * @date 2022/6/1 15:50 * @params [dto] - * @return com.epmet.commons.tools.utils.Result */ @PostMapping("addMember") - public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result addMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserService.addMember(dto); } /** + * @return com.epmet.commons.tools.utils.Result * @describe: 修改家庭成员 * @author wangtong * @date 2022/6/1 15:27 * @params [dto] - * @return com.epmet.commons.tools.utils.Result */ @PostMapping("editMember") - public Result editMember(@RequestBody IcResiUserConfirmSubmitDTO dto){ + public Result editMember(@RequestBody IcResiUserConfirmSubmitDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserService.editMember(dto); } - /** - * @describe: 查询家庭成员信息 - * @author wangtong - * @date 2022/6/1 16:14 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:14 + * @params [dto] + */ @PostMapping("getMemberDetail") - public Result getMemberDetail(@RequestBody IcResiUserConfirmGetDTO dto){ + public Result getMemberDetail(@RequestBody IcResiUserConfirmGetDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); return icResiUserConfirmService.getMemberDetail(dto); @@ -161,4 +162,21 @@ public class MyHomeController { HomeInfoResultDTO result = myHomeService.getHomeInfo(tokenDto); return new Result().ok(result); } + + /** + * 【我的家庭】迁出家庭成员 + * + * @param form + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/10 11:06 + */ + @PostMapping("/moveOutMember") + public Result moveOutMember(@RequestBody MoveOutMemberFormDTO form, @LoginUser TokenDto tokenDto) { + form.setCustomerId(tokenDto.getCustomerId()); + icResiUserConfirmService.moveOutMember(form); + return new Result(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java index beb7ae9d77..03704abd4b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserConfirmDao.java @@ -15,11 +15,37 @@ import org.apache.ibatis.annotations.Param; public interface IcResiUserConfirmDao extends BaseDao { /** - * @describe: 根据icResiUserId查询 - * @author wangtong - * @date 2022/6/1 16:01 - * @params [icResiUserId] - * @return com.epmet.entity.IcResiUserConfirmEntity - */ + * @return com.epmet.entity.IcResiUserConfirmEntity + * @describe: 根据icResiUserId查询 + * @author wangtong + * @date 2022/6/1 16:01 + * @params [icResiUserId] + */ IcResiUserConfirmEntity selectByIcResiUserId(@Param("icResiUserId") String icResiUserId); + + /** + * 【我的家庭】迁出家庭成员 根据身份证号查询是否已提交 + * + * @param idCard + * @param customerId + * @param submitType + * @return int + * @author LZN + * @date 2022/6/10 11:04 + */ + int selectByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId, + @Param("submitType") String submitType); + + /** + * 【我的家庭】迁出家庭成员 先删后添 + * + * @param idCard + * @param customerId + * @param submitType + * @return void + * @author LZN + * @date 2022/6/10 11:04 + */ + void deleteByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId, + @Param("submitType") String submitType); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 73a3f48cdb..446491eb5e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.form.EpidemicPreventionFormDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.dto.form.RentTenantDataFormDTO; import com.epmet.dto.form.ResiUserQueryValueDTO; import com.epmet.dto.result.*; @@ -66,7 +67,7 @@ public interface IcResiUserDao extends BaseDao { @Param("staffOrgPath") String staffOrgPath, @Param("resultTableName") String resultTableName, @Param("keyword") String keyword, - @Param("groupByTables")Set groupByTables); + @Param("groupByTables") Set groupByTables); /** * 查询主表 @@ -132,10 +133,10 @@ public interface IcResiUserDao extends BaseDao { */ List searchByName(@Param("name") String name, @Param("columnName") String columnName, - @Param("level")String level, - @Param("id")String id, + @Param("level") String level, + @Param("id") String id, @Param("agencyId") String agencyId, - @Param("pageNo") Integer pageNo,@Param("customerId") String customerId); + @Param("pageNo") Integer pageNo, @Param("customerId") String customerId); Set selectUserDemandCode(String icResiUserId); @@ -163,11 +164,12 @@ public interface IcResiUserDao extends BaseDao { /** * desc:根据身份证号获取居民信息 + * * @param idCard * @param customerId * @return */ - IcResiUserDTO getResiUserByIdCard(@Param("idCard") String idCard,@Param("customerId") String customerId); + IcResiUserDTO getResiUserByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * @param agencyId @@ -274,7 +276,8 @@ public interface IcResiUserDao extends BaseDao { */ Map getDataAnalyseCount(@Param("customerId") String customerId, @Param("tableName") String tableName, @Param("columnList") List columnList, @Param("id") String id, @Param("level") String level); - List> getIcUserList(@Param("customerId") String customerId, @Param("columns")List columns); + + List> getIcUserList(@Param("customerId") String customerId, @Param("columns") List columns); /** * Desc: 根据房屋IDs查询房屋下是否有存在居民的 @@ -305,6 +308,7 @@ public interface IcResiUserDao extends BaseDao { /** * desc:根据维度获取居民信息表的数据[正常状态的居民] + * * @param formDTO * @return */ @@ -319,10 +323,11 @@ public interface IcResiUserDao extends BaseDao { */ List listUserIds(@Param("customerId") String customerId, @Param("gridId") String gridId); - List getAllUserIds(@Param("idCard") String idCard, @Param("customerId")String customerId); + List getAllUserIds(@Param("idCard") String idCard, @Param("customerId") String customerId); /** * 获取客户下志愿者信息 + * * @Param customerId * @Return {@link List< IcVolunteerPolyDTO>} * @Author zhaoqifeng @@ -331,11 +336,23 @@ public interface IcResiUserDao extends BaseDao { List getVolunteerList(@Param("customerId") String customerId, @Param("userId") String userId); /** - * @describe: 查询家庭成员信息 - * @author wangtong - * @date 2022/6/1 16:16 - * @params [icResiUserId] - * @return com.epmet.dto.IcResiUserConfirmDTO - */ + * @return com.epmet.dto.IcResiUserConfirmDTO + * @describe: 查询家庭成员信息 + * @author wangtong + * @date 2022/6/1 16:16 + * @params [icResiUserId] + */ IcResiUserConfirmDTO selectMemberDetail(@Param("icResiUserId") String icResiUserId); + + /** + * 【我的家庭】迁出家庭成员 查询缺失字段 + * + * @param icResiUserId + * @param customerId + * @return com.epmet.dto.form.MoveOutMemberFormDTO + * @author LZN + * @date 2022/6/10 11:03 + */ + MoveOutMemberFormDTO moveOutMember(@Param("icResiUserId") String icResiUserId, + @Param("customerId") String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java index 692b12e514..202964eca1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserConfirmService.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiUserConfirmDTO; import com.epmet.dto.form.IcResiUserConfirmGetDTO; import com.epmet.dto.form.IcResiUserConfirmSubmitDTO; +import com.epmet.dto.form.MoveOutMemberFormDTO; import com.epmet.entity.IcResiUserConfirmEntity; import java.util.List; @@ -80,39 +81,39 @@ public interface IcResiUserConfirmService extends BaseService getMemberDetail(IcResiUserConfirmGetDTO dto); /** @@ -124,4 +125,14 @@ public interface IcResiUserConfirmService extends BaseService page(Map params) { IPage page = baseDao.selectPage( @@ -175,4 +179,24 @@ public class IcResiUserConfirmServiceImpl extends BaseServiceImpl 0) { + icResiUserConfirmDao.deleteByIdCard(form.getIdCard(), form.getCustomerId(), form.getSubmitType()); + } + IcResiUserConfirmEntity entity = ConvertUtils.sourceToTarget(form, IcResiUserConfirmEntity.class); + icResiUserConfirmDao.insert(entity); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml index 4c46257dc1..30c3baca88 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserConfirmDao.xml @@ -34,11 +34,31 @@ + + delete from ic_resi_user_confirm + where + id_card = #{idCard} + AND customer_id = #{customerId} + AND CONFIRM_RESULT = '0' + AND SUBMIT_TYPE = #{submitType} + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 39a54f02b2..270a25b3ff 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -1075,5 +1075,26 @@ where DEL_FLAG='0' and id=#{icResiUserId} +