Browse Source

人口基本信息详情

master
HAHA 3 years ago
parent
commit
652d998373
  1. 13
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentDetailsFormDTO.java
  2. 14
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java
  3. 198
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/CaResidentDetailsResultDTO.java
  4. 17
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentController.java
  5. 13
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java
  6. 10
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentService.java
  7. 12
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java
  8. 18
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml

13
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;
}

14
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;
}

198
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;
}

17
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<PageData<CaResidentResultDTO>>().ok(data);
}
/**
* 人口基本信息详情
*
* @param dto
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.opendata.dto.result.CaResidentDetailsResultDTO>
* @author LZN
* @date 2022/6/2 15:17
*/
@PostMapping("getResidentDetails")
public Result<CaResidentDetailsResultDTO> getResidentDetails(@RequestBody CaResidentDetailsFormDTO dto, @LoginUser TokenDto tokenDto) {
CaResidentDetailsResultDTO result = caResidentService.getResidentDetails(dto);
return new Result<CaResidentDetailsResultDTO>().ok(result);
}
/**
* 人口基本信息调用ruoyi接口存储数据
*

13
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<CaResidentEntity> {
* @param residentName
* @return
*/
List<CaResidentResultDTO> getPage(@Param("residentName") String residentName);
List<CaResidentResultDTO> getPage(@Param("residentName") String residentName,
@Param("idCard") String idCard,
@Param("telephone") String telephone);
void deleteAll();
/**
* 人口基本信息详情
*
* @param idCard
* @return
*/
CaResidentDetailsResultDTO getResidentDetails(@Param("idCard") String idCard);
}

10
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<CaResidentEntity> {
* @param dto
*/
void preserResidentVation(PreserVationFormDTO dto);
/**
* 人口基本信息详情
*
* @param dto
* @return
*/
CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto);
}

12
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<CaResidentDao, CaResi
@Override
public PageData<CaResidentResultDTO> getPage(CaResidentFormDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaResidentResultDTO> result = baseDao.getPage(dto.getResidentName());
List<CaResidentResultDTO> result = baseDao.getPage(dto.getResidentName(),
dto.getIdCard(),
dto.getTelephone());
PageInfo<CaResidentResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}
@ -140,6 +144,12 @@ public class CaResidentServiceImpl extends BaseServiceImpl<CaResidentDao, CaResi
} while (total > (pageNo * NumConstant.FIFTY));
}
@Override
public CaResidentDetailsResultDTO getResidentDetails(CaResidentDetailsFormDTO dto) {
CaResidentDetailsResultDTO result = baseDao.getResidentDetails(dto.getIdCard());
return result;
}
enum residentEnum {
RK("unicom", "ca_resident"),

18
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml

@ -107,6 +107,24 @@
<if test="residentName != null and residentName != ''">
AND resident_name = #{residentName}
</if>
<if test="idCard != null and idCard != ''">
AND id_card = #{idCard}
</if>
<if test="telephone != null and telephone != ''">
AND telephone = #{telephone}
</if>
</where>
</select>
<select id="getResidentDetails" resultType="com.epmet.opendata.dto.result.CaResidentDetailsResultDTO">
select
*
from
ca_resident
<where>
delete_flag = 'normal'
<if test="idCard != null and idCard != ''">
AND id_card = #{idCard}
</if>
</where>
</select>

Loading…
Cancel
Save