diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java new file mode 100644 index 0000000000..b8a88b5cd5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java @@ -0,0 +1,13 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CaResidentDetailsFormDTO implements Serializable { + + private static final long serialVersionUID = 1936067831073936603L; + + private String idCard; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java index 24c57c4748..dc7972f46c 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java @@ -13,5 +13,19 @@ public class CaResidentFormDTO implements Serializable { private Integer limit; + /** + * 姓名 + */ private String residentName; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 联系方式 + */ + private String telephone; + } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java new file mode 100644 index 0000000000..20f5c86f93 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java @@ -0,0 +1,198 @@ +package com.epmet.opendata.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class CaResidentDetailsResultDTO implements Serializable { + + private static final long serialVersionUID = -7745222285619853846L; + + /** + * 人口ID + */ + private Long residentId; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 人口性质 + */ + private String residentProperty; + + /** + * 居民分类 + */ + private String residentType; + + /** + * 证件类型 + */ + private String idType; + + /** + * 证件号码(公民身份证号) + */ + private String idCard; + + /** + * 姓名 + */ + private String residentName; + + /** + * 性别 + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 联系方式 + */ + private String telephone; + + /** + * 户籍省 + */ + private String householdProv; + + /** + * 户籍市 + */ + private String householdCity; + + /** + * 户籍县(区) + */ + private String householdCounty; + + /** + * 户籍镇街 + */ + private String householdTown; + + /** + * 户籍社区/村 + */ + private String householdVillage; + + /** + * 户籍详址 + */ + private String householdAddressDetail; + + /** + * 现住省 + */ + private String curliveProv; + + /** + * 现住市 + */ + private String curliveCity; + + /** + * 现住县(区) + */ + private String curliveCounty; + + /** + * 现住镇街 + */ + private String curliveTown; + + /** + * 现住社区/村 + */ + private String curliveVillage; + + /** + * 现住详址 + */ + private String curliveAddressDetail; + + /** + * 籍贯省 + */ + private String nativeAddressProv; + + /** + * 籍贯市 + */ + private String nativeAddressCity; + + /** + * 籍贯县(区) + */ + private String nativeAddressCounty; + + /** + * 曾用名 + */ + private String formerName; + + /** + * 学历 + */ + private String education; + + /** + * 职业 + */ + private String occupation; + + /** + * 职业类别 + */ + private String occupationType; + + /** + * 服务处所 + */ + private String serviceAddress; + + /** + * 婚姻状况 + */ + private String marriageStatus; + + /** + * 政治面貌 + */ + private String party; + + /** + * 宗教信仰 + */ + private String religious; + + /** + * 有无皈依(已受洗) + */ + private String conversionState; + + /** + * 国籍 + */ + private String nationality; + + /** + * 数据来源 + */ + private String platCode; + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java index b3a8c1fc2b..4ebd4138e7 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java @@ -13,9 +13,11 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.opendata.dto.CaResidentDTO; import com.epmet.opendata.dto.form.CaLoudongFormDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.excel.CaResidentExcel; import com.epmet.opendata.service.CaResidentService; @@ -99,6 +101,21 @@ public class CaResidentController { return new Result>().ok(data); } + /** + * 人口基本信息详情 + * + * @param dto + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @author LZN + * @date 2022/6/2 15:17 + */ + @PostMapping("getResidentDetails") + public Result getResidentDetails(@RequestBody CaResidentDetailsFormDTO dto, @LoginUser TokenDto tokenDto) { + CaResidentDetailsResultDTO result = caResidentService.getResidentDetails(dto); + return new Result().ok(result); + } + /** * 人口基本信息调用ruoyi接口存储数据 * diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java index fbff708430..8838273b8f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java @@ -2,6 +2,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; import org.apache.ibatis.annotations.Mapper; @@ -24,7 +25,17 @@ public interface CaResidentDao extends BaseDao { * @param residentName * @return */ - List getPage(@Param("residentName") String residentName); + List getPage(@Param("residentName") String residentName, + @Param("idCard") String idCard, + @Param("telephone") String telephone); void deleteAll(); + + /** + * 人口基本信息详情 + * + * @param idCard + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(@Param("idCard") String idCard); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java index 334df1771c..e3bb6c6db9 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java @@ -3,8 +3,10 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaResidentEntity; @@ -94,4 +96,12 @@ public interface CaResidentService extends BaseService { * @param dto */ void preserResidentVation(PreserVationFormDTO dto); + + /** + * 人口基本信息详情 + * + * @param dto + * @return + */ + CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java index 32c7fa2593..e92a47b03f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java @@ -15,9 +15,11 @@ import com.epmet.dto.IcResiUserDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.CaResidentDao; import com.epmet.opendata.dto.CaResidentDTO; +import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; import com.epmet.opendata.dto.form.CaResidentFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO; +import com.epmet.opendata.dto.result.CaResidentDetailsResultDTO; import com.epmet.opendata.dto.result.CaResidentResultDTO; import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaResidentEntity; @@ -104,7 +106,9 @@ public class CaResidentServiceImpl extends BaseServiceImpl getPage(CaResidentFormDTO dto) { PageHelper.startPage(dto.getPage(), dto.getLimit()); - List result = baseDao.getPage(dto.getResidentName()); + List result = baseDao.getPage(dto.getResidentName(), + dto.getIdCard(), + dto.getTelephone()); PageInfo info = new PageInfo<>(result); return new PageData<>(result, info.getTotal()); } @@ -140,6 +144,12 @@ public class CaResidentServiceImpl extends BaseServiceImpl (pageNo * NumConstant.FIFTY)); } + @Override + public CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto) { + CaResidentDetailsResultDTO result = baseDao.getResidentDetails(dto.getIdCard()); + return result; + } + enum residentEnum { RK("unicom", "ca_resident"), diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml index a9f0d436cc..9c207100eb 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml @@ -107,6 +107,24 @@ AND resident_name = #{residentName} + + AND id_card = #{idCard} + + + AND telephone = #{telephone} + + + +