From f3c2d24a4e3ef57f212e6a011fc38cba953de1f9 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 22 Jun 2022 18:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=8C?= =?UTF-8?q?=E7=BC=96=E5=86=99=E5=AD=98=E5=82=A8caResidentUser=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=BC=96?= =?UTF-8?q?=E5=86=99feignClient=EF=BC=8C=E5=AE=8C=E5=96=84=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=BD=91=E6=A0=BC=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/ca/CaResidentUserDTO.java | 64 ++++++++++++ .../dto/form/SaveCaResidentUserFormDTO.java | 57 +++++++++++ .../feign/GuardarDatosFeignClient.java | 5 + .../impl/GuardarDatosFeignClientFallBack.java | 6 ++ .../controller/CaResidentUserController.java | 88 +++++++++++++++++ .../epmet/opendata/dao/CaResidentUserDao.java | 21 ++++ .../opendata/entity/CaResidentUserEntity.java | 42 ++++++++ .../opendata/excel/CaResidentUserExcel.java | 45 +++++++++ .../opendata/redis/CaResidentUserRedis.java | 30 ++++++ .../service/CaResidentUserService.java | 82 +++++++++++++++ .../impl/CaResidentUserServiceImpl.java | 99 +++++++++++++++++++ .../resources/mapper/CaResidentUserDao.xml | 8 ++ .../service/impl/IcResiUserServiceImpl.java | 16 ++- .../main/resources/mapper/IcResiUserDao.xml | 2 + 14 files changed, 560 insertions(+), 5 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentUserDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/SaveCaResidentUserFormDTO.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentUserController.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentUserDao.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentUserEntity.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentUserExcel.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentUserRedis.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentUserService.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentUserServiceImpl.java create mode 100644 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentUserDao.xml diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentUserDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentUserDTO.java new file mode 100644 index 0000000000..d117f7f783 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/ca/CaResidentUserDTO.java @@ -0,0 +1,64 @@ +package com.epmet.opendata.dto.ca; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Data +public class CaResidentUserDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 身份证号 + */ + private String idCard; + + /** + * ic_resi_user表id + */ + private String icResiUserId; + + /** + * 绑定的房屋id + */ + private String homeId; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 最后修改人 + */ + private Long updateBy; + + /** + * 最后修改时间 + */ + private Date updateDate; + + /** + * 删除标记,normal + */ + private String deleteFlag; + + /** + * 乐观锁 + */ + private Integer versions; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/SaveCaResidentUserFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/SaveCaResidentUserFormDTO.java new file mode 100644 index 0000000000..a155e5cab3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/SaveCaResidentUserFormDTO.java @@ -0,0 +1,57 @@ +package com.epmet.opendata.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class SaveCaResidentUserFormDTO implements Serializable { + + private static final long serialVersionUID = -182571137927356144L; + + /** + * 身份证号 + */ + private String idCard; + + /** + * ic_resi_user表id + */ + private String icResiUserId; + + /** + * 房屋id + */ + private String homeId; + + /** + * 创建人 + */ + private Long createdBy; + + /** + * 创建时间 + */ + private Date createdDate; + + /** + * 最后修改人 + */ + private Long updatedBy; + + /** + * 最后修改时间 + */ + private Date updatedDate; + + /** + * 删除标记 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer versions; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java index 7d329d1c2e..caab7744b4 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/GuardarDatosFeignClient.java @@ -3,10 +3,12 @@ package com.epmet.opendata.feign; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dto.form.GetResidentDetailByIdCardFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO; import com.epmet.opendata.feign.impl.GuardarDatosFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; @FeignClient(name = "open-data-worker-server", fallback = GuardarDatosFeignClientFallBack.class) public interface GuardarDatosFeignClient { @@ -16,4 +18,7 @@ public interface GuardarDatosFeignClient { @PostMapping("/opendata/caResident/getResidentDetailByIdCard") Result getResidentDetailByIdCard(GetResidentDetailByIdCardFormDTO form); + + @PostMapping("/opendata/caResidentUser/saveCaResidentUser") + Result saveCaResidentUser(@RequestBody SaveCaResidentUserFormDTO dto); } diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java index c4c974efc3..b8199a96b9 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/feign/impl/GuardarDatosFeignClientFallBack.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.opendata.dto.form.GetResidentDetailByIdCardFormDTO; import com.epmet.opendata.dto.form.PreserVationFormDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO; import com.epmet.opendata.feign.GuardarDatosFeignClient; import org.springframework.stereotype.Component; @@ -21,4 +22,9 @@ public class GuardarDatosFeignClientFallBack implements GuardarDatosFeignClient return ModuleUtils.feignConError("open-data-worker", "guardarDatosTask", form); } + @Override + public Result saveCaResidentUser(SaveCaResidentUserFormDTO dto) { + return ModuleUtils.feignConError("open-data-worker", "saveCaResidentUser", dto); + } + } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentUserController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentUserController.java new file mode 100644 index 0000000000..7cda2a538e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaResidentUserController.java @@ -0,0 +1,88 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; + +import com.epmet.opendata.dto.ca.CaResidentUserDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; +import com.epmet.opendata.excel.CaResidentUserExcel; +import com.epmet.opendata.service.CaResidentUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@RestController +@RequestMapping("caResidentUser") +public class CaResidentUserController { + + @Autowired + private CaResidentUserService caResidentUserService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = caResidentUserService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + CaResidentUserDTO data = caResidentUserService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody CaResidentUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + caResidentUserService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody CaResidentUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + caResidentUserService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + caResidentUserService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = caResidentUserService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CaResidentUserExcel.class); + } + + @PostMapping("saveCaResidentUser") + public Result saveCaResidentUser(@RequestBody SaveCaResidentUserFormDTO dto){ + caResidentUserService.saveCaResidentUser(dto); + return new Result(); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentUserDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentUserDao.java new file mode 100644 index 0000000000..a80b654b82 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentUserDao.java @@ -0,0 +1,21 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; + +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; +import com.epmet.opendata.entity.CaResidentUserEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Mapper +public interface CaResidentUserDao extends BaseDao { + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentUserEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentUserEntity.java new file mode 100644 index 0000000000..566d3f046f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/CaResidentUserEntity.java @@ -0,0 +1,42 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEntity; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ca_resident_user") +public class CaResidentUserEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 身份证号 + */ + private String idCard; + + /** + * ic_resi_user表id + */ + private String icResiUserId; + + /** + * 绑定的房屋id + */ + private String homeId; + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentUserExcel.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentUserExcel.java new file mode 100644 index 0000000000..d20ef54f7e --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/excel/CaResidentUserExcel.java @@ -0,0 +1,45 @@ +package com.epmet.opendata.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Data +public class CaResidentUserExcel { + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "ic_resi_user表id") + private String icResiUserId; + + @Excel(name = "绑定的房屋id") + private String homeId; + + @Excel(name = "创建人") + private Long createBy; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "最后修改人") + private Long updateBy; + + @Excel(name = "最后修改时间") + private Date updateDate; + + @Excel(name = "删除标记,normal") + private String deleteFlag; + + @Excel(name = "乐观锁") + private Integer versions; + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentUserRedis.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentUserRedis.java new file mode 100644 index 0000000000..17145e5f5f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/redis/CaResidentUserRedis.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Component +public class CaResidentUserRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentUserService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentUserService.java new file mode 100644 index 0000000000..00795d3387 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaResidentUserService.java @@ -0,0 +1,82 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.opendata.dto.ca.CaResidentUserDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; +import com.epmet.opendata.entity.CaResidentUserEntity; + + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +public interface CaResidentUserService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-22 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-22 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CaResidentUserDTO + * @author generator + * @date 2022-06-22 + */ + CaResidentUserDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-22 + */ + void save(CaResidentUserDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-22 + */ + void update(CaResidentUserDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-22 + */ + void delete(String[] ids); + + void saveCaResidentUser(SaveCaResidentUserFormDTO dto); +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentUserServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentUserServiceImpl.java new file mode 100644 index 0000000000..0fd2f6016d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentUserServiceImpl.java @@ -0,0 +1,99 @@ +package com.epmet.opendata.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; + +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.opendata.dao.CaResidentUserDao; +import com.epmet.opendata.dto.ca.CaResidentUserDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; +import com.epmet.opendata.entity.CaResidentEntity; +import com.epmet.opendata.entity.CaResidentUserEntity; +import com.epmet.opendata.redis.CaResidentUserRedis; +import com.epmet.opendata.service.CaResidentUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-22 + */ +@Service +public class CaResidentUserServiceImpl extends BaseServiceImpl implements CaResidentUserService { + + @Autowired + private CaResidentUserRedis caResidentUserRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CaResidentUserDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CaResidentUserDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public CaResidentUserDTO get(String id) { + CaResidentUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CaResidentUserDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CaResidentUserDTO dto) { + CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentUserEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CaResidentUserDTO dto) { + CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentUserEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void saveCaResidentUser(SaveCaResidentUserFormDTO dto) { + CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto,CaResidentUserEntity.class); + insert(entity); + } + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentUserDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentUserDao.xml new file mode 100644 index 0000000000..4cbc139aa5 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentUserDao.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 361329c76f..717d96893f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -59,6 +59,7 @@ import com.epmet.entity.*; import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.*; import com.epmet.opendata.dto.form.GetResidentDetailByIdCardFormDTO; +import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO; import com.epmet.opendata.feign.GuardarDatosFeignClient; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; @@ -142,12 +143,13 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getWrapper(Map params) { String id = (String) params.get(FieldConstant.ID_HUMP); String idCard = (String) params.get("idCard"); @@ -2283,7 +2285,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl result = feignClient.getResidentDetailByIdCard(dto); + Result result = guardarDatosFeignClient.getResidentDetailByIdCard(dto); ResidentByIdCardResultDTO residentDetailByIdCard = result.getData(); if (org.springframework.util.StringUtils.isEmpty(residentDetailByIdCard)) { throw new RenException("获取不到人的信息"); @@ -2335,15 +2337,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl 0) { String id = baseDao.seletIdByIdCard(entity.getCustomerId(),entity.getIdCard()); baseDao.updateByIdCard(entity); - + saveForm.setIcResiUserId(id); + guardarDatosFeignClient.saveCaResidentUser(saveForm); } else { baseDao.insert(entity); String id = baseDao.seletIdByIdCard(entity.getCustomerId(),entity.getIdCard()); - + saveForm.setIcResiUserId(id); + guardarDatosFeignClient.saveCaResidentUser(saveForm); } } 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 884d5994fe..0cb5bce424 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 @@ -222,6 +222,8 @@ village_id = #{entity.villageId}, build_id = #{entity.buildId}, unit_id = #{entity.unitId}, + pids = #{entity.pids}, + grid_id = #{entity.gridId}, updated_time = now() where id_card = #{entity.idCard}