forked from rongchao/epmet-cloud-rizhao
26 changed files with 1721 additions and 156 deletions
@ -0,0 +1,28 @@ |
|||
package com.epmet.commons.tools.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yzm |
|||
* @Date 2022/9/26 17:04 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class YtDataSyncResDTO { |
|||
private int code = 200; |
|||
private String msg = "请求成功"; |
|||
/** |
|||
* 响应数据 |
|||
*/ |
|||
private String data; |
|||
private int total; |
|||
|
|||
public YtDataSyncResDTO(int code, String msg, String data) { |
|||
this.code = code; |
|||
this.msg = msg; |
|||
this.data = data; |
|||
} |
|||
} |
|||
@ -0,0 +1,145 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 数据同步记录-居民死亡信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Data |
|||
public class DataSyncRecordDeathDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织的pids 含agencyId本身 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 居民Id,ic_resi_user.id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 年龄(享年) |
|||
*/ |
|||
private Integer age; |
|||
|
|||
/** |
|||
* 家庭住址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 死亡时间 |
|||
*/ |
|||
private String deathDate; |
|||
|
|||
/** |
|||
* 火化时间 |
|||
*/ |
|||
private String cremationTime; |
|||
|
|||
/** |
|||
* 民族 |
|||
*/ |
|||
private String mz; |
|||
|
|||
/** |
|||
* 登记单位名称 |
|||
*/ |
|||
private String organName; |
|||
|
|||
/** |
|||
* 国籍 |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 第三方记录唯一标识 |
|||
*/ |
|||
private String thirdRecordId; |
|||
|
|||
/** |
|||
* 处理状态(更新至居民信息) 0:未处理;1:处理成功;2处理失败 |
|||
*/ |
|||
private Integer dealStatus; |
|||
|
|||
/** |
|||
* 处理结果 |
|||
*/ |
|||
private String dealRedult; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,145 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 数据同步记录-居民残疾信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Data |
|||
public class DataSyncRecordDisabilityDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织的pids 含agencyId本身 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 居民Id,ic_resi_user.id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 残疾证号 |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 残疾等级(状况) |
|||
*/ |
|||
private String cjzk; |
|||
|
|||
/** |
|||
* 残疾类别 |
|||
*/ |
|||
private String cjlb; |
|||
|
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String eduLevel; |
|||
|
|||
/** |
|||
* 婚姻状况 |
|||
*/ |
|||
private String maritalStatus; |
|||
|
|||
/** |
|||
* 监护人 |
|||
*/ |
|||
private String guardian; |
|||
|
|||
/** |
|||
* 监护人联系方式 |
|||
*/ |
|||
private String guardianPhone; |
|||
|
|||
/** |
|||
* 处理状态(更新至居民信息) 0:未处理;1:处理成功;2处理失败 |
|||
*/ |
|||
private Integer dealStatus; |
|||
|
|||
/** |
|||
* 残疾状态 0:非残疾;1:残疾 |
|||
*/ |
|||
private Integer disabilityStatus; |
|||
|
|||
/** |
|||
* 处理结果 |
|||
*/ |
|||
private String dealRedult; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.DataSyncScopeDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/26 17:04 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class DataSyncTaskParam implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3053943501957102943L; |
|||
|
|||
private String customerId; |
|||
|
|||
private List<String> idCards; |
|||
|
|||
// ========================后台设置=====
|
|||
/** |
|||
* 根据配置 设置次参数;数据查询范围 必填 |
|||
*/ |
|||
private List<DataSyncScopeDTO> orgList; |
|||
|
|||
/** |
|||
* 居民状态【0:正常;1:迁出;2:注销】 |
|||
*/ |
|||
private String resiStatus; |
|||
/** |
|||
* 居民子状态 01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡 |
|||
*/ |
|||
private String resiSubStatus; |
|||
|
|||
/** |
|||
* 类别字段 |
|||
*/ |
|||
public String categoryColumn; |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/9/26 17:04 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class NatInfoScanTaskFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3053943501957102943L; |
|||
|
|||
private String customerId; |
|||
|
|||
private List<String> idCards; |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
package com.epmet.dto.form.dataSync; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.dto.DataSyncScopeDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* desc:查询数据同步 所需要的居民信息参数 |
|||
* @author liujianjun |
|||
*/ |
|||
@Data |
|||
public class QueryIcResiUserFormDTO extends PageFormDTO { |
|||
private static final long serialVersionUID = -3556723801307348545L; |
|||
/** |
|||
* 数据查询范围 必填 |
|||
*/ |
|||
private List<DataSyncScopeDTO> scopeList; |
|||
/** |
|||
* 必填 |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 身份证号集合 非必填 |
|||
*/ |
|||
private List<String> idCards; |
|||
|
|||
/** |
|||
* 居民状态【0:正常;1:迁出;2:注销】 |
|||
*/ |
|||
private String resiStatus; |
|||
/** |
|||
* 居民子状态 01:新增、02:导入、03:迁入、04:新生、11:迁出、21死亡 |
|||
*/ |
|||
private String resiSubStatus; |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.DataSyncRecordDeathEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 数据同步记录-居民死亡信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Mapper |
|||
public interface DataSyncRecordDeathDao extends BaseDao<DataSyncRecordDeathEntity> { |
|||
|
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.DataSyncRecordDisabilityEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 数据同步记录-居民残疾信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Mapper |
|||
public interface DataSyncRecordDisabilityDao extends BaseDao<DataSyncRecordDisabilityEntity> { |
|||
|
|||
//int upsertBatch(List<DataSyncRecordDisabilityEntity> list);
|
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 数据同步记录-居民死亡信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("data_sync_record_death") |
|||
public class DataSyncRecordDeathEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织的pids 含agencyId本身 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 居民Id,ic_resi_user.id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 年龄(享年) |
|||
*/ |
|||
private Integer age; |
|||
|
|||
/** |
|||
* 家庭住址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 死亡时间 |
|||
*/ |
|||
private String deathDate; |
|||
|
|||
/** |
|||
* 火化时间 |
|||
*/ |
|||
private String cremationTime; |
|||
|
|||
/** |
|||
* 民族 |
|||
*/ |
|||
private String mz; |
|||
|
|||
/** |
|||
* 登记单位名称 |
|||
*/ |
|||
private String organName; |
|||
|
|||
/** |
|||
* 国籍 |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 第三方记录唯一标识 |
|||
*/ |
|||
private String thirdRecordId; |
|||
|
|||
/** |
|||
* 处理状态(更新至居民信息) 0:未处理;1:处理成功;2处理失败 |
|||
*/ |
|||
private Integer dealStatus; |
|||
|
|||
/** |
|||
* 处理结果 |
|||
*/ |
|||
private String dealRedult; |
|||
|
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 数据同步记录-居民残疾信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("data_sync_record_disability") |
|||
public class DataSyncRecordDisabilityEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织的pids 含agencyId本身 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 居民Id,ic_resi_user.id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 残疾证号 |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 残疾等级(状况) |
|||
*/ |
|||
private String cjzk; |
|||
|
|||
/** |
|||
* 残疾类别 |
|||
*/ |
|||
private String cjlb; |
|||
|
|||
/** |
|||
* 文化程度 |
|||
*/ |
|||
private String eduLevel; |
|||
|
|||
/** |
|||
* 婚姻状况 |
|||
*/ |
|||
private String maritalStatus; |
|||
|
|||
/** |
|||
* 监护人 |
|||
*/ |
|||
private String guardian; |
|||
|
|||
/** |
|||
* 监护人联系方式 |
|||
*/ |
|||
private String guardianPhone; |
|||
|
|||
/** |
|||
* 处理状态(更新至居民信息) 0:未处理;1:处理成功;2处理失败 |
|||
*/ |
|||
private Integer dealStatus; |
|||
|
|||
/** |
|||
* 需要处理的残疾状态 0:非残疾;1:残疾 |
|||
*/ |
|||
private Integer disabilityStatus; |
|||
|
|||
/** |
|||
* 处理结果 |
|||
*/ |
|||
private String dealRedult; |
|||
|
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.DataSyncRecordDeathDTO; |
|||
import com.epmet.entity.DataSyncRecordDeathEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 数据同步记录-居民死亡信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
public interface DataSyncRecordDeathService extends BaseService<DataSyncRecordDeathEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DataSyncRecordDeathDTO> |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
PageData<DataSyncRecordDeathDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DataSyncRecordDeathDTO> |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
List<DataSyncRecordDeathDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DataSyncRecordDeathDTO |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
DataSyncRecordDeathDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void save(DataSyncRecordDeathDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void update(DataSyncRecordDeathDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
|||
@ -0,0 +1,81 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.DataSyncRecordDisabilityDTO; |
|||
import com.epmet.entity.DataSyncRecordDisabilityEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 数据同步记录-居民残疾信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
public interface DataSyncRecordDisabilityService extends BaseService<DataSyncRecordDisabilityEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DataSyncRecordDisabilityDTO> |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
PageData<DataSyncRecordDisabilityDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DataSyncRecordDisabilityDTO> |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
List<DataSyncRecordDisabilityDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DataSyncRecordDisabilityDTO |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
DataSyncRecordDisabilityDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void save(DataSyncRecordDisabilityDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void update(DataSyncRecordDisabilityDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-11 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
DataSyncRecordDisabilityDTO selectOne(LambdaQueryWrapper<DataSyncRecordDisabilityEntity> queryWrapper); |
|||
} |
|||
@ -0,0 +1,87 @@ |
|||
package com.epmet.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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.DataSyncRecordDeathDao; |
|||
import com.epmet.dto.DataSyncRecordDeathDTO; |
|||
import com.epmet.entity.DataSyncRecordDeathEntity; |
|||
import com.epmet.redis.DataSyncRecordDeathRedis; |
|||
import com.epmet.service.DataSyncRecordDeathService; |
|||
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.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 数据同步记录-居民死亡信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Service |
|||
public class DataSyncRecordDeathServiceImpl extends BaseServiceImpl<DataSyncRecordDeathDao, DataSyncRecordDeathEntity> implements DataSyncRecordDeathService { |
|||
|
|||
@Autowired |
|||
private DataSyncRecordDeathRedis dataSyncRecordDeathRedis; |
|||
|
|||
@Override |
|||
public PageData<DataSyncRecordDeathDTO> page(Map<String, Object> params) { |
|||
IPage<DataSyncRecordDeathEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DataSyncRecordDeathDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DataSyncRecordDeathDTO> list(Map<String, Object> params) { |
|||
List<DataSyncRecordDeathEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DataSyncRecordDeathDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DataSyncRecordDeathEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DataSyncRecordDeathEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DataSyncRecordDeathDTO get(String id) { |
|||
DataSyncRecordDeathEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DataSyncRecordDeathDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DataSyncRecordDeathDTO dto) { |
|||
DataSyncRecordDeathEntity entity = ConvertUtils.sourceToTarget(dto, DataSyncRecordDeathEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DataSyncRecordDeathDTO dto) { |
|||
DataSyncRecordDeathEntity entity = ConvertUtils.sourceToTarget(dto, DataSyncRecordDeathEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.DataSyncRecordDisabilityDao; |
|||
import com.epmet.dto.DataSyncRecordDisabilityDTO; |
|||
import com.epmet.entity.DataSyncRecordDisabilityEntity; |
|||
import com.epmet.redis.DataSyncRecordDisabilityRedis; |
|||
import com.epmet.service.DataSyncRecordDisabilityService; |
|||
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.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 数据同步记录-居民残疾信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-11 |
|||
*/ |
|||
@Service |
|||
public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyncRecordDisabilityDao, DataSyncRecordDisabilityEntity> implements DataSyncRecordDisabilityService { |
|||
|
|||
@Autowired |
|||
private DataSyncRecordDisabilityRedis dataSyncRecordDisabilityRedis; |
|||
|
|||
@Override |
|||
public PageData<DataSyncRecordDisabilityDTO> page(Map<String, Object> params) { |
|||
IPage<DataSyncRecordDisabilityEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DataSyncRecordDisabilityDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DataSyncRecordDisabilityDTO> list(Map<String, Object> params) { |
|||
List<DataSyncRecordDisabilityEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DataSyncRecordDisabilityDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DataSyncRecordDisabilityEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DataSyncRecordDisabilityEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DataSyncRecordDisabilityDTO get(String id) { |
|||
DataSyncRecordDisabilityEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DataSyncRecordDisabilityDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DataSyncRecordDisabilityDTO dto) { |
|||
DataSyncRecordDisabilityEntity entity = ConvertUtils.sourceToTarget(dto, DataSyncRecordDisabilityEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DataSyncRecordDisabilityDTO dto) { |
|||
DataSyncRecordDisabilityEntity entity = ConvertUtils.sourceToTarget(dto, DataSyncRecordDisabilityEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public DataSyncRecordDisabilityDTO selectOne(LambdaQueryWrapper<DataSyncRecordDisabilityEntity> queryWrapper) { |
|||
DataSyncRecordDisabilityEntity entity = baseDao.selectOne(queryWrapper); |
|||
return ConvertUtils.sourceToTarget(entity, DataSyncRecordDisabilityDTO.class); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
<?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"> |
|||
|
|||
<mapper namespace="com.epmet.dao.DataSyncRecordDeathDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.DataSyncRecordDeathEntity" id="dataSyncRecordDeathMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="name" column="NAME"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="icResiUserId" column="IC_RESI_USER_ID"/> |
|||
<result property="age" column="AGE"/> |
|||
<result property="address" column="ADDRESS"/> |
|||
<result property="deathDate" column="DEATH_DATE"/> |
|||
<result property="cremationTime" column="CREMATION_TIME"/> |
|||
<result property="mz" column="MZ"/> |
|||
<result property="organName" column="ORGAN_NAME"/> |
|||
<result property="nation" column="NATION"/> |
|||
<result property="thirdRecordId" column="THIRD_RECORD_ID"/> |
|||
<result property="dealStatus" column="DEAL_STATUS"/> |
|||
<result property="dealRedult" column="DEAL_REDULT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,95 @@ |
|||
<?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"> |
|||
|
|||
<mapper namespace="com.epmet.dao.DataSyncRecordDisabilityDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.DataSyncRecordDisabilityEntity" id="dataSyncRecordDisabilityMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="name" column="NAME"/> |
|||
<result property="idCard" column="ID_CARD"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="icResiUserId" column="IC_RESI_USER_ID"/> |
|||
<result property="cardNum" column="CARD_NUM"/> |
|||
<result property="cjzk" column="CJZK"/> |
|||
<result property="cjlb" column="CJLB"/> |
|||
<result property="eduLevel" column="EDU_LEVEL"/> |
|||
<result property="maritalStatus" column="MARITAL_STATUS"/> |
|||
<result property="guardian" column="GUARDIAN"/> |
|||
<result property="guardianPhone" column="GUARDIAN_PHONE"/> |
|||
<result property="dealStatus" column="DEAL_STATUS"/> |
|||
<result property="disabilityStatus" column="DISABILITY_STATUS"/> |
|||
<result property="dealRedult" column="DEAL_REDULT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
<!-- <insert id="upsertBatch">--> |
|||
<!-- INSERT into data_sync_record_disability (--> |
|||
<!-- id,--> |
|||
<!-- customer_id,--> |
|||
<!-- agency_id,--> |
|||
<!-- pids,--> |
|||
<!-- grid_id,--> |
|||
<!-- NAME,--> |
|||
<!-- id_card,--> |
|||
<!-- mobile,--> |
|||
<!-- ic_resi_user_id,--> |
|||
<!-- card_num,--> |
|||
<!-- cjzk,--> |
|||
<!-- cjlb,--> |
|||
<!-- edu_level,--> |
|||
<!-- marital_status,--> |
|||
<!-- guardian,--> |
|||
<!-- guardian_phone,--> |
|||
<!-- deal_status,--> |
|||
<!-- deal_redult,--> |
|||
<!-- del_flag,--> |
|||
<!-- revision,--> |
|||
<!-- created_by,--> |
|||
<!-- created_time,--> |
|||
<!-- updated_by,--> |
|||
<!-- updated_time) VALUES (--> |
|||
<!-- <foreach collection="list" item="item" open="(" close=")" separator=",">--> |
|||
<!-- #{item.id},--> |
|||
<!-- #{item.customer_id},--> |
|||
<!-- #{item.agency_id},--> |
|||
<!-- #{item.pids},--> |
|||
<!-- #{item.grid_id},--> |
|||
<!-- #{item.NAME},--> |
|||
<!-- #{item.id_card},--> |
|||
<!-- #{item.mobile},--> |
|||
<!-- #{item.ic_resi_user_id},--> |
|||
<!-- #{item.card_num},--> |
|||
<!-- #{item.cjzk},--> |
|||
<!-- #{item.cjlb},--> |
|||
<!-- #{item.edu_level},--> |
|||
<!-- #{item.marital_status},--> |
|||
<!-- #{item.guardian},--> |
|||
<!-- #{item.guardian_phone},--> |
|||
<!-- #{item.deal_status},--> |
|||
<!-- #{item.deal_redult},--> |
|||
<!-- #{item.del_flag},--> |
|||
<!-- #{item.revision},--> |
|||
<!-- #{item.created_by},--> |
|||
<!-- now(),--> |
|||
<!-- #{item.updated_by},--> |
|||
<!-- now()--> |
|||
|
|||
|
|||
<!-- </foreach>--> |
|||
<!-- )--> |
|||
<!-- ON DUPLICATE KEY UPDATE--> |
|||
<!-- id_card = values(idCard),--> |
|||
<!-- name = values(name),--> |
|||
<!-- sex = values(sex),--> |
|||
<!-- class = values(class)--> |
|||
<!-- </insert>--> |
|||
</mapper> |
|||
Loading…
Reference in new issue