10 changed files with 469 additions and 11 deletions
			
			
		@ -0,0 +1,134 @@ | 
				
			|||||
 | 
					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-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class IcNatCompareRecordDTO implements Serializable { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private static final long serialVersionUID = 1L; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private String customerId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 主键 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String id; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 姓名 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 真实身份证号 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String realIdCard; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 身份证 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String idCard; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 手机号 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String mobile; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 真实手机号 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String realMobile; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 是否客户下居民(0:否  1:是) | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String isResiUser; | 
				
			||||
 | 
					    private String isResiUserDesc; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 是本辖区的居民时候,ic_resi_user.id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String icResiUserId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 导入时间 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private Date importTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String staffId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人姓名 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String staffName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人员所属组织id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String agencyId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * agency_id组织的所有上级 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String pids; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 最近一次核酸时间:接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private Date latestNatTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 检测结果(0:阴性  1:阳性):接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String natResult; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private String natResultDesc; | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 检测地点:接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String natAddress; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 删除标识: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.yqfk; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.tools.dto.form.PageFormDTO; | 
				
			||||
 | 
					import lombok.Data; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * @Description | 
				
			||||
 | 
					 * @Author yzm | 
				
			||||
 | 
					 * @Date 2022/9/26 15:55 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					public class IcNatCompareRecordPageFormDTO extends PageFormDTO { | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 是否客户下居民(0:否  1:是) | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String isResiUser; | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 导入时间 yyyyMMdd | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String importTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 姓名 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 身份证 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String idCard; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 手机号 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    private String mobile; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private String customerId; | 
				
			||||
 | 
					    private String userId; | 
				
			||||
 | 
					    private String agencyId; | 
				
			||||
 | 
					} | 
				
			||||
 | 
					
 | 
				
			||||
@ -0,0 +1,48 @@ | 
				
			|||||
 | 
					package com.epmet.controller; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.tools.annotation.LoginUser; | 
				
			||||
 | 
					import com.epmet.commons.tools.annotation.MaskResponse; | 
				
			||||
 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			||||
 | 
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			||||
 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			||||
 | 
					import com.epmet.dto.IcNatCompareRecordDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.yqfk.IcNatCompareRecordPageFormDTO; | 
				
			||||
 | 
					import com.epmet.service.IcNatCompareRecordService; | 
				
			||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.RequestBody; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
				
			||||
 | 
					import org.springframework.web.bind.annotation.RestController; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 核算比对记录 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2022-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@RestController | 
				
			||||
 | 
					@RequestMapping("icNatCompareRecord") | 
				
			||||
 | 
					public class IcNatCompareRecordController { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Autowired | 
				
			||||
 | 
					    private IcNatCompareRecordService icNatCompareRecordService; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 分页查询 | 
				
			||||
 | 
					     * @param tokenDto | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @return | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    @RequestMapping("page") | 
				
			||||
 | 
					    @MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) | 
				
			||||
 | 
					    public Result<PageData<IcNatCompareRecordDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody IcNatCompareRecordPageFormDTO formDTO){ | 
				
			||||
 | 
					        formDTO.setCustomerId(tokenDto.getCustomerId()); | 
				
			||||
 | 
					        formDTO.setUserId(tokenDto.getUserId()); | 
				
			||||
 | 
					        PageData<IcNatCompareRecordDTO> page = icNatCompareRecordService.page(formDTO); | 
				
			||||
 | 
					        return new Result<PageData<IcNatCompareRecordDTO>>().ok(page); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,26 @@ | 
				
			|||||
 | 
					package com.epmet.dao; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.mybatis.dao.BaseDao; | 
				
			||||
 | 
					import com.epmet.dto.IcNatCompareRecordDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.yqfk.IcNatCompareRecordPageFormDTO; | 
				
			||||
 | 
					import com.epmet.entity.IcNatCompareRecordEntity; | 
				
			||||
 | 
					import org.apache.ibatis.annotations.Mapper; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 核算比对记录 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2022-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Mapper | 
				
			||||
 | 
					public interface IcNatCompareRecordDao extends BaseDao<IcNatCompareRecordEntity> { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 分页查询 | 
				
			||||
 | 
					     * @param formDTO | 
				
			||||
 | 
					     * @return | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    List<IcNatCompareRecordDTO> pageList(IcNatCompareRecordPageFormDTO formDTO); | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,89 @@ | 
				
			|||||
 | 
					package com.epmet.entity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.baomidou.mybatisplus.annotation.TableName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					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-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Data | 
				
			||||
 | 
					@EqualsAndHashCode(callSuper=false) | 
				
			||||
 | 
					@TableName("ic_nat_compare_record") | 
				
			||||
 | 
					public class IcNatCompareRecordEntity extends BaseEpmetEntity { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						private static final long serialVersionUID = 1L; | 
				
			||||
 | 
						private String customerId; | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 姓名 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String name; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 身份证 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String idCard; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 手机号 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String mobile; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 是否客户下居民(0:否  1:是) | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String isResiUser; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 是本辖区的居民时候,ic_resi_user.id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String icResiUserId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 导入时间 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private Date importTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String staffId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人姓名 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String staffName; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 操作人员所属组织id | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String agencyId; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
						/** | 
				
			||||
 | 
						 * agency_id组织的所有上级 | 
				
			||||
 | 
						 */ | 
				
			||||
 | 
						private String pids; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 最近一次核酸时间:接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private Date latestNatTime; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 检测结果(0:阴性  1:阳性):接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String natResult; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 检测地点:接口填入 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
						private String natAddress; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,27 @@ | 
				
			|||||
 | 
					package com.epmet.service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.mybatis.service.BaseService; | 
				
			||||
 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			||||
 | 
					import com.epmet.dto.IcNatCompareRecordDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.yqfk.IcNatCompareRecordPageFormDTO; | 
				
			||||
 | 
					import com.epmet.entity.IcNatCompareRecordEntity; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 核算比对记录 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2022-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					public interface IcNatCompareRecordService extends BaseService<IcNatCompareRecordEntity> { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    /** | 
				
			||||
 | 
					     * 默认分页 | 
				
			||||
 | 
					     * | 
				
			||||
 | 
					     * @param params | 
				
			||||
 | 
					     * @return PageData<IcNatCompareRecordDTO> | 
				
			||||
 | 
					     * @author generator | 
				
			||||
 | 
					     * @date 2022-09-26 | 
				
			||||
 | 
					     */ | 
				
			||||
 | 
					    PageData<IcNatCompareRecordDTO> page(IcNatCompareRecordPageFormDTO formDTO); | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,52 @@ | 
				
			|||||
 | 
					package com.epmet.service.impl; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			||||
 | 
					import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
				
			||||
 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			||||
 | 
					import com.epmet.commons.tools.exception.EpmetException; | 
				
			||||
 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			||||
 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			||||
 | 
					import com.epmet.dao.IcNatCompareRecordDao; | 
				
			||||
 | 
					import com.epmet.dto.IcNatCompareRecordDTO; | 
				
			||||
 | 
					import com.epmet.dto.form.yqfk.IcNatCompareRecordPageFormDTO; | 
				
			||||
 | 
					import com.epmet.entity.IcNatCompareRecordEntity; | 
				
			||||
 | 
					import com.epmet.service.IcNatCompareRecordService; | 
				
			||||
 | 
					import com.github.pagehelper.PageHelper; | 
				
			||||
 | 
					import com.github.pagehelper.PageInfo; | 
				
			||||
 | 
					import org.springframework.stereotype.Service; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					import java.util.List; | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					/** | 
				
			||||
 | 
					 * 核算比对记录 | 
				
			||||
 | 
					 * | 
				
			||||
 | 
					 * @author generator generator@elink-cn.com | 
				
			||||
 | 
					 * @since v1.0.0 2022-09-26 | 
				
			||||
 | 
					 */ | 
				
			||||
 | 
					@Service | 
				
			||||
 | 
					public class IcNatCompareRecordServiceImpl extends BaseServiceImpl<IcNatCompareRecordDao, IcNatCompareRecordEntity> implements IcNatCompareRecordService { | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    private CustomerStaffInfoCacheResult queryCurrentStaff(String customerId, String userId) { | 
				
			||||
 | 
					        CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId); | 
				
			||||
 | 
					        if (null == staffInfo) { | 
				
			||||
 | 
					            throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询工作人员缓存信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); | 
				
			||||
 | 
					        } | 
				
			||||
 | 
					        return staffInfo; | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    @Override | 
				
			||||
 | 
					    public PageData<IcNatCompareRecordDTO> page(IcNatCompareRecordPageFormDTO formDTO) { | 
				
			||||
 | 
					        //1.获取工作人员缓存信息
 | 
				
			||||
 | 
					        CustomerStaffInfoCacheResult staffInfo=queryCurrentStaff(formDTO.getCustomerId(),formDTO.getUserId()); | 
				
			||||
 | 
					        formDTO.setAgencyId(staffInfo.getAgencyId()); | 
				
			||||
 | 
					        //2.按条件查询业务数据
 | 
				
			||||
 | 
					        PageInfo<IcNatCompareRecordDTO> data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) | 
				
			||||
 | 
					                .doSelectPageInfo(() -> baseDao.pageList(formDTO)); | 
				
			||||
 | 
					        List<IcNatCompareRecordDTO> list = data.getList(); | 
				
			||||
 | 
					        return new PageData(list, data.getTotal()); | 
				
			||||
 | 
					    } | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,47 @@ | 
				
			|||||
 | 
					<?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.IcNatCompareRecordDao"> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					    <!-- 分页查询 --> | 
				
			||||
 | 
					    <select id="pageList" parameterType="com.epmet.dto.form.yqfk.IcNatCompareRecordPageFormDTO" resultType="com.epmet.dto.IcNatCompareRecordDTO"> | 
				
			||||
 | 
					        SELECT | 
				
			||||
 | 
					            C.ID, | 
				
			||||
 | 
					            c.MOBILE, | 
				
			||||
 | 
					            c.ID_CARD, | 
				
			||||
 | 
					            c.`NAME`, | 
				
			||||
 | 
					            c.LATEST_NAT_TIME, | 
				
			||||
 | 
					            c.NAT_ADDRESS, | 
				
			||||
 | 
					            c.NAT_RESULT, | 
				
			||||
 | 
					            ( CASE WHEN c.NAT_RESULT = '1' THEN '阳性' ELSE '阴性' END ) AS natResultDesc, | 
				
			||||
 | 
					            c.IS_RESI_USER, | 
				
			||||
 | 
					            ( CASE WHEN c.IS_RESI_USER = '0' THEN '否' ELSE '是' END ) AS isResiUserDesc, | 
				
			||||
 | 
					            C.MOBILE AS realMobile, | 
				
			||||
 | 
					            C.ID_CARD AS realIdCard | 
				
			||||
 | 
					        FROM | 
				
			||||
 | 
					            ic_nat_compare_record c | 
				
			||||
 | 
					        WHERE | 
				
			||||
 | 
					            c.DEL_FLAG = '0' | 
				
			||||
 | 
					          AND c.CUSTOMER_ID = #{customerId} | 
				
			||||
 | 
					        <if test='null != isResiUser and "" != isResiUser'> | 
				
			||||
 | 
					            AND c.IS_RESI_USER = #{isResiUser} | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        <if test='null != idCard and "" != idCard'> | 
				
			||||
 | 
					            AND c.ID_CARD LIKE CONCAT('%',#{idCard},'%') | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        <if test='null != mobile and "" != mobile'> | 
				
			||||
 | 
					            AND c.MOBILE LIKE CONCAT('%',#{mobile},'%') | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        <if test='null != name and "" != name'> | 
				
			||||
 | 
					            AND c.`NAME` LIKE CONCAT('%',#{name},'%') | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        <if test='null != importTime and "" != importTime'> | 
				
			||||
 | 
					            AND DATE_FORMAT( c.IMPORT_TIME, '%Y%m%d' ) = #{importTime} | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        <if test='null != agencyId and "" != agencyId'> | 
				
			||||
 | 
					            AND c.AGENCY_ID = #{agencyId} or c.pids like concat('%',#{agencyId},'%') | 
				
			||||
 | 
					        </if> | 
				
			||||
 | 
					        ORDER BY | 
				
			||||
 | 
					            C.IMPORT_TIME DESC | 
				
			||||
 | 
					    </select> | 
				
			||||
 | 
					</mapper> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue