feat: 添加信贷客户家庭关系Mapper、Service接口
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.ccdi.domain.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.ruoyi.common.annotation.DictDropdown;
|
||||
import com.ruoyi.common.annotation.Required;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 信贷客户家庭关系Excel导入导出对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-11
|
||||
*/
|
||||
@Data
|
||||
public class CcdiCustFmyRelationExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 信贷客户身份证号 */
|
||||
@ExcelProperty(value = "信贷客户身份证号*", index = 0)
|
||||
@ColumnWidth(20)
|
||||
@Required
|
||||
private String personId;
|
||||
|
||||
/** 关系类型 */
|
||||
@ExcelProperty(value = "关系类型*", index = 1)
|
||||
@ColumnWidth(15)
|
||||
@DictDropdown(dictType = "ccdi_relation_type")
|
||||
@Required
|
||||
private String relationType;
|
||||
|
||||
/** 关系人姓名 */
|
||||
@ExcelProperty(value = "关系人姓名*", index = 2)
|
||||
@ColumnWidth(15)
|
||||
@Required
|
||||
private String relationName;
|
||||
|
||||
/** 性别 */
|
||||
@ExcelProperty(value = "性别", index = 3)
|
||||
@ColumnWidth(10)
|
||||
@DictDropdown(dictType = "ccdi_indiv_gender")
|
||||
private String gender;
|
||||
|
||||
/** 出生日期 */
|
||||
@ExcelProperty(value = "出生日期", index = 4)
|
||||
@ColumnWidth(15)
|
||||
private Date birthDate;
|
||||
|
||||
/** 关系人证件类型 */
|
||||
@ExcelProperty(value = "关系人证件类型*", index = 5)
|
||||
@ColumnWidth(15)
|
||||
@DictDropdown(dictType = "ccdi_certificate_type")
|
||||
@Required
|
||||
private String relationCertType;
|
||||
|
||||
/** 关系人证件号码 */
|
||||
@ExcelProperty(value = "关系人证件号码*", index = 6)
|
||||
@ColumnWidth(20)
|
||||
@Required
|
||||
private String relationCertNo;
|
||||
|
||||
/** 手机号码1 */
|
||||
@ExcelProperty(value = "手机号码1", index = 7)
|
||||
@ColumnWidth(15)
|
||||
private String mobilePhone1;
|
||||
|
||||
/** 手机号码2 */
|
||||
@ExcelProperty(value = "手机号码2", index = 8)
|
||||
@ColumnWidth(15)
|
||||
private String mobilePhone2;
|
||||
|
||||
/** 微信名称1 */
|
||||
@ExcelProperty(value = "微信名称1", index = 9)
|
||||
@ColumnWidth(15)
|
||||
private String wechatNo1;
|
||||
|
||||
/** 微信名称2 */
|
||||
@ExcelProperty(value = "微信名称2", index = 10)
|
||||
@ColumnWidth(15)
|
||||
private String wechatNo2;
|
||||
|
||||
/** 微信名称3 */
|
||||
@ExcelProperty(value = "微信名称3", index = 11)
|
||||
@ColumnWidth(15)
|
||||
private String wechatNo3;
|
||||
|
||||
/** 详细联系地址 */
|
||||
@ExcelProperty(value = "详细联系地址", index = 12)
|
||||
@ColumnWidth(30)
|
||||
private String contactAddress;
|
||||
|
||||
/** 关系详细描述 */
|
||||
@ExcelProperty(value = "关系详细描述", index = 13)
|
||||
@ColumnWidth(30)
|
||||
private String relationDesc;
|
||||
|
||||
/** 生效日期 */
|
||||
@ExcelProperty(value = "生效日期", index = 14)
|
||||
@ColumnWidth(15)
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 失效日期 */
|
||||
@ExcelProperty(value = "失效日期", index = 15)
|
||||
@ColumnWidth(15)
|
||||
private Date invalidDate;
|
||||
|
||||
/** 备注 */
|
||||
@ExcelProperty(value = "备注", index = 16)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.ccdi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiCustFmyRelation;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationQueryDTO;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiCustFmyRelationVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 信贷客户家庭关系Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-11
|
||||
*/
|
||||
public interface CcdiCustFmyRelationMapper extends BaseMapper<CcdiCustFmyRelation> {
|
||||
|
||||
/**
|
||||
* 分页查询信贷客户家庭关系
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param query 查询条件
|
||||
* @return 信贷客户家庭关系VO列表
|
||||
*/
|
||||
Page<CcdiCustFmyRelationVO> selectRelationPage(Page<CcdiCustFmyRelationVO> page,
|
||||
@Param("query") CcdiCustFmyRelationQueryDTO query);
|
||||
|
||||
/**
|
||||
* 根据ID查询信贷客户家庭关系详情
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 信贷客户家庭关系VO
|
||||
*/
|
||||
CcdiCustFmyRelationVO selectRelationById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 查询已存在的关系记录(用于导入校验)
|
||||
*
|
||||
* @param personId 信贷客户身份证号
|
||||
* @param relationType 关系类型
|
||||
* @param relationCertNo 关系人证件号码
|
||||
* @return 已存在的关系记录
|
||||
*/
|
||||
CcdiCustFmyRelation selectExistingRelations(@Param("personId") String personId,
|
||||
@Param("relationType") String relationType,
|
||||
@Param("relationCertNo") String relationCertNo);
|
||||
|
||||
/**
|
||||
* 批量插入信贷客户家庭关系
|
||||
*
|
||||
* @param relations 信贷客户家庭关系列表
|
||||
* @return 插入条数
|
||||
*/
|
||||
int insertBatch(@Param("relations") List<CcdiCustFmyRelation> relations);
|
||||
|
||||
/**
|
||||
* 根据证件号码查询关系数量
|
||||
*
|
||||
* @param relationCertNo 关系人证件号码
|
||||
* @return 关系数量
|
||||
*/
|
||||
int countByCertNo(@Param("relationCertNo") String relationCertNo);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.ccdi.service;
|
||||
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiCustFmyRelationExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CustFmyRelationImportFailureVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 信贷客户家庭关系导入Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-11
|
||||
*/
|
||||
public interface ICcdiCustFmyRelationImportService {
|
||||
|
||||
/**
|
||||
* 异步导入信贷客户家庭关系
|
||||
*
|
||||
* @param excels Excel数据列表
|
||||
* @param taskId 任务ID
|
||||
*/
|
||||
void importRelationsAsync(List<CcdiCustFmyRelationExcel> excels, String taskId);
|
||||
|
||||
/**
|
||||
* 校验单条数据
|
||||
*
|
||||
* @param excel Excel数据
|
||||
* @param rowNum 行号
|
||||
* @return 错误消息,为null表示校验通过
|
||||
*/
|
||||
String validateExcelRow(CcdiCustFmyRelationExcel excel, Integer rowNum);
|
||||
|
||||
/**
|
||||
* 获取导入失败记录
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
* @return 失败记录列表
|
||||
*/
|
||||
List<CustFmyRelationImportFailureVO> getImportFailures(String taskId);
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.ccdi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationAddDTO;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationEditDTO;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationQueryDTO;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiCustFmyRelationExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiCustFmyRelationVO;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 信贷客户家庭关系Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-11
|
||||
*/
|
||||
public interface ICcdiCustFmyRelationService {
|
||||
|
||||
/**
|
||||
* 分页查询信贷客户家庭关系
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页条数
|
||||
* @return 分页结果
|
||||
*/
|
||||
Page<CcdiCustFmyRelationVO> selectRelationPage(CcdiCustFmyRelationQueryDTO query,
|
||||
Integer pageNum, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 根据ID查询信贷客户家庭关系详情
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 信贷客户家庭关系VO
|
||||
*/
|
||||
CcdiCustFmyRelationVO selectRelationById(Long id);
|
||||
|
||||
/**
|
||||
* 新增信贷客户家庭关系
|
||||
*
|
||||
* @param addDTO 新增DTO
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean insertRelation(CcdiCustFmyRelationAddDTO addDTO);
|
||||
|
||||
/**
|
||||
* 修改信贷客户家庭关系
|
||||
*
|
||||
* @param editDTO 编辑DTO
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean updateRelation(CcdiCustFmyRelationEditDTO editDTO);
|
||||
|
||||
/**
|
||||
* 删除信贷客户家庭关系
|
||||
*
|
||||
* @param ids 主键ID数组
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteRelationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导出信贷客户家庭关系
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param response HTTP响应
|
||||
*/
|
||||
void exportRelations(CcdiCustFmyRelationQueryDTO query, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 生成导入模板
|
||||
*
|
||||
* @param response HTTP响应
|
||||
*/
|
||||
void importTemplate(HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 批量导入信贷客户家庭关系
|
||||
*
|
||||
* @param excels Excel数据列表
|
||||
* @return 导入任务ID
|
||||
*/
|
||||
String importRelations(List<CcdiCustFmyRelationExcel> excels);
|
||||
|
||||
/**
|
||||
* 获取导入失败记录
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
* @return 失败记录列表
|
||||
*/
|
||||
List<com.ruoyi.ccdi.domain.vo.CustFmyRelationImportFailureVO> getImportFailures(String taskId);
|
||||
}
|
||||
Reference in New Issue
Block a user