中介黑名单更新
This commit is contained in:
@@ -68,7 +68,8 @@
|
||||
"Bash(chmod:*)",
|
||||
"Bash(ls:*)",
|
||||
"Bash(test_report.sh \")",
|
||||
"mcp__mysql__show_statement"
|
||||
"mcp__mysql__show_statement",
|
||||
"Bash(if not exist \"doc\\\\designs\" mkdir docdesigns)"
|
||||
]
|
||||
},
|
||||
"enabledMcpjsonServers": [
|
||||
|
||||
532
doc/designs/2026-02-04-intermediary-blacklist-design.md
Normal file
532
doc/designs/2026-02-04-intermediary-blacklist-design.md
Normal file
@@ -0,0 +1,532 @@
|
||||
# 中介黑名单管理模块 - 系统设计文档
|
||||
|
||||
## 文档信息
|
||||
|
||||
- **版本**: v1.0
|
||||
- **日期**: 2026-02-04
|
||||
- **作者**: Claude
|
||||
- **项目**: 纪检初核系统 (CCDI)
|
||||
|
||||
---
|
||||
|
||||
## 1. 概述
|
||||
|
||||
### 1.1 功能简介
|
||||
|
||||
中介黑名单管理模块提供个人中介和实体中介两类中介信息的完整管理功能,包括:
|
||||
- 个人中介的增删改查
|
||||
- 实体中介的增删改查
|
||||
- 统一列表查询(支持联合查询和个人/实体分类查询)
|
||||
- 带字典下拉框的Excel导入模板下载
|
||||
- 批量数据导入
|
||||
|
||||
### 1.2 核心特性
|
||||
|
||||
1. **双表存储**: 个人中介和实体中介分别存储在不同的数据表中
|
||||
2. **统一查询**: 使用SQL UNION实现高效的联合查询和分页
|
||||
3. **类型区分**: 通过`intermediary_type`字段区分个人(1)和实体(2)中介
|
||||
4. **智能筛选**: 实体中介通过`risk_level='1'`(高风险) AND `ent_source='INTERMEDIARY'(中介)`筛选
|
||||
5. **唯一性保证**: 个人中介的证件号`person_id`作为业务唯一键
|
||||
|
||||
### 1.3 技术栈
|
||||
|
||||
- **后端框架**: Spring Boot 3.5.8
|
||||
- **ORM框架**: MyBatis Plus 3.5.10
|
||||
- **Excel处理**: EasyExcel (带字典下拉框)
|
||||
- **数据库**: MySQL 8.2.0
|
||||
- **API文档**: SpringDoc 2.8.14
|
||||
|
||||
---
|
||||
|
||||
## 2. 数据库设计
|
||||
|
||||
### 2.1 个人中介表 (ccdi_biz_intermediary)
|
||||
|
||||
| 字段名 | 类型 | 可空 | 主键 | 注释 |
|
||||
|--------|------|------|------|------|
|
||||
| biz_id | VARCHAR | 否 | 是 | 人员ID |
|
||||
| person_type | VARCHAR | 否 | 否 | 人员类型(中介、职业背债人等) |
|
||||
| person_sub_type | VARCHAR | 是 | 否 | 人员子类型 |
|
||||
| relation_type | VARCHAR | 是 | 否 | 关系类型(配偶、子女、父母等) |
|
||||
| name | VARCHAR | 否 | 否 | 姓名 |
|
||||
| gender | CHAR | 是 | 否 | 性别 |
|
||||
| id_type | VARCHAR | 否 | 否 | 证件类型(默认身份证) |
|
||||
| person_id | VARCHAR | 否 | 否 | **证件号码(业务唯一键)** |
|
||||
| mobile | VARCHAR | 是 | 否 | 手机号码 |
|
||||
| wechat_no | VARCHAR | 是 | 否 | 微信号 |
|
||||
| contact_address | VARCHAR | 是 | 否 | 联系地址 |
|
||||
| company | VARCHAR | 是 | 否 | 所在公司 |
|
||||
| social_credit_code | VARCHAR | 是 | 否 | 企业统一信用码 |
|
||||
| position | VARCHAR | 是 | 否 | 职位 |
|
||||
| related_num_id | VARCHAR | 是 | 否 | 关联人员ID |
|
||||
| relation_type | VARCHAR | 是 | 否 | 关联关系 |
|
||||
| data_source | VARCHAR | 是 | 否 | 数据来源(MANUAL/SYSTEM/IMPORT/API) |
|
||||
| remark | VARCHAR | 是 | 否 | 备注信息 |
|
||||
| created_by | VARCHAR | 否 | 否 | 记录创建人 |
|
||||
| updated_by | VARCHAR | 是 | 否 | 记录更新人 |
|
||||
| create_time | DATETIME | 否 | 否 | 记录创建时间 |
|
||||
| update_time | DATETIME | 是 | 否 | 记录更新时间 |
|
||||
|
||||
**索引设计**:
|
||||
- PRIMARY KEY: `biz_id`
|
||||
- UNIQUE KEY: `uk_person_id` (`person_id`)
|
||||
|
||||
### 2.2 实体中介表 (ccdi_enterprise_base_info)
|
||||
|
||||
| 字段名 | 类型 | 可空 | 主键 | 注释 |
|
||||
|--------|------|------|------|------|
|
||||
| social_credit_code | VARCHAR | 否 | 是 | **统一社会信用代码(主键)** |
|
||||
| enterprise_name | VARCHAR | 否 | 否 | 企业名称 |
|
||||
| enterprise_type | VARCHAR | 否 | 否 | 企业类型(有限责任公司、股份有限公司等) |
|
||||
| enterprise_nature | VARCHAR | 是 | 否 | 企业性质(国企、民企、外企等) |
|
||||
| industry_class | VARCHAR | 是 | 否 | 行业分类 |
|
||||
| industry_name | VARCHAR | 是 | 否 | 所属行业 |
|
||||
| establish_date | DATE | 是 | 否 | 成立日期 |
|
||||
| register_address | VARCHAR | 是 | 否 | 注册地址 |
|
||||
| legal_representative | VARCHAR | 是 | 否 | 法定代表人 |
|
||||
| legal_cert_type | VARCHAR | 是 | 否 | 法定代表人证件类型 |
|
||||
| legal_cert_no | VARCHAR | 是 | 否 | 法定代表人证件号码 |
|
||||
| shareholder1-5 | VARCHAR | 是 | 否 | 股东信息 |
|
||||
| status | VARCHAR | 是 | 否 | 经营状态 |
|
||||
| create_time | DATETIME | 否 | 否 | 创建时间 |
|
||||
| update_time | DATETIME | 否 | 否 | 更新时间 |
|
||||
| created_by | VARCHAR | 否 | 否 | 创建人 |
|
||||
| updated_by | VARCHAR | 是 | 否 | 更新人 |
|
||||
| data_source | VARCHAR | 是 | 否 | 数据来源(MANUAL/SYSTEM/API/IMPORT) |
|
||||
| **risk_level** | VARCHAR(10) | 是 | 否 | **风险等级:1-高风险, 2-中风险, 3-低风险** |
|
||||
| **ent_source** | VARCHAR(20) | 否 | 否 | **企业来源:GENERAL/EMP_RELATION/CREDIT_CUSTOMER/INTERMEDIARY/BOTH** |
|
||||
|
||||
**索引设计**:
|
||||
- PRIMARY KEY: `social_credit_code`
|
||||
- INDEX: `idx_risk_ent_source` (`risk_level`, `ent_source`)
|
||||
|
||||
**实体中介筛选条件**:
|
||||
- `risk_level = '1'` (高风险)
|
||||
- `ent_source = 'INTERMEDIARY'` (中介)
|
||||
|
||||
---
|
||||
|
||||
## 3. 架构设计
|
||||
|
||||
### 3.1 整体架构
|
||||
|
||||
```
|
||||
Controller Layer (CcdiIntermediaryController)
|
||||
↓
|
||||
Service Layer (ICcdiIntermediaryService)
|
||||
↓
|
||||
Mapper Layer (CcdiBizIntermediaryMapper, CcdiEnterpriseBaseInfoMapper)
|
||||
↓
|
||||
Database (ccdi_biz_intermediary, ccdi_enterprise_base_info)
|
||||
```
|
||||
|
||||
### 3.2 分层说明
|
||||
|
||||
**Controller层**:
|
||||
- 统一的Controller处理个人和实体中介的请求
|
||||
- 使用不同的路径区分个人和实体中介操作
|
||||
- 权限控制: `ccdi:intermediary:*`
|
||||
|
||||
**Service层**:
|
||||
- 统一的服务接口
|
||||
- 根据中介类型路由到不同的业务逻辑
|
||||
- 处理唯一性校验、数据自动填充等业务规则
|
||||
|
||||
**Mapper层**:
|
||||
- 每个表对应独立的Mapper接口
|
||||
- 继承MyBatis Plus的BaseMapper
|
||||
- 自定义XML实现UNION联合查询
|
||||
|
||||
**DTO/VO层**:
|
||||
- 严格分离,不与Entity混用
|
||||
- DTO用于接口参数接收
|
||||
- VO用于数据返回
|
||||
|
||||
---
|
||||
|
||||
## 4. 接口设计
|
||||
|
||||
### 4.1 基础信息
|
||||
|
||||
- **基础路径**: `/ccdi/intermediary`
|
||||
- **权限前缀**: `ccdi:intermediary`
|
||||
- **响应格式**: AjaxResult
|
||||
|
||||
### 4.2 统一列表查询
|
||||
|
||||
**接口**: `GET /ccdi/intermediary/list`
|
||||
|
||||
**权限**: `ccdi:intermediary:list`
|
||||
|
||||
**请求参数**:
|
||||
| 参数名 | 类型 | 必填 | 说明 |
|
||||
|--------|------|------|------|
|
||||
| name | String | 否 | 姓名/机构名称(模糊查询) |
|
||||
| certificateNo | String | 否 | 证件号/统一社会信用代码(精确查询) |
|
||||
| intermediaryType | String | 否 | 中介类型(1=个人, 2=实体, null=全部) |
|
||||
| pageNum | Integer | 否 | 页码(默认1) |
|
||||
| pageSize | Integer | 否 | 每页数量(默认10) |
|
||||
|
||||
**响应**: TableDataInfo (分页结果)
|
||||
|
||||
**实现**: SQL UNION联合查询,支持按类型筛选优化
|
||||
|
||||
### 4.3 个人中介接口
|
||||
|
||||
#### 4.3.1 新增个人中介
|
||||
**接口**: `POST /ccdi/intermediary/person`
|
||||
**权限**: `ccdi:intermediary:add`
|
||||
**请求体**: CcdiIntermediaryPersonAddDTO
|
||||
**业务逻辑**:
|
||||
- 校验姓名必填
|
||||
- 校验证件号必填且唯一
|
||||
- 自动设置data_source='MANUAL'
|
||||
- 自动设置person_type='中介'
|
||||
|
||||
#### 4.3.2 修改个人中介
|
||||
**接口**: `PUT /ccdi/intermediary/person`
|
||||
**权限**: `ccdi:intermediary:edit`
|
||||
**请求体**: CcdiIntermediaryPersonEditDTO
|
||||
**业务逻辑**:
|
||||
- biz_id不可修改
|
||||
- 证件号修改时需校验唯一性(排除自身)
|
||||
|
||||
#### 4.3.3 查询个人中介详情
|
||||
**接口**: `GET /ccdi/intermediary/person/{bizId}`
|
||||
**权限**: `ccdi:intermediary:query`
|
||||
**响应**: CcdiIntermediaryPersonDetailVO
|
||||
|
||||
### 4.4 实体中介接口
|
||||
|
||||
#### 4.4.1 新增实体中介
|
||||
**接口**: `POST /ccdi/intermediary/entity`
|
||||
**权限**: `ccdi:intermediary:add`
|
||||
**请求体**: CcdiIntermediaryEntityAddDTO
|
||||
**业务逻辑**:
|
||||
- 校验企业名称必填
|
||||
- 校验统一社会信用代码唯一
|
||||
- 自动设置risk_level='1'(高风险)
|
||||
- 自动设置ent_source='INTERMEDIARY'(中介)
|
||||
- 自动设置data_source='MANUAL'
|
||||
|
||||
#### 4.4.2 修改实体中介
|
||||
**接口**: `PUT /ccdi/intermediary/entity`
|
||||
**权限**: `ccdi:intermediary:edit`
|
||||
**请求体**: CcdiIntermediaryEntityEditDTO
|
||||
**业务逻辑**:
|
||||
- social_credit_code不可修改
|
||||
- 企业名称修改时需校验唯一性(排除自身)
|
||||
|
||||
#### 4.4.3 查询实体中介详情
|
||||
**接口**: `GET /ccdi/intermediary/entity/{socialCreditCode}`
|
||||
**权限**: `ccdi:intermediary:query`
|
||||
**响应**: CcdiIntermediaryEntityDetailVO
|
||||
|
||||
### 4.5 删除接口
|
||||
|
||||
**接口**: `DELETE /ccdi/intermediary/{ids}`
|
||||
**权限**: `ccdi:intermediary:remove`
|
||||
**路径参数**: ids (支持个人和实体的ID,逗号分隔)
|
||||
|
||||
### 4.6 导入导出接口
|
||||
|
||||
#### 4.6.1 个人中介模板下载
|
||||
**接口**: `POST /ccdi/intermediary/importPersonTemplate`
|
||||
**权限**: 无需登录
|
||||
**功能**: 下载带字典下拉框的Excel模板
|
||||
**下拉字段**:
|
||||
- 性别: `ccdi_indiv_gender`
|
||||
- 证件类型: `ccdi_certificate_type`
|
||||
- 关联关系: `ccdi_relation_type`
|
||||
|
||||
#### 4.6.2 实体中介模板下载
|
||||
**接口**: `POST /ccdi/intermediary/importEntityTemplate`
|
||||
**权限**: 无需登录
|
||||
**功能**: 下载带字典下拉框的Excel模板
|
||||
**下拉字段**:
|
||||
- 主体类型: `ccdi_entity_type`
|
||||
- 企业性质: `ccdi_enterprise_nature`
|
||||
- 法人证件类型: `ccdi_certificate_type`
|
||||
|
||||
#### 4.6.3 个人中介数据导入
|
||||
**接口**: `POST /ccdi/intermediary/importPersonData`
|
||||
**权限**: `ccdi:intermediary:import`
|
||||
**参数**:
|
||||
- file: MultipartFile
|
||||
- updateSupport: Boolean (是否更新已存在数据)
|
||||
**Excel类**: CcdiIntermediaryPersonExcel
|
||||
**业务逻辑**:
|
||||
- 解析Excel数据
|
||||
- 校验姓名必填、证件号必填
|
||||
- 检查person_id唯一性
|
||||
- 批量插入ccdi_biz_intermediary表
|
||||
- 自动设置: data_source='IMPORT', person_type='中介'
|
||||
|
||||
#### 4.6.4 实体中介数据导入
|
||||
**接口**: `POST /ccdi/intermediary/importEntityData`
|
||||
**权限**: `ccdi:intermediary:import`
|
||||
**参数**:
|
||||
- file: MultipartFile
|
||||
- updateSupport: Boolean (是否更新已存在数据)
|
||||
**Excel类**: CcdiIntermediaryEntityExcel
|
||||
**业务逻辑**:
|
||||
- 解析Excel数据
|
||||
- 校验企业名称必填
|
||||
- 检查social_credit_code唯一性
|
||||
- 批量插入ccdi_enterprise_base_info表
|
||||
- 自动设置: risk_level='1', ent_source='INTERMEDIARY', data_source='IMPORT'
|
||||
|
||||
---
|
||||
|
||||
## 5. UNION联合查询实现
|
||||
|
||||
### 5.1 SQL查询语句
|
||||
|
||||
```xml
|
||||
<select id="selectIntermediaryList" resultType="CcdiIntermediaryVO">
|
||||
<!-- 查询个人中介 -->
|
||||
SELECT
|
||||
biz_id as id,
|
||||
name,
|
||||
person_id as certificate_no,
|
||||
'1' as intermediary_type,
|
||||
person_type,
|
||||
gender,
|
||||
id_type,
|
||||
mobile,
|
||||
company,
|
||||
data_source,
|
||||
create_time
|
||||
FROM ccdi_biz_intermediary
|
||||
WHERE person_type = '中介'
|
||||
<if test="intermediaryType == null or intermediaryType == '1'">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
<if test="certificateNo != null and certificateNo != ''">
|
||||
AND person_id = #{certificateNo}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
UNION ALL
|
||||
|
||||
<!-- 查询实体中介 -->
|
||||
SELECT
|
||||
social_credit_code as id,
|
||||
enterprise_name as name,
|
||||
social_credit_code as certificate_no,
|
||||
'2' as intermediary_type,
|
||||
'实体' as person_type,
|
||||
null as gender,
|
||||
null as id_type,
|
||||
null as mobile,
|
||||
enterprise_name as company,
|
||||
data_source,
|
||||
create_time
|
||||
FROM ccdi_enterprise_base_info
|
||||
WHERE risk_level = '1' AND ent_source = 'INTERMEDIARY'
|
||||
<if test="intermediaryType == null or intermediaryType == '2'">
|
||||
AND enterprise_name LIKE CONCAT('%', #{name}, '%')
|
||||
<if test="certificateNo != null and certificateNo != ''">
|
||||
AND social_credit_code = #{certificateNo}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
```
|
||||
|
||||
### 5.2 分页实现
|
||||
|
||||
- 使用MyBatis Plus的Page对象进行分页
|
||||
- 在Service层调用`page(intermediaryQueryDTO, Page)`方法
|
||||
- 自动处理total和rows
|
||||
|
||||
### 5.3 查询优化
|
||||
|
||||
- 根据intermediaryType参数优化查询,如果指定类型则只查询对应表
|
||||
- 添加索引优化查询性能
|
||||
|
||||
---
|
||||
|
||||
## 6. 数据对象设计
|
||||
|
||||
### 6.1 Entity实体类
|
||||
|
||||
**CcdiBizIntermediary**:
|
||||
- 使用`@Data`注解
|
||||
- 不继承BaseEntity
|
||||
- 单独添加审计字段
|
||||
- 主键: biz_id (String)
|
||||
|
||||
**CcdiEnterpriseBaseInfo**:
|
||||
- 使用`@Data`注解
|
||||
- 不继承BaseEntity
|
||||
- 单独添加审计字段
|
||||
- 主键: social_credit_code (String)
|
||||
|
||||
### 6.2 DTO数据传输对象
|
||||
|
||||
**CcdiIntermediaryPersonAddDTO**: 个人中介新增DTO
|
||||
- 包含所有个人字段
|
||||
- 使用JSR-303校验注解
|
||||
|
||||
**CcdiIntermediaryPersonEditDTO**: 个人中介修改DTO
|
||||
- 包含biz_id和可编辑字段
|
||||
- biz_id不可为空
|
||||
|
||||
**CcdiIntermediaryEntityAddDTO**: 实体中介新增DTO
|
||||
- 包含所有企业字段
|
||||
- 使用JSR-303校验注解
|
||||
|
||||
**CcdiIntermediaryEntityEditDTO**: 实体中介修改DTO
|
||||
- 包含social_credit_code和可编辑字段
|
||||
- social_credit_code不可为空
|
||||
|
||||
**CcdiIntermediaryQueryDTO**: 统一查询DTO
|
||||
- 支持: name, certificateNo, intermediaryType筛选
|
||||
|
||||
### 6.3 VO视图对象
|
||||
|
||||
**CcdiIntermediaryVO**: 统一列表VO
|
||||
- 包含intermediary_type字段区分类型(1=个人, 2=实体)
|
||||
- 统一字段: id, name, certificate_no, intermediary_type, company, create_time等
|
||||
|
||||
**CcdiIntermediaryPersonDetailVO**: 个人中介详情VO
|
||||
- 包含个人中介的所有详细信息
|
||||
|
||||
**CcdiIntermediaryEntityDetailVO**: 实体中介详情VO
|
||||
- 包含实体中介的所有详细信息
|
||||
|
||||
### 6.4 Excel导入导出类
|
||||
|
||||
**CcdiIntermediaryPersonExcel**: 个人中介Excel类
|
||||
- 使用EasyExcel注解
|
||||
- 字段校验和格式化
|
||||
|
||||
**CcdiIntermediaryEntityExcel**: 实体中介Excel类
|
||||
- 使用EasyExcel注解
|
||||
- 字段校验和格式化
|
||||
|
||||
---
|
||||
|
||||
## 7. 业务规则
|
||||
|
||||
### 7.1 唯一性约束
|
||||
|
||||
1. **个人中介**:
|
||||
- `person_id`(证件号)必须唯一
|
||||
- 新增时检查是否已存在
|
||||
- 修改时检查是否已存在(排除自身)
|
||||
|
||||
2. **实体中介**:
|
||||
- `social_credit_code`(统一社会信用代码)必须唯一
|
||||
- 新增时检查是否已存在
|
||||
- 修改时检查是否已存在(排除自身)
|
||||
|
||||
### 7.2 数据自动填充
|
||||
|
||||
**个人中介**:
|
||||
- data_source: MANUAL(手动录入) / IMPORT(批量导入)
|
||||
- person_type: 中介
|
||||
|
||||
**实体中介**:
|
||||
- risk_level: 1 (高风险)
|
||||
- ent_source: INTERMEDIARY (中介)
|
||||
- data_source: MANUAL(手动录入) / IMPORT(批量导入)
|
||||
|
||||
### 7.3 字典类型
|
||||
|
||||
| 字典类型 | 用途 |
|
||||
|---------|------|
|
||||
| ccdi_indiv_gender | 个人中介性别 |
|
||||
| ccdi_certificate_type | 证件类型 |
|
||||
| ccdi_relation_type | 关联关系 |
|
||||
| ccdi_entity_type | 主体类型 |
|
||||
| ccdi_enterprise_nature | 企业性质 |
|
||||
|
||||
---
|
||||
|
||||
## 8. 错误处理
|
||||
|
||||
### 8.1 业务错误码
|
||||
|
||||
| 错误码 | 说明 |
|
||||
|--------|------|
|
||||
| 1001 | 证件号已存在 |
|
||||
| 1002 | 统一社会信用代码已存在 |
|
||||
| 1003 | 数据不存在 |
|
||||
| 1004 | 姓名不能为空 |
|
||||
| 1005 | 证件号不能为空 |
|
||||
| 1006 | 企业名称不能为空 |
|
||||
|
||||
### 8.2 异常处理策略
|
||||
|
||||
- 使用`@ControllerAdvice`全局异常处理
|
||||
- 业务异常使用自定义BizException
|
||||
- 参数校验异常自动返回字段错误信息
|
||||
|
||||
---
|
||||
|
||||
## 9. 测试策略
|
||||
|
||||
### 9.1 单元测试
|
||||
|
||||
- Service层业务逻辑测试
|
||||
- Mapper层SQL查询测试
|
||||
- 唯一性校验测试
|
||||
|
||||
### 9.2 集成测试
|
||||
|
||||
- Controller接口测试
|
||||
- 导入导出功能测试
|
||||
- 联合查询分页测试
|
||||
|
||||
### 9.3 测试脚本
|
||||
|
||||
- 生成可执行的HTTP测试脚本
|
||||
- 使用admin/admin123账号获取token
|
||||
- 保存测试结果并生成测试报告
|
||||
|
||||
---
|
||||
|
||||
## 10. 实现计划
|
||||
|
||||
### 10.1 开发顺序
|
||||
|
||||
1. 创建Entity实体类
|
||||
2. 创建Mapper接口和XML
|
||||
3. 创建DTO/VO对象
|
||||
4. 实现Service层业务逻辑
|
||||
5. 实现Controller层接口
|
||||
6. 实现Excel导入导出功能
|
||||
7. 编写测试用例
|
||||
8. 生成API文档
|
||||
|
||||
### 10.2 技术要点
|
||||
|
||||
- 使用MyBatis Plus的BaseMapper简化CRUD操作
|
||||
- 使用@Resource注入,替代@Autowired
|
||||
- 实体类不继承BaseEntity,单独添加审计字段
|
||||
- 简单CRUD使用MyBatis Plus方法,复杂查询使用XML
|
||||
- 所有Controller接口添加完整的Swagger注解
|
||||
- 使用@Validated和JSR-303进行参数校验
|
||||
|
||||
---
|
||||
|
||||
## 11. 附录
|
||||
|
||||
### 11.1 相关文档
|
||||
|
||||
- [中介黑名单管理API文档.md](../api/中介黑名单管理API文档.md)
|
||||
- [中介黑名单后端.md](../docs/中介黑名单后端.md)
|
||||
- [ccdi_biz_intermediary.csv](../docs/ccdi_biz_intermediary.csv)
|
||||
- [ccdi_enterprise_base_info.csv](../docs/ccdi_enterprise_base_info.csv)
|
||||
|
||||
### 11.2 更新日志
|
||||
|
||||
| 版本 | 日期 | 说明 |
|
||||
|------|------|------|
|
||||
| 1.0 | 2026-02-04 | 初始版本,完成系统设计 |
|
||||
|
||||
---
|
||||
|
||||
**文档结束**
|
||||
@@ -1 +1 @@
|
||||
我想实现中介黑名单管理的功能需求。中介分为个人中介和实体中介。个人中介的字段为 @ccdi_biz_intermediary.csv。实体中介字段为 @ccdi_enterprise_base_info.csv,风险等级为高风险,企业来源为中介。需要生成的接口:个人中介的新增、修改接口,以证件号为关联键;个人中介导入模板下载,个人中介文件上传导入新增;实体中介类的新增、修改接口;实体中介导入模板下载,上传导入新增;列表查询,要求联合查询两种类型的中介,也可以支持查询单种类的中介。
|
||||
实现中介黑名单管理的后端接口开发。中介分为个人中介和实体中介。个人中介的表字段为 @ccdi_biz_intermediary.csv。实体中介表字段为 @ccdi_enterprise_base_info.csv,风险等级为高风险,企业来源为中介。需要生成的接口:个人中介的新增、修改接口,以证件号为关联键;个人中介导入模板下载,个人中介文件上传导入新增;实体中介类的新增、修改接口;实体中介导入模板下载,上传导入新增;列表查询,要求联合查询两种类型的中介,也可以支持查询单种类的中介。
|
||||
1958
doc/plans/2026-02-04-intermediary-blacklist-implementation.md
Normal file
1958
doc/plans/2026-02-04-intermediary-blacklist-implementation.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,202 +0,0 @@
|
||||
package com.ruoyi.ccdi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiIntermediaryBlacklist;
|
||||
import com.ruoyi.ccdi.domain.dto.*;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryBlacklistExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryBlacklistVO;
|
||||
import com.ruoyi.ccdi.service.ICcdiIntermediaryBlacklistService;
|
||||
import com.ruoyi.ccdi.utils.EasyExcelUtil;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Tag(name = "中介黑名单管理")
|
||||
@RestController
|
||||
@RequestMapping("/ccdi/intermediary")
|
||||
public class CcdiIntermediaryBlacklistController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ICcdiIntermediaryBlacklistService intermediaryService;
|
||||
|
||||
/**
|
||||
* 查询中介黑名单列表
|
||||
*/
|
||||
@Operation(summary = "查询中介黑名单列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
// 使用MyBatis Plus分页
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Page<CcdiIntermediaryBlacklist> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
Page<CcdiIntermediaryBlacklistVO> result = intermediaryService.selectIntermediaryPage(page, queryDTO);
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出中介黑名单列表
|
||||
*/
|
||||
@Operation(summary = "导出中介黑名单列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:export')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
List<CcdiIntermediaryBlacklistExcel> list = intermediaryService.selectIntermediaryListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiIntermediaryBlacklistExcel.class, "中介黑名单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取中介黑名单详细信息(根据类型返回不同结构)
|
||||
*/
|
||||
@Operation(summary = "获取中介黑名单详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:query')")
|
||||
@GetMapping(value = "/{intermediaryId}")
|
||||
public AjaxResult getInfo(@PathVariable Long intermediaryId) {
|
||||
return success(intermediaryService.selectIntermediaryDetailById(intermediaryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增中介黑名单(已废弃,请使用类型专用接口)
|
||||
*/
|
||||
@Operation(summary = "新增中介黑名单(已废弃,请使用类型专用接口)")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:add')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@Deprecated
|
||||
public AjaxResult add(@Validated @RequestBody CcdiIntermediaryBlacklistAddDTO addDTO) {
|
||||
return toAjax(intermediaryService.insertIntermediary(addDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增个人中介黑名单
|
||||
*/
|
||||
@Operation(summary = "新增个人中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:add')")
|
||||
@Log(title = "个人中介黑名单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/person")
|
||||
public AjaxResult addPerson(@Validated @RequestBody CcdiIntermediaryPersonAddDTO addDTO) {
|
||||
return toAjax(intermediaryService.insertPersonIntermediary(addDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机构中介黑名单
|
||||
*/
|
||||
@Operation(summary = "新增机构中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:add')")
|
||||
@Log(title = "机构中介黑名单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/entity")
|
||||
public AjaxResult addEntity(@Validated @RequestBody CcdiIntermediaryEntityAddDTO addDTO) {
|
||||
return toAjax(intermediaryService.insertEntityIntermediary(addDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改中介黑名单
|
||||
*/
|
||||
@Operation(summary = "修改中介黑名单(已废弃,请使用类型专用接口)")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:edit')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@Deprecated
|
||||
public AjaxResult edit(@Validated @RequestBody CcdiIntermediaryBlacklistEditDTO editDTO) {
|
||||
return toAjax(intermediaryService.updateIntermediary(editDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人中介黑名单
|
||||
*/
|
||||
@Operation(summary = "修改个人中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:edit')")
|
||||
@Log(title = "个人中介黑名单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/person")
|
||||
public AjaxResult editPerson(@Validated @RequestBody CcdiIntermediaryPersonEditDTO editDTO) {
|
||||
return toAjax(intermediaryService.updatePersonIntermediary(editDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机构中介黑名单
|
||||
*/
|
||||
@Operation(summary = "修改机构中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:edit')")
|
||||
@Log(title = "机构中介黑名单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/entity")
|
||||
public AjaxResult editEntity(@Validated @RequestBody CcdiIntermediaryEntityEditDTO editDTO) {
|
||||
return toAjax(intermediaryService.updateEntityIntermediary(editDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除中介黑名单
|
||||
*/
|
||||
@Operation(summary = "删除中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:remove')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{intermediaryIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] intermediaryIds) {
|
||||
return toAjax(intermediaryService.deleteIntermediaryByIds(intermediaryIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载个人中介导入模板(带字典下拉框)
|
||||
*/
|
||||
@Operation(summary = "下载个人中介导入模板")
|
||||
@PostMapping("/importPersonTemplate")
|
||||
public void importPersonTemplate(HttpServletResponse response) {
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiIntermediaryPersonExcel.class, "个人中介黑名单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载机构中介导入模板(带字典下拉框)
|
||||
*/
|
||||
@Operation(summary = "下载机构中介导入模板")
|
||||
@PostMapping("/importEntityTemplate")
|
||||
public void importEntityTemplate(HttpServletResponse response) {
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiIntermediaryEntityExcel.class, "机构中介黑名单");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入个人中介黑名单
|
||||
*/
|
||||
@Operation(summary = "导入个人中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:import')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importPersonData")
|
||||
public AjaxResult importPersonData(@RequestParam("file") MultipartFile file, @RequestParam(value = "updateSupport", defaultValue = "false") boolean updateSupport) throws Exception {
|
||||
List<CcdiIntermediaryPersonExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiIntermediaryPersonExcel.class);
|
||||
String message = intermediaryService.importPersonIntermediary(list, updateSupport);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入机构中介黑名单
|
||||
*/
|
||||
@Operation(summary = "导入机构中介黑名单")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:import')")
|
||||
@Log(title = "中介黑名单", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importEntityData")
|
||||
public AjaxResult importEntityData(@RequestParam("file") MultipartFile file, @RequestParam(value = "updateSupport", defaultValue = "false") boolean updateSupport) throws Exception {
|
||||
List<CcdiIntermediaryEntityExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiIntermediaryEntityExcel.class);
|
||||
String message = intermediaryService.importEntityIntermediary(list, updateSupport);
|
||||
return success(message);
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 中介人员业务对象 ccdi_biz_intermediary
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_biz_intermediary")
|
||||
public class CcdiBizIntermediary implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 业务ID */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long bizId;
|
||||
|
||||
/** 人员类型 */
|
||||
private String personType;
|
||||
|
||||
/** 人员子类型 */
|
||||
private String personSubType;
|
||||
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
|
||||
/** 性别 */
|
||||
private String gender;
|
||||
|
||||
/** 证件类型 */
|
||||
private String idType;
|
||||
|
||||
/** 证件号 */
|
||||
private String personId;
|
||||
|
||||
/** 手机号 */
|
||||
private String mobile;
|
||||
|
||||
/** 微信号 */
|
||||
private String wechatNo;
|
||||
|
||||
/** 联系地址 */
|
||||
private String contactAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
private String company;
|
||||
|
||||
/** 社会信用代码 */
|
||||
private String socialCreditCode;
|
||||
|
||||
/** 职位 */
|
||||
private String position;
|
||||
|
||||
/** 关联人员ID */
|
||||
private String relatedNumId;
|
||||
|
||||
/** 关联关系 */
|
||||
private String relationType;
|
||||
|
||||
/** 数据来源 */
|
||||
private String dateSource;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建者 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createdBy;
|
||||
|
||||
/** 更新者 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updatedBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 企业基础信息对象 ccdi_enterprise_base_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_enterprise_base_info")
|
||||
public class CcdiEnterpriseBaseInfo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@TableId
|
||||
private String socialCreditCode;
|
||||
|
||||
/** 企业名称 */
|
||||
private String enterpriseName;
|
||||
|
||||
/** 企业类型 */
|
||||
private String enterpriseType;
|
||||
|
||||
/** 企业性质 */
|
||||
private String enterpriseNature;
|
||||
|
||||
/** 行业分类 */
|
||||
private String industryClass;
|
||||
|
||||
/** 所属行业 */
|
||||
private String industryName;
|
||||
|
||||
/** 成立日期 */
|
||||
private Date establishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
private String registerAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String legalRepresentative;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
private String legalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
private String legalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
private String shareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
private String shareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
private String shareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
private String shareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
private String shareholder5;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 风险等级 */
|
||||
private String riskLevel;
|
||||
|
||||
/** 企业来源 */
|
||||
private String entSource;
|
||||
|
||||
/** 数据来源 */
|
||||
private String dataSource;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建者 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createdBy;
|
||||
|
||||
/** 更新者 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updatedBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单对象 dpc_intermediary_blacklist
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryBlacklist implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 中介ID */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 姓名/机构名称 */
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
// ============================================================
|
||||
// 个人类型字段 (以 indiv_ 前缀标识,individual 缩写)
|
||||
// ============================================================
|
||||
/** 人员类型(中介、职业背债人、房产中介等) */
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型(本人、配偶等) */
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别(M男 F女 O其他) */
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号码(加密存储) */
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位/职务 */
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
private String indivRelation;
|
||||
|
||||
// ============================================================
|
||||
// 机构类型字段 (以 corp_ 前缀标识,corporation 缩写)
|
||||
// ============================================================
|
||||
/** 统一社会信用代码 */
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型(有限责任公司、股份有限公司等) */
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质(国企、民企、外企等) */
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
@TableField("corp_shareholder_1")
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
@TableField("corp_shareholder_2")
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
@TableField("corp_shareholder_3")
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
@TableField("corp_shareholder_4")
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
@TableField("corp_shareholder_5")
|
||||
private String corpShareholder5;
|
||||
|
||||
// ============================================================
|
||||
// 通用字段
|
||||
// ============================================================
|
||||
/** 数据来源(MANUAL手动录入 SYSTEM系统同步 IMPORT批量导入 API接口获取) */
|
||||
private String dataSource;
|
||||
|
||||
/** 创建者 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单新增 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class CcdiIntermediaryBlacklistAddDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 姓名/机构名称 */
|
||||
@NotBlank(message = "姓名/机构名称不能为空")
|
||||
@Size(min = 1, max = 100, message = "姓名/机构名称长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
@Size(max = 50, message = "证件号长度不能超过50个字符")
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
@NotBlank(message = "中介类型不能为空")
|
||||
private String intermediaryType;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCertificateNo() {
|
||||
return certificateNo;
|
||||
}
|
||||
|
||||
public void setCertificateNo(String certificateNo) {
|
||||
this.certificateNo = certificateNo;
|
||||
}
|
||||
|
||||
public String getIntermediaryType() {
|
||||
return intermediaryType;
|
||||
}
|
||||
|
||||
public void setIntermediaryType(String intermediaryType) {
|
||||
this.intermediaryType = intermediaryType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
@@ -1,386 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单编辑 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class CcdiIntermediaryBlacklistEditDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 中介ID */
|
||||
@NotNull(message = "中介ID不能为空")
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 姓名/机构名称 */
|
||||
@NotBlank(message = "姓名/机构名称不能为空")
|
||||
@Size(min = 1, max = 100, message = "姓名/机构名称长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
@Size(max = 50, message = "证件号长度不能超过50个字符")
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
@NotBlank(message = "中介类型不能为空")
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
|
||||
// ============================================================
|
||||
// 个人类型字段 (以 indiv_ 前缀标识,individual 缩写)
|
||||
// ============================================================
|
||||
/** 人员类型(中介、职业背债人、房产中介等) */
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型(本人、配偶等) */
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别(M男 F女 O其他) */
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号码(加密存储) */
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位/职务 */
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
private String indivRelation;
|
||||
|
||||
// ============================================================
|
||||
// 机构类型字段 (以 corp_ 前缀标识,corporation 缩写)
|
||||
// ============================================================
|
||||
/** 统一社会信用代码 */
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型(有限责任公司、股份有限公司等) */
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质(国企、民企、外企等) */
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
private String corpShareholder5;
|
||||
|
||||
public Long getIntermediaryId() {
|
||||
return intermediaryId;
|
||||
}
|
||||
|
||||
public void setIntermediaryId(Long intermediaryId) {
|
||||
this.intermediaryId = intermediaryId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCertificateNo() {
|
||||
return certificateNo;
|
||||
}
|
||||
|
||||
public void setCertificateNo(String certificateNo) {
|
||||
this.certificateNo = certificateNo;
|
||||
}
|
||||
|
||||
public String getIntermediaryType() {
|
||||
return intermediaryType;
|
||||
}
|
||||
|
||||
public void setIntermediaryType(String intermediaryType) {
|
||||
this.intermediaryType = intermediaryType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getIndivType() {
|
||||
return indivType;
|
||||
}
|
||||
|
||||
public void setIndivType(String indivType) {
|
||||
this.indivType = indivType;
|
||||
}
|
||||
|
||||
public String getIndivSubType() {
|
||||
return indivSubType;
|
||||
}
|
||||
|
||||
public void setIndivSubType(String indivSubType) {
|
||||
this.indivSubType = indivSubType;
|
||||
}
|
||||
|
||||
public String getIndivGender() {
|
||||
return indivGender;
|
||||
}
|
||||
|
||||
public void setIndivGender(String indivGender) {
|
||||
this.indivGender = indivGender;
|
||||
}
|
||||
|
||||
public String getIndivCertType() {
|
||||
return indivCertType;
|
||||
}
|
||||
|
||||
public void setIndivCertType(String indivCertType) {
|
||||
this.indivCertType = indivCertType;
|
||||
}
|
||||
|
||||
public String getIndivPhone() {
|
||||
return indivPhone;
|
||||
}
|
||||
|
||||
public void setIndivPhone(String indivPhone) {
|
||||
this.indivPhone = indivPhone;
|
||||
}
|
||||
|
||||
public String getIndivWechat() {
|
||||
return indivWechat;
|
||||
}
|
||||
|
||||
public void setIndivWechat(String indivWechat) {
|
||||
this.indivWechat = indivWechat;
|
||||
}
|
||||
|
||||
public String getIndivAddress() {
|
||||
return indivAddress;
|
||||
}
|
||||
|
||||
public void setIndivAddress(String indivAddress) {
|
||||
this.indivAddress = indivAddress;
|
||||
}
|
||||
|
||||
public String getIndivCompany() {
|
||||
return indivCompany;
|
||||
}
|
||||
|
||||
public void setIndivCompany(String indivCompany) {
|
||||
this.indivCompany = indivCompany;
|
||||
}
|
||||
|
||||
public String getIndivPosition() {
|
||||
return indivPosition;
|
||||
}
|
||||
|
||||
public void setIndivPosition(String indivPosition) {
|
||||
this.indivPosition = indivPosition;
|
||||
}
|
||||
|
||||
public String getIndivRelatedId() {
|
||||
return indivRelatedId;
|
||||
}
|
||||
|
||||
public void setIndivRelatedId(String indivRelatedId) {
|
||||
this.indivRelatedId = indivRelatedId;
|
||||
}
|
||||
|
||||
public String getIndivRelation() {
|
||||
return indivRelation;
|
||||
}
|
||||
|
||||
public void setIndivRelation(String indivRelation) {
|
||||
this.indivRelation = indivRelation;
|
||||
}
|
||||
|
||||
public String getCorpCreditCode() {
|
||||
return corpCreditCode;
|
||||
}
|
||||
|
||||
public void setCorpCreditCode(String corpCreditCode) {
|
||||
this.corpCreditCode = corpCreditCode;
|
||||
}
|
||||
|
||||
public String getCorpType() {
|
||||
return corpType;
|
||||
}
|
||||
|
||||
public void setCorpType(String corpType) {
|
||||
this.corpType = corpType;
|
||||
}
|
||||
|
||||
public String getCorpNature() {
|
||||
return corpNature;
|
||||
}
|
||||
|
||||
public void setCorpNature(String corpNature) {
|
||||
this.corpNature = corpNature;
|
||||
}
|
||||
|
||||
public String getCorpIndustryCategory() {
|
||||
return corpIndustryCategory;
|
||||
}
|
||||
|
||||
public void setCorpIndustryCategory(String corpIndustryCategory) {
|
||||
this.corpIndustryCategory = corpIndustryCategory;
|
||||
}
|
||||
|
||||
public String getCorpIndustry() {
|
||||
return corpIndustry;
|
||||
}
|
||||
|
||||
public void setCorpIndustry(String corpIndustry) {
|
||||
this.corpIndustry = corpIndustry;
|
||||
}
|
||||
|
||||
public Date getCorpEstablishDate() {
|
||||
return corpEstablishDate;
|
||||
}
|
||||
|
||||
public void setCorpEstablishDate(Date corpEstablishDate) {
|
||||
this.corpEstablishDate = corpEstablishDate;
|
||||
}
|
||||
|
||||
public String getCorpAddress() {
|
||||
return corpAddress;
|
||||
}
|
||||
|
||||
public void setCorpAddress(String corpAddress) {
|
||||
this.corpAddress = corpAddress;
|
||||
}
|
||||
|
||||
public String getCorpLegalRep() {
|
||||
return corpLegalRep;
|
||||
}
|
||||
|
||||
public void setCorpLegalRep(String corpLegalRep) {
|
||||
this.corpLegalRep = corpLegalRep;
|
||||
}
|
||||
|
||||
public String getCorpLegalCertType() {
|
||||
return corpLegalCertType;
|
||||
}
|
||||
|
||||
public void setCorpLegalCertType(String corpLegalCertType) {
|
||||
this.corpLegalCertType = corpLegalCertType;
|
||||
}
|
||||
|
||||
public String getCorpLegalCertNo() {
|
||||
return corpLegalCertNo;
|
||||
}
|
||||
|
||||
public void setCorpLegalCertNo(String corpLegalCertNo) {
|
||||
this.corpLegalCertNo = corpLegalCertNo;
|
||||
}
|
||||
|
||||
public String getCorpShareholder1() {
|
||||
return corpShareholder1;
|
||||
}
|
||||
|
||||
public void setCorpShareholder1(String corpShareholder1) {
|
||||
this.corpShareholder1 = corpShareholder1;
|
||||
}
|
||||
|
||||
public String getCorpShareholder2() {
|
||||
return corpShareholder2;
|
||||
}
|
||||
|
||||
public void setCorpShareholder2(String corpShareholder2) {
|
||||
this.corpShareholder2 = corpShareholder2;
|
||||
}
|
||||
|
||||
public String getCorpShareholder3() {
|
||||
return corpShareholder3;
|
||||
}
|
||||
|
||||
public void setCorpShareholder3(String corpShareholder3) {
|
||||
this.corpShareholder3 = corpShareholder3;
|
||||
}
|
||||
|
||||
public String getCorpShareholder4() {
|
||||
return corpShareholder4;
|
||||
}
|
||||
|
||||
public void setCorpShareholder4(String corpShareholder4) {
|
||||
this.corpShareholder4 = corpShareholder4;
|
||||
}
|
||||
|
||||
public String getCorpShareholder5() {
|
||||
return corpShareholder5;
|
||||
}
|
||||
|
||||
public void setCorpShareholder5(String corpShareholder5) {
|
||||
this.corpShareholder5 = corpShareholder5;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单查询 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public class CcdiIntermediaryBlacklistQueryDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 姓名/机构名称(模糊查询) */
|
||||
private String name;
|
||||
|
||||
/** 证件号(精确查询) */
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCertificateNo() {
|
||||
return certificateNo;
|
||||
}
|
||||
|
||||
public void setCertificateNo(String certificateNo) {
|
||||
this.certificateNo = certificateNo;
|
||||
}
|
||||
|
||||
public String getIntermediaryType() {
|
||||
return intermediaryType;
|
||||
}
|
||||
|
||||
public void setIntermediaryType(String intermediaryType) {
|
||||
this.intermediaryType = intermediaryType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 机构中介新增 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryEntityAddDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 机构名称 */
|
||||
@NotBlank(message = "机构名称不能为空")
|
||||
@Size(min = 1, max = 100, message = "机构名称长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@NotBlank(message = "统一社会信用代码不能为空")
|
||||
@Size(max = 18, message = "统一社会信用代码长度不能超过18个字符")
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型 */
|
||||
@Size(max = 50, message = "主体类型长度不能超过50个字符")
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质 */
|
||||
@Size(max = 50, message = "企业性质长度不能超过50个字符")
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
@Size(max = 100, message = "行业分类长度不能超过100个字符")
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
@Size(max = 100, message = "所属行业长度不能超过100个字符")
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
@Size(max = 500, message = "注册地址长度不能超过500个字符")
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
@Size(max = 50, message = "法定代表人长度不能超过50个字符")
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
@Size(max = 30, message = "法定代表人证件类型长度不能超过30个字符")
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
@Size(max = 30, message = "法定代表人证件号码长度不能超过30个字符")
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
@Size(max = 30, message = "股东1长度不能超过30个字符")
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
@Size(max = 30, message = "股东2长度不能超过30个字符")
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
@Size(max = 30, message = "股东3长度不能超过30个字符")
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
@Size(max = 30, message = "股东4长度不能超过30个字符")
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
@Size(max = 30, message = "股东5长度不能超过30个字符")
|
||||
private String corpShareholder5;
|
||||
|
||||
/** 状态 */
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 机构中介编辑 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryEntityEditDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 中介ID */
|
||||
@NotNull(message = "中介ID不能为空")
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 机构名称 */
|
||||
@NotBlank(message = "机构名称不能为空")
|
||||
@Size(min = 1, max = 100, message = "机构名称长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 证件号(统一社会信用代码) */
|
||||
@Size(max = 50, message = "证件号长度不能超过50个字符")
|
||||
private String certificateNo;
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型(有限责任公司、股份有限公司等) */
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质(国企、民企、外企等) */
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
private String corpShareholder5;
|
||||
|
||||
/** 状态 */
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 个人中介新增 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryPersonAddDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 姓名 */
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@Size(min = 1, max = 100, message = "姓名长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
@NotBlank(message = "证件号不能为空")
|
||||
@Size(max = 50, message = "证件号长度不能超过50个字符")
|
||||
private String certificateNo;
|
||||
|
||||
/** 人员类型(中介、职业背债人、房产中介等) */
|
||||
@Size(max = 30, message = "人员类型长度不能超过30个字符")
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型(本人、配偶等) */
|
||||
@Size(max = 50, message = "人员子类型长度不能超过50个字符")
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别(M男 F女 O其他) */
|
||||
@Size(max = 1, message = "性别长度不能超过1个字符")
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
@Size(max = 30, message = "证件类型长度不能超过30个字符")
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号码(加密存储) */
|
||||
@Size(max = 20, message = "手机号码长度不能超过20个字符")
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
@Size(max = 50, message = "微信号长度不能超过50个字符")
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
@Size(max = 200, message = "联系地址长度不能超过200个字符")
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
@Size(max = 100, message = "所在公司长度不能超过100个字符")
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位/职务 */
|
||||
@Size(max = 100, message = "职位长度不能超过100个字符")
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
@Size(max = 20, message = "关联人员ID长度不能超过20个字符")
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
@Size(max = 50, message = "关联关系长度不能超过50个字符")
|
||||
private String indivRelation;
|
||||
|
||||
/** 状态 */
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 个人中介编辑 DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryPersonEditDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 中介ID */
|
||||
@NotNull(message = "中介ID不能为空")
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 姓名 */
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@Size(min = 1, max = 100, message = "姓名长度不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
@Size(max = 50, message = "证件号长度不能超过50个字符")
|
||||
private String certificateNo;
|
||||
|
||||
/** 人员类型(中介、职业背债人、房产中介等) */
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型(本人、配偶等) */
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别(M男 F女 O其他) */
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号码(加密存储) */
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位/职务 */
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
private String indivRelation;
|
||||
|
||||
/** 状态 */
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单Excel导入导出对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryBlacklistExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 姓名/机构名称 */
|
||||
@ExcelProperty(value = "姓名/机构名称", index = 0)
|
||||
@ColumnWidth(20)
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
@ExcelProperty(value = "证件号", index = 1)
|
||||
@ColumnWidth(20)
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
@ExcelProperty(value = "中介类型", index = 2)
|
||||
@ColumnWidth(15)
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
@ExcelProperty(value = "状态", index = 3)
|
||||
@ColumnWidth(10)
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@ExcelProperty(value = "备注", index = 4)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
|
||||
/** 数据来源 */
|
||||
@ExcelProperty(value = "数据来源", index = 5)
|
||||
@ColumnWidth(15)
|
||||
private String dataSource;
|
||||
|
||||
// ===== 个人字段 =====
|
||||
|
||||
/** 人员类型 */
|
||||
@ExcelProperty(value = "人员类型", index = 6)
|
||||
@ColumnWidth(15)
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型 */
|
||||
@ExcelProperty(value = "人员子类型", index = 7)
|
||||
@ColumnWidth(15)
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别 */
|
||||
@ExcelProperty(value = "性别", index = 8)
|
||||
@ColumnWidth(10)
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
@ExcelProperty(value = "证件类型", index = 9)
|
||||
@ColumnWidth(15)
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号 */
|
||||
@ExcelProperty(value = "手机号", index = 10)
|
||||
@ColumnWidth(15)
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
@ExcelProperty(value = "微信号", index = 11)
|
||||
@ColumnWidth(15)
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
@ExcelProperty(value = "联系地址", index = 12)
|
||||
@ColumnWidth(30)
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
@ExcelProperty(value = "所在公司", index = 13)
|
||||
@ColumnWidth(20)
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位 */
|
||||
@ExcelProperty(value = "职位", index = 14)
|
||||
@ColumnWidth(15)
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
@ExcelProperty(value = "关联人员ID", index = 15)
|
||||
@ColumnWidth(15)
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
@ExcelProperty(value = "关联关系", index = 16)
|
||||
@ColumnWidth(15)
|
||||
private String indivRelation;
|
||||
|
||||
// ===== 机构字段 =====
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@ExcelProperty(value = "统一社会信用代码", index = 17)
|
||||
@ColumnWidth(20)
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型 */
|
||||
@ExcelProperty(value = "主体类型", index = 18)
|
||||
@ColumnWidth(15)
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质 */
|
||||
@ExcelProperty(value = "企业性质", index = 19)
|
||||
@ColumnWidth(15)
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
@ExcelProperty(value = "行业分类", index = 20)
|
||||
@ColumnWidth(15)
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
@ExcelProperty(value = "所属行业", index = 21)
|
||||
@ColumnWidth(15)
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
@ExcelProperty(value = "成立日期", index = 22)
|
||||
@ColumnWidth(15)
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
@ExcelProperty(value = "注册地址", index = 23)
|
||||
@ColumnWidth(30)
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
@ExcelProperty(value = "法定代表人", index = 24)
|
||||
@ColumnWidth(15)
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
@ExcelProperty(value = "法定代表人证件类型", index = 25)
|
||||
@ColumnWidth(20)
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
@ExcelProperty(value = "法定代表人证件号码", index = 26)
|
||||
@ColumnWidth(20)
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
@ExcelProperty(value = "股东1", index = 27)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
@ExcelProperty(value = "股东2", index = 28)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
@ExcelProperty(value = "股东3", index = 29)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
@ExcelProperty(value = "股东4", index = 30)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
@ExcelProperty(value = "股东5", index = 31)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder5;
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
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 lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 机构中介黑名单Excel导入对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryEntityExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "机构名称", index = 0)
|
||||
@ColumnWidth(25)
|
||||
private String name;
|
||||
|
||||
@ExcelProperty(value = "统一社会信用代码", index = 1)
|
||||
@ColumnWidth(20)
|
||||
private String corpCreditCode;
|
||||
|
||||
@ExcelProperty(value = "主体类型", index = 2)
|
||||
@ColumnWidth(20)
|
||||
@DictDropdown(dictType = "dpc_entity_type")
|
||||
private String corpType;
|
||||
|
||||
@ExcelProperty(value = "企业性质", index = 3)
|
||||
@ColumnWidth(15)
|
||||
@DictDropdown(dictType = "dpc_enterprise_nature")
|
||||
private String corpNature;
|
||||
|
||||
@ExcelProperty(value = "行业分类", index = 4)
|
||||
@ColumnWidth(15)
|
||||
private String corpIndustryCategory;
|
||||
|
||||
@ExcelProperty(value = "所属行业", index = 5)
|
||||
@ColumnWidth(15)
|
||||
private String corpIndustry;
|
||||
|
||||
@ExcelProperty(value = "成立日期", index = 6)
|
||||
@ColumnWidth(15)
|
||||
private String corpEstablishDate;
|
||||
|
||||
@ExcelProperty(value = "注册地址", index = 7)
|
||||
@ColumnWidth(40)
|
||||
private String corpAddress;
|
||||
|
||||
@ExcelProperty(value = "法定代表人", index = 8)
|
||||
@ColumnWidth(15)
|
||||
private String corpLegalRep;
|
||||
|
||||
@ExcelProperty(value = "法定代表人证件类型", index = 9)
|
||||
@ColumnWidth(20)
|
||||
private String corpLegalCertType;
|
||||
|
||||
@ExcelProperty(value = "法定代表人证件号码", index = 10)
|
||||
@ColumnWidth(20)
|
||||
private String corpLegalCertNo;
|
||||
|
||||
@ExcelProperty(value = "股东1", index = 11)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder1;
|
||||
|
||||
@ExcelProperty(value = "股东2", index = 12)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder2;
|
||||
|
||||
@ExcelProperty(value = "股东3", index = 13)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder3;
|
||||
|
||||
@ExcelProperty(value = "股东4", index = 14)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder4;
|
||||
|
||||
@ExcelProperty(value = "股东5", index = 15)
|
||||
@ColumnWidth(15)
|
||||
private String corpShareholder5;
|
||||
|
||||
@ExcelProperty(value = "备注", index = 16)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
|
||||
// 以下字段不在 Excel 中显示,由系统自动设置
|
||||
// private String status; // 默认:正常(0)
|
||||
// private String dataSource; // 默认:批量导入(IMPORT)
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
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 lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 个人中介黑名单Excel导入对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryPersonExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "姓名", index = 0)
|
||||
@ColumnWidth(15)
|
||||
private String name;
|
||||
|
||||
@ExcelProperty(value = "人员类型", index = 1)
|
||||
@ColumnWidth(15)
|
||||
private String indivType;
|
||||
|
||||
@ExcelProperty(value = "人员子类型", index = 2)
|
||||
@ColumnWidth(15)
|
||||
private String indivSubType;
|
||||
|
||||
@ExcelProperty(value = "性别", index = 3)
|
||||
@ColumnWidth(10)
|
||||
@DictDropdown(dictType = "dpc_indiv_gender")
|
||||
private String indivGender;
|
||||
|
||||
@ExcelProperty(value = "证件类型", index = 4)
|
||||
@ColumnWidth(15)
|
||||
@DictDropdown(dictType = "dpc_certificate_type")
|
||||
private String indivCertType;
|
||||
|
||||
@ExcelProperty(value = "证件号码", index = 5)
|
||||
@ColumnWidth(20)
|
||||
private String certificateNo;
|
||||
|
||||
@ExcelProperty(value = "手机号码", index = 6)
|
||||
@ColumnWidth(15)
|
||||
private String indivPhone;
|
||||
|
||||
@ExcelProperty(value = "微信号", index = 7)
|
||||
@ColumnWidth(15)
|
||||
private String indivWechat;
|
||||
|
||||
@ExcelProperty(value = "联系地址", index = 8)
|
||||
@ColumnWidth(30)
|
||||
private String indivAddress;
|
||||
|
||||
@ExcelProperty(value = "所在公司", index = 9)
|
||||
@ColumnWidth(20)
|
||||
private String indivCompany;
|
||||
|
||||
@ExcelProperty(value = "职位", index = 10)
|
||||
@ColumnWidth(15)
|
||||
private String indivPosition;
|
||||
|
||||
@ExcelProperty(value = "关联人员ID", index = 11)
|
||||
@ColumnWidth(15)
|
||||
private String indivRelatedId;
|
||||
|
||||
@ExcelProperty(value = "关联关系", index = 12)
|
||||
@ColumnWidth(15)
|
||||
private String indivRelation;
|
||||
|
||||
@ExcelProperty(value = "备注", index = 13)
|
||||
@ColumnWidth(30)
|
||||
private String remark;
|
||||
|
||||
// 以下字段不在 Excel 中显示,由系统自动设置
|
||||
// private String status; // 默认:正常(0)
|
||||
// private String dataSource; // 默认:批量导入(IMPORT)
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单视图对象 VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryBlacklistVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 中介ID */
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 姓名/机构名称 */
|
||||
private String name;
|
||||
|
||||
/** 证件号 */
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 数据来源 */
|
||||
private String dataSource;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 机构中介黑名单详情 VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryEntityDetailVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// ============================================================
|
||||
// 核心字段
|
||||
// ============================================================
|
||||
/** 中介ID */
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 机构名称 */
|
||||
private String name;
|
||||
|
||||
/** 证件号码 */
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 数据来源 */
|
||||
private String dataSource;
|
||||
|
||||
// ============================================================
|
||||
// 机构专属字段
|
||||
// ============================================================
|
||||
/** 统一社会信用代码 */
|
||||
private String corpCreditCode;
|
||||
|
||||
/** 主体类型 */
|
||||
private String corpType;
|
||||
|
||||
/** 企业性质 */
|
||||
private String corpNature;
|
||||
|
||||
/** 行业分类 */
|
||||
private String corpIndustryCategory;
|
||||
|
||||
/** 所属行业 */
|
||||
private String corpIndustry;
|
||||
|
||||
/** 成立日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date corpEstablishDate;
|
||||
|
||||
/** 注册地址 */
|
||||
private String corpAddress;
|
||||
|
||||
/** 法定代表人 */
|
||||
private String corpLegalRep;
|
||||
|
||||
/** 法定代表人证件类型 */
|
||||
private String corpLegalCertType;
|
||||
|
||||
/** 法定代表人证件号码 */
|
||||
private String corpLegalCertNo;
|
||||
|
||||
/** 股东1 */
|
||||
private String corpShareholder1;
|
||||
|
||||
/** 股东2 */
|
||||
private String corpShareholder2;
|
||||
|
||||
/** 股东3 */
|
||||
private String corpShareholder3;
|
||||
|
||||
/** 股东4 */
|
||||
private String corpShareholder4;
|
||||
|
||||
/** 股东5 */
|
||||
private String corpShareholder5;
|
||||
|
||||
// ============================================================
|
||||
// 审计字段
|
||||
// ============================================================
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.ruoyi.ccdi.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个人中介黑名单详情 VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
public class CcdiIntermediaryPersonDetailVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// ============================================================
|
||||
// 核心字段
|
||||
// ============================================================
|
||||
/** 中介ID */
|
||||
private Long intermediaryId;
|
||||
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
|
||||
/** 证件号码 */
|
||||
private String certificateNo;
|
||||
|
||||
/** 中介类型 */
|
||||
private String intermediaryType;
|
||||
|
||||
/** 状态 */
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 数据来源 */
|
||||
private String dataSource;
|
||||
|
||||
// ============================================================
|
||||
// 个人专属字段
|
||||
// ============================================================
|
||||
/** 人员类型 */
|
||||
private String indivType;
|
||||
|
||||
/** 人员子类型 */
|
||||
private String indivSubType;
|
||||
|
||||
/** 性别 */
|
||||
private String indivGender;
|
||||
|
||||
/** 证件类型 */
|
||||
private String indivCertType;
|
||||
|
||||
/** 手机号码 */
|
||||
private String indivPhone;
|
||||
|
||||
/** 微信号 */
|
||||
private String indivWechat;
|
||||
|
||||
/** 联系地址 */
|
||||
private String indivAddress;
|
||||
|
||||
/** 所在公司 */
|
||||
private String indivCompany;
|
||||
|
||||
/** 职位/职务 */
|
||||
private String indivPosition;
|
||||
|
||||
/** 关联人员ID */
|
||||
private String indivRelatedId;
|
||||
|
||||
/** 关联关系 */
|
||||
private String indivRelation;
|
||||
|
||||
// ============================================================
|
||||
// 审计字段
|
||||
// ============================================================
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.ruoyi.ccdi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.ccdi.domain.CcdiBizIntermediary;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 中介人员业务Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface CcdiBizIntermediaryMapper extends BaseMapper<CcdiBizIntermediary> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.ruoyi.ccdi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.ccdi.domain.CcdiEnterpriseBaseInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 企业基础信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface CcdiEnterpriseBaseInfoMapper extends BaseMapper<CcdiEnterpriseBaseInfo> {
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.ruoyi.ccdi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiIntermediaryBlacklist;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryBlacklistQueryDTO;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryBlacklistVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface CcdiIntermediaryBlacklistMapper extends BaseMapper<CcdiIntermediaryBlacklist> {
|
||||
|
||||
/**
|
||||
* 批量插入中介黑名单数据
|
||||
*
|
||||
* @param list 中介黑名单列表
|
||||
* @return 插入行数
|
||||
*/
|
||||
int batchInsert(@Param("list") List<CcdiIntermediaryBlacklist> list);
|
||||
|
||||
/**
|
||||
* 批量更新中介黑名单数据
|
||||
*
|
||||
* @param list 中介黑名单列表
|
||||
* @return 更新行数
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<CcdiIntermediaryBlacklist> list);
|
||||
|
||||
/**
|
||||
* 联合查询分页 - 个人和机构中介
|
||||
* 使用 UNION ALL 合并两张表的数据,在数据库层面完成分页
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryDTO 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
IPage<CcdiIntermediaryBlacklistVO> selectIntermediaryUnionPage(
|
||||
Page<CcdiIntermediaryBlacklistVO> page,
|
||||
@Param("queryDTO") CcdiIntermediaryBlacklistQueryDTO queryDTO
|
||||
);
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
package com.ruoyi.ccdi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiIntermediaryBlacklist;
|
||||
import com.ruoyi.ccdi.domain.dto.*;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryBlacklistExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryBlacklistVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单 服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
public interface ICcdiIntermediaryBlacklistService {
|
||||
|
||||
/**
|
||||
* 查询中介黑名单列表
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单集合
|
||||
*/
|
||||
List<CcdiIntermediaryBlacklistVO> selectIntermediaryList(CcdiIntermediaryBlacklistQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 分页查询中介黑名单列表
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单VO分页结果
|
||||
*/
|
||||
Page<CcdiIntermediaryBlacklistVO> selectIntermediaryPage(Page<CcdiIntermediaryBlacklist> page, CcdiIntermediaryBlacklistQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询中介黑名单列表(用于导出)
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单Excel实体集合
|
||||
*/
|
||||
List<CcdiIntermediaryBlacklistExcel> selectIntermediaryListForExport(CcdiIntermediaryBlacklistQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询中介黑名单详细
|
||||
*
|
||||
* @param intermediaryId 中介ID
|
||||
* @return 中介黑名单VO
|
||||
*/
|
||||
CcdiIntermediaryBlacklistVO selectIntermediaryById(Long intermediaryId);
|
||||
|
||||
/**
|
||||
* 新增中介黑名单(通用接口,不推荐使用)
|
||||
*
|
||||
* @param addDTO 新增DTO
|
||||
* @return 结果
|
||||
* @deprecated 请使用 insertPersonIntermediary 或 insertEntityIntermediary 代替
|
||||
*/
|
||||
@Deprecated
|
||||
int insertIntermediary(CcdiIntermediaryBlacklistAddDTO addDTO);
|
||||
|
||||
/**
|
||||
* 新增个人中介黑名单
|
||||
*
|
||||
* @param addDTO 个人中介新增DTO
|
||||
* @return 结果
|
||||
*/
|
||||
int insertPersonIntermediary(CcdiIntermediaryPersonAddDTO addDTO);
|
||||
|
||||
/**
|
||||
* 新增机构中介黑名单
|
||||
*
|
||||
* @param addDTO 机构中介新增DTO
|
||||
* @return 结果
|
||||
*/
|
||||
int insertEntityIntermediary(CcdiIntermediaryEntityAddDTO addDTO);
|
||||
|
||||
/**
|
||||
* 修改中介黑名单(通用接口,不推荐使用)
|
||||
*
|
||||
* @param editDTO 编辑DTO
|
||||
* @return 结果
|
||||
* @deprecated 请使用 updatePersonIntermediary 或 updateEntityIntermediary 代替
|
||||
*/
|
||||
@Deprecated
|
||||
int updateIntermediary(CcdiIntermediaryBlacklistEditDTO editDTO);
|
||||
|
||||
/**
|
||||
* 修改个人中介黑名单
|
||||
*
|
||||
* @param editDTO 个人中介编辑DTO
|
||||
* @return 结果
|
||||
*/
|
||||
int updatePersonIntermediary(CcdiIntermediaryPersonEditDTO editDTO);
|
||||
|
||||
/**
|
||||
* 修改机构中介黑名单
|
||||
*
|
||||
* @param editDTO 机构中介编辑DTO
|
||||
* @return 结果
|
||||
*/
|
||||
int updateEntityIntermediary(CcdiIntermediaryEntityEditDTO editDTO);
|
||||
|
||||
/**
|
||||
* 批量删除中介黑名单
|
||||
*
|
||||
* @param intermediaryIds 需要删除的中介ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteIntermediaryByIds(Long[] intermediaryIds);
|
||||
|
||||
/**
|
||||
* 导入中介黑名单数据
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @param isUpdateSupport 是否更新支持
|
||||
* @return 结果
|
||||
*/
|
||||
String importIntermediary(List<CcdiIntermediaryBlacklistExcel> excelList, Boolean isUpdateSupport);
|
||||
|
||||
/**
|
||||
* 根据中介类型获取详情(返回不同类型)
|
||||
*
|
||||
* @param intermediaryId 中介ID
|
||||
* @return 个人返回 CcdiIntermediaryPersonDetailVO,机构返回 CcdiIntermediaryEntityDetailVO
|
||||
*/
|
||||
Object selectIntermediaryDetailById(Long intermediaryId);
|
||||
|
||||
/**
|
||||
* 导入个人中介数据
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @param isUpdateSupport 是否更新支持
|
||||
* @return 结果
|
||||
*/
|
||||
String importPersonIntermediary(List<CcdiIntermediaryPersonExcel> excelList, Boolean isUpdateSupport);
|
||||
|
||||
/**
|
||||
* 导入机构中介数据
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @param isUpdateSupport 是否更新支持
|
||||
* @return 结果
|
||||
*/
|
||||
String importEntityIntermediary(List<CcdiIntermediaryEntityExcel> excelList, Boolean isUpdateSupport);
|
||||
}
|
||||
@@ -1,716 +0,0 @@
|
||||
package com.ruoyi.ccdi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiBizIntermediary;
|
||||
import com.ruoyi.ccdi.domain.CcdiEnterpriseBaseInfo;
|
||||
import com.ruoyi.ccdi.domain.CcdiIntermediaryBlacklist;
|
||||
import com.ruoyi.ccdi.domain.dto.*;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryBlacklistExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryBlacklistVO;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryPersonDetailVO;
|
||||
import com.ruoyi.ccdi.mapper.CcdiBizIntermediaryMapper;
|
||||
import com.ruoyi.ccdi.mapper.CcdiEnterpriseBaseInfoMapper;
|
||||
import com.ruoyi.ccdi.mapper.CcdiIntermediaryBlacklistMapper;
|
||||
import com.ruoyi.ccdi.service.ICcdiIntermediaryBlacklistService;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 中介人员黑名单 服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-27
|
||||
*/
|
||||
@Service
|
||||
public class CcdiIntermediaryBlacklistServiceImpl implements ICcdiIntermediaryBlacklistService {
|
||||
|
||||
@Resource
|
||||
private CcdiBizIntermediaryMapper bizIntermediaryMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiEnterpriseBaseInfoMapper enterpriseBaseInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiIntermediaryBlacklistMapper intermediaryBlacklistMapper;
|
||||
|
||||
/**
|
||||
* 查询中介黑名单列表
|
||||
* 同时查询个人中介和机构中介,合并返回
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单集合
|
||||
*/
|
||||
@Override
|
||||
public List<CcdiIntermediaryBlacklistVO> selectIntermediaryList(CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
List<CcdiIntermediaryBlacklistVO> resultList = new ArrayList<>();
|
||||
|
||||
// 查询个人中介
|
||||
if (StringUtils.isEmpty(queryDTO.getIntermediaryType()) || "1".equals(queryDTO.getIntermediaryType())) {
|
||||
LambdaQueryWrapper<CcdiBizIntermediary> personWrapper = buildPersonQueryWrapper(queryDTO);
|
||||
List<CcdiBizIntermediary> personList = bizIntermediaryMapper.selectList(personWrapper);
|
||||
personList.forEach(person -> resultList.add(convertPersonToVO(person)));
|
||||
}
|
||||
|
||||
// 查询机构中介
|
||||
if (StringUtils.isEmpty(queryDTO.getIntermediaryType()) || "2".equals(queryDTO.getIntermediaryType())) {
|
||||
LambdaQueryWrapper<CcdiEnterpriseBaseInfo> entityWrapper = buildEntityQueryWrapper(queryDTO);
|
||||
List<CcdiEnterpriseBaseInfo> entityList = enterpriseBaseInfoMapper.selectList(entityWrapper);
|
||||
entityList.forEach(entity -> resultList.add(convertEntityToVO(entity)));
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询中介黑名单列表
|
||||
* 使用 UNION ALL 在数据库层面完成分页,避免手动分页的性能问题
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单VO分页结果
|
||||
*/
|
||||
@Override
|
||||
public Page<CcdiIntermediaryBlacklistVO> selectIntermediaryPage(Page<CcdiIntermediaryBlacklist> page, CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
// 使用联合查询分页
|
||||
Page<CcdiIntermediaryBlacklistVO> voPage = new Page<>(page.getCurrent(), page.getSize());
|
||||
IPage<CcdiIntermediaryBlacklistVO> result = intermediaryBlacklistMapper.selectIntermediaryUnionPage(voPage, queryDTO);
|
||||
|
||||
return (Page<CcdiIntermediaryBlacklistVO>) result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中介黑名单列表(用于导出)
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 中介黑名单Excel实体集合
|
||||
*/
|
||||
@Override
|
||||
public List<CcdiIntermediaryBlacklistExcel> selectIntermediaryListForExport(CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
List<CcdiIntermediaryBlacklistExcel> excelList = new ArrayList<>();
|
||||
|
||||
// 查询个人中介
|
||||
LambdaQueryWrapper<CcdiBizIntermediary> personWrapper = buildPersonQueryWrapper(queryDTO);
|
||||
List<CcdiBizIntermediary> personList = bizIntermediaryMapper.selectList(personWrapper);
|
||||
personList.forEach(person -> {
|
||||
CcdiIntermediaryBlacklistExcel excel = new CcdiIntermediaryBlacklistExcel();
|
||||
convertPersonToExcel(person, excel);
|
||||
excelList.add(excel);
|
||||
});
|
||||
|
||||
// 查询机构中介
|
||||
LambdaQueryWrapper<CcdiEnterpriseBaseInfo> entityWrapper = buildEntityQueryWrapper(queryDTO);
|
||||
List<CcdiEnterpriseBaseInfo> entityList = enterpriseBaseInfoMapper.selectList(entityWrapper);
|
||||
entityList.forEach(entity -> {
|
||||
CcdiIntermediaryBlacklistExcel excel = new CcdiIntermediaryBlacklistExcel();
|
||||
convertEntityToExcel(entity, excel);
|
||||
excelList.add(excel);
|
||||
});
|
||||
|
||||
return excelList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询中介黑名单详细
|
||||
*
|
||||
* @param intermediaryId 中介ID
|
||||
* @return 中介黑名单VO
|
||||
*/
|
||||
@Override
|
||||
public CcdiIntermediaryBlacklistVO selectIntermediaryById(Long intermediaryId) {
|
||||
// 先查个人中介
|
||||
CcdiBizIntermediary person = bizIntermediaryMapper.selectById(intermediaryId);
|
||||
if (person != null) {
|
||||
return convertPersonToVO(person);
|
||||
}
|
||||
|
||||
// 再查机构中介(社会信用代码作为ID)
|
||||
// 注意:这里需要特殊处理,因为机构表的主键是字符串类型
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增中介黑名单(已废弃)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public int insertIntermediary(CcdiIntermediaryBlacklistAddDTO addDTO) {
|
||||
throw new UnsupportedOperationException("请使用类型专用的新增方法: insertPersonIntermediary 或 insertEntityIntermediary");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增个人中介黑名单
|
||||
* 插入到 ccdi_biz_intermediary 表
|
||||
*
|
||||
* @param addDTO 个人中介新增DTO
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPersonIntermediary(CcdiIntermediaryPersonAddDTO addDTO) {
|
||||
CcdiBizIntermediary bizIntermediary = new CcdiBizIntermediary();
|
||||
bizIntermediary.setName(addDTO.getName());
|
||||
bizIntermediary.setPersonId(addDTO.getCertificateNo());
|
||||
bizIntermediary.setPersonType(addDTO.getIndivType());
|
||||
bizIntermediary.setPersonSubType(addDTO.getIndivSubType());
|
||||
bizIntermediary.setGender(addDTO.getIndivGender());
|
||||
bizIntermediary.setIdType(StringUtils.isNotEmpty(addDTO.getIndivCertType()) ? addDTO.getIndivCertType() : "身份证");
|
||||
bizIntermediary.setMobile(addDTO.getIndivPhone());
|
||||
bizIntermediary.setWechatNo(addDTO.getIndivWechat());
|
||||
bizIntermediary.setContactAddress(addDTO.getIndivAddress());
|
||||
bizIntermediary.setCompany(addDTO.getIndivCompany());
|
||||
bizIntermediary.setPosition(addDTO.getIndivPosition());
|
||||
bizIntermediary.setRelatedNumId(addDTO.getIndivRelatedId());
|
||||
bizIntermediary.setRelationType(addDTO.getIndivRelation());
|
||||
bizIntermediary.setDateSource("MANUAL");
|
||||
bizIntermediary.setRemark(addDTO.getRemark());
|
||||
return bizIntermediaryMapper.insert(bizIntermediary);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机构中介黑名单
|
||||
* 插入到 ccdi_enterprise_base_info 表
|
||||
* 设置 risk_level 为高风险, ent_source 为中介
|
||||
*
|
||||
* @param addDTO 机构中介新增DTO
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEntityIntermediary(CcdiIntermediaryEntityAddDTO addDTO) {
|
||||
CcdiEnterpriseBaseInfo enterprise = new CcdiEnterpriseBaseInfo();
|
||||
enterprise.setSocialCreditCode(addDTO.getCorpCreditCode());
|
||||
enterprise.setEnterpriseName(addDTO.getName());
|
||||
enterprise.setEnterpriseType(addDTO.getCorpType());
|
||||
enterprise.setEnterpriseNature(addDTO.getCorpNature());
|
||||
enterprise.setIndustryClass(addDTO.getCorpIndustryCategory());
|
||||
enterprise.setIndustryName(addDTO.getCorpIndustry());
|
||||
enterprise.setEstablishDate(addDTO.getCorpEstablishDate());
|
||||
enterprise.setRegisterAddress(addDTO.getCorpAddress());
|
||||
enterprise.setLegalRepresentative(addDTO.getCorpLegalRep());
|
||||
enterprise.setLegalCertType(addDTO.getCorpLegalCertType());
|
||||
enterprise.setLegalCertNo(addDTO.getCorpLegalCertNo());
|
||||
enterprise.setShareholder1(addDTO.getCorpShareholder1());
|
||||
enterprise.setShareholder2(addDTO.getCorpShareholder2());
|
||||
enterprise.setShareholder3(addDTO.getCorpShareholder3());
|
||||
enterprise.setShareholder4(addDTO.getCorpShareholder4());
|
||||
enterprise.setShareholder5(addDTO.getCorpShareholder5());
|
||||
// 设置为高风险
|
||||
enterprise.setRiskLevel("1");
|
||||
// 设置来源为中介
|
||||
enterprise.setEntSource("INTERMEDIARY");
|
||||
enterprise.setDataSource("MANUAL");
|
||||
enterprise.setStatus(addDTO.getStatus());
|
||||
return enterpriseBaseInfoMapper.insert(enterprise);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改中介黑名单(已废弃)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public int updateIntermediary(CcdiIntermediaryBlacklistEditDTO editDTO) {
|
||||
throw new UnsupportedOperationException("请使用类型专用的修改方法: updatePersonIntermediary 或 updateEntityIntermediary");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人中介黑名单
|
||||
*
|
||||
* @param editDTO 个人中介编辑DTO
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePersonIntermediary(CcdiIntermediaryPersonEditDTO editDTO) {
|
||||
CcdiBizIntermediary bizIntermediary = new CcdiBizIntermediary();
|
||||
bizIntermediary.setBizId(editDTO.getIntermediaryId());
|
||||
bizIntermediary.setName(editDTO.getName());
|
||||
bizIntermediary.setPersonId(editDTO.getCertificateNo());
|
||||
bizIntermediary.setPersonType(editDTO.getIndivType());
|
||||
bizIntermediary.setPersonSubType(editDTO.getIndivSubType());
|
||||
bizIntermediary.setGender(editDTO.getIndivGender());
|
||||
bizIntermediary.setIdType(editDTO.getIndivCertType());
|
||||
bizIntermediary.setMobile(editDTO.getIndivPhone());
|
||||
bizIntermediary.setWechatNo(editDTO.getIndivWechat());
|
||||
bizIntermediary.setContactAddress(editDTO.getIndivAddress());
|
||||
bizIntermediary.setCompany(editDTO.getIndivCompany());
|
||||
bizIntermediary.setPosition(editDTO.getIndivPosition());
|
||||
bizIntermediary.setRelatedNumId(editDTO.getIndivRelatedId());
|
||||
bizIntermediary.setRelationType(editDTO.getIndivRelation());
|
||||
bizIntermediary.setRemark(editDTO.getRemark());
|
||||
return bizIntermediaryMapper.updateById(bizIntermediary);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机构中介黑名单
|
||||
*
|
||||
* @param editDTO 机构中介编辑DTO
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEntityIntermediary(CcdiIntermediaryEntityEditDTO editDTO) {
|
||||
CcdiEnterpriseBaseInfo enterprise = new CcdiEnterpriseBaseInfo();
|
||||
enterprise.setSocialCreditCode(editDTO.getCorpCreditCode());
|
||||
enterprise.setEnterpriseName(editDTO.getName());
|
||||
enterprise.setEnterpriseType(editDTO.getCorpType());
|
||||
enterprise.setEnterpriseNature(editDTO.getCorpNature());
|
||||
enterprise.setIndustryClass(editDTO.getCorpIndustryCategory());
|
||||
enterprise.setIndustryName(editDTO.getCorpIndustry());
|
||||
enterprise.setEstablishDate(editDTO.getCorpEstablishDate());
|
||||
enterprise.setRegisterAddress(editDTO.getCorpAddress());
|
||||
enterprise.setLegalRepresentative(editDTO.getCorpLegalRep());
|
||||
enterprise.setLegalCertType(editDTO.getCorpLegalCertType());
|
||||
enterprise.setLegalCertNo(editDTO.getCorpLegalCertNo());
|
||||
enterprise.setShareholder1(editDTO.getCorpShareholder1());
|
||||
enterprise.setShareholder2(editDTO.getCorpShareholder2());
|
||||
enterprise.setShareholder3(editDTO.getCorpShareholder3());
|
||||
enterprise.setShareholder4(editDTO.getCorpShareholder4());
|
||||
enterprise.setShareholder5(editDTO.getCorpShareholder5());
|
||||
enterprise.setStatus(editDTO.getStatus());
|
||||
enterprise.setRemark(editDTO.getRemark());
|
||||
return enterpriseBaseInfoMapper.updateById(enterprise);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除中介黑名单
|
||||
*
|
||||
* @param intermediaryIds 需要删除的中介ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteIntermediaryByIds(Long[] intermediaryIds) {
|
||||
// 同时删除两个表中的数据
|
||||
int count = 0;
|
||||
for (Long id : intermediaryIds) {
|
||||
// 尝试从个人表删除
|
||||
count += bizIntermediaryMapper.deleteById(id);
|
||||
}
|
||||
// 机构表需要按社会信用代码删除,这里暂时跳过
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入中介黑名单数据(已废弃)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String importIntermediary(List<CcdiIntermediaryBlacklistExcel> excelList, Boolean isUpdateSupport) {
|
||||
// 根据类型分别导入
|
||||
throw new UnsupportedOperationException("请使用类型专用的导入方法");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据中介ID获取详情(返回不同类型)
|
||||
*
|
||||
* @param intermediaryId 中介ID
|
||||
* @return 个人返回 CcdiIntermediaryPersonDetailVO,机构返回 CcdiIntermediaryEntityDetailVO
|
||||
*/
|
||||
@Override
|
||||
public Object selectIntermediaryDetailById(Long intermediaryId) {
|
||||
// 先查个人中介
|
||||
CcdiBizIntermediary person = bizIntermediaryMapper.selectById(intermediaryId);
|
||||
if (person != null) {
|
||||
return convertPersonToDetailVO(person);
|
||||
}
|
||||
|
||||
// 机构中介需要通过其他方式查询
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入个人中介数据
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @param isUpdateSupport 是否更新支持
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String importPersonIntermediary(List<CcdiIntermediaryPersonExcel> excelList, Boolean isUpdateSupport) {
|
||||
if (excelList == null || excelList.isEmpty()) {
|
||||
return "至少需要一条数据";
|
||||
}
|
||||
|
||||
List<CcdiBizIntermediary> toInsertList = new ArrayList<>();
|
||||
List<CcdiBizIntermediary> toUpdateList = new ArrayList<>();
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
|
||||
// 批量查询已存在的记录
|
||||
Set<String> existingCertNos = new HashSet<>();
|
||||
Map<String, Long> certNoToIdMap = new HashMap<>();
|
||||
for (CcdiIntermediaryPersonExcel excel : excelList) {
|
||||
if (StringUtils.isNotEmpty(excel.getCertificateNo())) {
|
||||
existingCertNos.add(excel.getCertificateNo());
|
||||
}
|
||||
}
|
||||
if (!existingCertNos.isEmpty()) {
|
||||
LambdaQueryWrapper<CcdiBizIntermediary> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(CcdiBizIntermediary::getPersonId, existingCertNos)
|
||||
.select(CcdiBizIntermediary::getBizId, CcdiBizIntermediary::getPersonId);
|
||||
List<CcdiBizIntermediary> existingList = bizIntermediaryMapper.selectList(wrapper);
|
||||
for (CcdiBizIntermediary existing : existingList) {
|
||||
certNoToIdMap.put(existing.getPersonId(), existing.getBizId());
|
||||
}
|
||||
}
|
||||
|
||||
// 唯一性校验
|
||||
if (!isUpdateSupport) {
|
||||
for (CcdiIntermediaryPersonExcel excel : excelList) {
|
||||
if (StringUtils.isNotEmpty(excel.getCertificateNo()) && certNoToIdMap.containsKey(excel.getCertificateNo())) {
|
||||
throw new RuntimeException("证件号 " + excel.getCertificateNo() + " 已存在,请勿重复导入");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理每条数据
|
||||
for (int i = 0; i < excelList.size(); i++) {
|
||||
CcdiIntermediaryPersonExcel excel = excelList.get(i);
|
||||
try {
|
||||
// 验证数据
|
||||
if (StringUtils.isEmpty(excel.getName())) {
|
||||
throw new RuntimeException("姓名不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getCertificateNo())) {
|
||||
throw new RuntimeException("证件号码不能为空");
|
||||
}
|
||||
|
||||
// 转换为实体
|
||||
CcdiBizIntermediary intermediary = new CcdiBizIntermediary();
|
||||
intermediary.setName(excel.getName());
|
||||
intermediary.setPersonId(excel.getCertificateNo());
|
||||
intermediary.setPersonType(excel.getIndivType());
|
||||
intermediary.setPersonSubType(excel.getIndivSubType());
|
||||
intermediary.setGender(excel.getIndivGender());
|
||||
intermediary.setIdType(StringUtils.isNotEmpty(excel.getIndivCertType()) ? excel.getIndivCertType() : "身份证");
|
||||
intermediary.setMobile(excel.getIndivPhone());
|
||||
intermediary.setWechatNo(excel.getIndivWechat());
|
||||
intermediary.setContactAddress(excel.getIndivAddress());
|
||||
intermediary.setCompany(excel.getIndivCompany());
|
||||
intermediary.setPosition(excel.getIndivPosition());
|
||||
intermediary.setRelatedNumId(excel.getIndivRelatedId());
|
||||
intermediary.setRelationType(excel.getIndivRelation());
|
||||
intermediary.setDateSource("IMPORT");
|
||||
intermediary.setRemark(excel.getRemark());
|
||||
|
||||
// 检查是否需要更新
|
||||
if (isUpdateSupport && StringUtils.isNotEmpty(excel.getCertificateNo()) && certNoToIdMap.containsKey(excel.getCertificateNo())) {
|
||||
intermediary.setBizId(certNoToIdMap.get(excel.getCertificateNo()));
|
||||
toUpdateList.add(intermediary);
|
||||
} else {
|
||||
toInsertList.add(intermediary);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errorMessages.add("第" + (i + 1) + "行导入失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// 批量执行数据库操作
|
||||
int successNum = 0;
|
||||
int failureNum = errorMessages.size();
|
||||
|
||||
for (CcdiBizIntermediary intermediary : toInsertList) {
|
||||
bizIntermediaryMapper.insert(intermediary);
|
||||
successNum++;
|
||||
}
|
||||
|
||||
for (CcdiBizIntermediary intermediary : toUpdateList) {
|
||||
bizIntermediaryMapper.updateById(intermediary);
|
||||
successNum++;
|
||||
}
|
||||
|
||||
// 构建失败消息
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (String error : errorMessages) {
|
||||
failureMsg.append("<br/>").append(error);
|
||||
}
|
||||
|
||||
// 返回结果
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new RuntimeException(failureMsg.toString());
|
||||
} else {
|
||||
return "恭喜您,数据已全部导入成功!共 " + successNum + " 条";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入机构中介数据
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @param isUpdateSupport 是否更新支持
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String importEntityIntermediary(List<CcdiIntermediaryEntityExcel> excelList, Boolean isUpdateSupport) {
|
||||
if (excelList == null || excelList.isEmpty()) {
|
||||
return "至少需要一条数据";
|
||||
}
|
||||
|
||||
List<CcdiEnterpriseBaseInfo> toInsertList = new ArrayList<>();
|
||||
List<CcdiEnterpriseBaseInfo> toUpdateList = new ArrayList<>();
|
||||
List<String> errorMessages = new ArrayList<>();
|
||||
|
||||
// 批量查询已存在的记录
|
||||
Set<String> existingCreditCodes = new HashSet<>();
|
||||
for (CcdiIntermediaryEntityExcel excel : excelList) {
|
||||
if (StringUtils.isNotEmpty(excel.getCorpCreditCode())) {
|
||||
existingCreditCodes.add(excel.getCorpCreditCode());
|
||||
}
|
||||
}
|
||||
|
||||
// 唯一性校验
|
||||
if (!isUpdateSupport) {
|
||||
for (CcdiIntermediaryEntityExcel excel : excelList) {
|
||||
if (StringUtils.isNotEmpty(excel.getCorpCreditCode())) {
|
||||
CcdiEnterpriseBaseInfo existing = enterpriseBaseInfoMapper.selectById(excel.getCorpCreditCode());
|
||||
if (existing != null) {
|
||||
throw new RuntimeException("统一社会信用代码 " + excel.getCorpCreditCode() + " 已存在,请勿重复导入");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
// 处理每条数据
|
||||
for (int i = 0; i < excelList.size(); i++) {
|
||||
CcdiIntermediaryEntityExcel excel = excelList.get(i);
|
||||
try {
|
||||
// 验证数据
|
||||
if (StringUtils.isEmpty(excel.getName())) {
|
||||
throw new RuntimeException("机构名称不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getCorpCreditCode())) {
|
||||
throw new RuntimeException("统一社会信用代码不能为空");
|
||||
}
|
||||
|
||||
// 转换为实体
|
||||
CcdiEnterpriseBaseInfo enterprise = new CcdiEnterpriseBaseInfo();
|
||||
enterprise.setSocialCreditCode(excel.getCorpCreditCode());
|
||||
enterprise.setEnterpriseName(excel.getName());
|
||||
enterprise.setEnterpriseType(excel.getCorpType());
|
||||
enterprise.setEnterpriseNature(excel.getCorpNature());
|
||||
enterprise.setIndustryClass(excel.getCorpIndustryCategory());
|
||||
enterprise.setIndustryName(excel.getCorpIndustry());
|
||||
|
||||
// 解析成立日期
|
||||
if (StringUtils.isNotEmpty(excel.getCorpEstablishDate())) {
|
||||
try {
|
||||
enterprise.setEstablishDate(sdf.parse(excel.getCorpEstablishDate()));
|
||||
} catch (Exception e) {
|
||||
// 忽略日期解析错误
|
||||
}
|
||||
}
|
||||
|
||||
enterprise.setRegisterAddress(excel.getCorpAddress());
|
||||
enterprise.setLegalRepresentative(excel.getCorpLegalRep());
|
||||
enterprise.setLegalCertType(excel.getCorpLegalCertType());
|
||||
enterprise.setLegalCertNo(excel.getCorpLegalCertNo());
|
||||
enterprise.setShareholder1(excel.getCorpShareholder1());
|
||||
enterprise.setShareholder2(excel.getCorpShareholder2());
|
||||
enterprise.setShareholder3(excel.getCorpShareholder3());
|
||||
enterprise.setShareholder4(excel.getCorpShareholder4());
|
||||
enterprise.setShareholder5(excel.getCorpShareholder5());
|
||||
|
||||
// 设置为高风险
|
||||
enterprise.setRiskLevel("1");
|
||||
// 设置来源为中介
|
||||
enterprise.setEntSource("INTERMEDIARY");
|
||||
enterprise.setDataSource("IMPORT");
|
||||
enterprise.setStatus("0");
|
||||
enterprise.setRemark(excel.getRemark());
|
||||
|
||||
// 检查是否需要更新
|
||||
if (isUpdateSupport && StringUtils.isNotEmpty(excel.getCorpCreditCode())) {
|
||||
toUpdateList.add(enterprise);
|
||||
} else {
|
||||
toInsertList.add(enterprise);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errorMessages.add("第" + (i + 1) + "行导入失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// 批量执行数据库操作
|
||||
int successNum = 0;
|
||||
int failureNum = errorMessages.size();
|
||||
|
||||
for (CcdiEnterpriseBaseInfo enterprise : toInsertList) {
|
||||
enterpriseBaseInfoMapper.insert(enterprise);
|
||||
successNum++;
|
||||
}
|
||||
|
||||
for (CcdiEnterpriseBaseInfo enterprise : toUpdateList) {
|
||||
enterpriseBaseInfoMapper.updateById(enterprise);
|
||||
successNum++;
|
||||
}
|
||||
|
||||
// 构建失败消息
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (String error : errorMessages) {
|
||||
failureMsg.append("<br/>").append(error);
|
||||
}
|
||||
|
||||
// 返回结果
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new RuntimeException(failureMsg.toString());
|
||||
} else {
|
||||
return "恭喜您,数据已全部导入成功!共 " + successNum + " 条";
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 私有辅助方法 ====================
|
||||
|
||||
/**
|
||||
* 构建个人中介查询条件
|
||||
*/
|
||||
private LambdaQueryWrapper<CcdiBizIntermediary> buildPersonQueryWrapper(CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
LambdaQueryWrapper<CcdiBizIntermediary> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotEmpty(queryDTO.getName()), CcdiBizIntermediary::getName, queryDTO.getName())
|
||||
.like(StringUtils.isNotEmpty(queryDTO.getCertificateNo()), CcdiBizIntermediary::getPersonId, queryDTO.getCertificateNo())
|
||||
.orderByDesc(CcdiBizIntermediary::getCreateTime);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建机构中介查询条件
|
||||
*/
|
||||
private LambdaQueryWrapper<CcdiEnterpriseBaseInfo> buildEntityQueryWrapper(CcdiIntermediaryBlacklistQueryDTO queryDTO) {
|
||||
LambdaQueryWrapper<CcdiEnterpriseBaseInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotEmpty(queryDTO.getName()), CcdiEnterpriseBaseInfo::getEnterpriseName, queryDTO.getName())
|
||||
.like(StringUtils.isNotEmpty(queryDTO.getCertificateNo()), CcdiEnterpriseBaseInfo::getSocialCreditCode, queryDTO.getCertificateNo())
|
||||
.eq(CcdiEnterpriseBaseInfo::getEntSource, "INTERMEDIARY")
|
||||
.orderByDesc(CcdiEnterpriseBaseInfo::getCreateTime);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换个人中介为VO
|
||||
*/
|
||||
private CcdiIntermediaryBlacklistVO convertPersonToVO(CcdiBizIntermediary person) {
|
||||
if (person == null) {
|
||||
return null;
|
||||
}
|
||||
CcdiIntermediaryBlacklistVO vo = new CcdiIntermediaryBlacklistVO();
|
||||
vo.setIntermediaryId(person.getBizId());
|
||||
vo.setName(person.getName());
|
||||
vo.setCertificateNo(person.getPersonId());
|
||||
vo.setIntermediaryType("1");
|
||||
vo.setStatus("0");
|
||||
vo.setDataSource(person.getDateSource());
|
||||
vo.setCreateTime(person.getCreateTime());
|
||||
vo.setUpdateTime(person.getUpdateTime());
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换机构中介为VO
|
||||
*/
|
||||
private CcdiIntermediaryBlacklistVO convertEntityToVO(CcdiEnterpriseBaseInfo entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
CcdiIntermediaryBlacklistVO vo = new CcdiIntermediaryBlacklistVO();
|
||||
// 社会信用代码转为数字ID(仅用于显示)
|
||||
vo.setIntermediaryId(0L);
|
||||
vo.setName(entity.getEnterpriseName());
|
||||
vo.setCertificateNo(entity.getSocialCreditCode());
|
||||
vo.setIntermediaryType("2");
|
||||
vo.setStatus(entity.getStatus());
|
||||
vo.setDataSource(entity.getDataSource());
|
||||
vo.setCreateTime(entity.getCreateTime());
|
||||
vo.setUpdateTime(entity.getUpdateTime());
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换个人中介为详情VO
|
||||
*/
|
||||
private CcdiIntermediaryPersonDetailVO convertPersonToDetailVO(CcdiBizIntermediary person) {
|
||||
if (person == null) {
|
||||
return null;
|
||||
}
|
||||
CcdiIntermediaryPersonDetailVO vo = new CcdiIntermediaryPersonDetailVO();
|
||||
vo.setIntermediaryId(person.getBizId());
|
||||
vo.setName(person.getName());
|
||||
vo.setCertificateNo(person.getPersonId());
|
||||
vo.setIntermediaryType("1");
|
||||
vo.setStatus("0");
|
||||
vo.setRemark(person.getRemark());
|
||||
vo.setDataSource(person.getDateSource());
|
||||
vo.setCreateBy(person.getCreatedBy());
|
||||
vo.setCreateTime(person.getCreateTime());
|
||||
vo.setUpdateBy(person.getUpdatedBy());
|
||||
vo.setUpdateTime(person.getUpdateTime());
|
||||
|
||||
vo.setIndivType(person.getPersonType());
|
||||
vo.setIndivSubType(person.getPersonSubType());
|
||||
vo.setIndivGender(person.getGender());
|
||||
vo.setIndivCertType(person.getIdType());
|
||||
vo.setIndivPhone(person.getMobile());
|
||||
vo.setIndivWechat(person.getWechatNo());
|
||||
vo.setIndivAddress(person.getContactAddress());
|
||||
vo.setIndivCompany(person.getCompany());
|
||||
vo.setIndivPosition(person.getPosition());
|
||||
vo.setIndivRelatedId(person.getRelatedNumId());
|
||||
vo.setIndivRelation(person.getRelationType());
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换个人中介为Excel
|
||||
*/
|
||||
private void convertPersonToExcel(CcdiBizIntermediary person, CcdiIntermediaryBlacklistExcel excel) {
|
||||
excel.setName(person.getName());
|
||||
excel.setCertificateNo(person.getPersonId());
|
||||
excel.setIntermediaryType("1");
|
||||
excel.setStatus("0");
|
||||
excel.setRemark(person.getRemark());
|
||||
excel.setDataSource(person.getDateSource());
|
||||
|
||||
excel.setIndivType(person.getPersonType());
|
||||
excel.setIndivSubType(person.getPersonSubType());
|
||||
excel.setIndivGender(person.getGender());
|
||||
excel.setIndivCertType(person.getIdType());
|
||||
excel.setIndivPhone(person.getMobile());
|
||||
excel.setIndivWechat(person.getWechatNo());
|
||||
excel.setIndivAddress(person.getContactAddress());
|
||||
excel.setIndivCompany(person.getCompany());
|
||||
excel.setIndivPosition(person.getPosition());
|
||||
excel.setIndivRelatedId(person.getRelatedNumId());
|
||||
excel.setIndivRelation(person.getRelationType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换机构中介为Excel
|
||||
*/
|
||||
private void convertEntityToExcel(CcdiEnterpriseBaseInfo entity, CcdiIntermediaryBlacklistExcel excel) {
|
||||
excel.setName(entity.getEnterpriseName());
|
||||
excel.setCertificateNo(entity.getSocialCreditCode());
|
||||
excel.setIntermediaryType("2");
|
||||
excel.setStatus(entity.getStatus());
|
||||
excel.setRemark(entity.getRemark());
|
||||
excel.setDataSource(entity.getDataSource());
|
||||
|
||||
excel.setCorpCreditCode(entity.getSocialCreditCode());
|
||||
excel.setCorpType(entity.getEnterpriseType());
|
||||
excel.setCorpNature(entity.getEnterpriseNature());
|
||||
excel.setCorpIndustryCategory(entity.getIndustryClass());
|
||||
excel.setCorpIndustry(entity.getIndustryName());
|
||||
excel.setCorpEstablishDate(entity.getEstablishDate());
|
||||
excel.setCorpAddress(entity.getRegisterAddress());
|
||||
excel.setCorpLegalRep(entity.getLegalRepresentative());
|
||||
excel.setCorpLegalCertType(entity.getLegalCertType());
|
||||
excel.setCorpLegalCertNo(entity.getLegalCertNo());
|
||||
excel.setCorpShareholder1(entity.getShareholder1());
|
||||
excel.setCorpShareholder2(entity.getShareholder2());
|
||||
excel.setCorpShareholder3(entity.getShareholder3());
|
||||
excel.setCorpShareholder4(entity.getShareholder4());
|
||||
excel.setCorpShareholder5(entity.getShareholder5());
|
||||
}
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
<?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.ruoyi.ccdi.mapper.CcdiIntermediaryBlacklistMapper">
|
||||
|
||||
<!-- 批量插入中介黑名单数据 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO ccdi_intermediary_blacklist (
|
||||
name,
|
||||
certificate_no,
|
||||
intermediary_type,
|
||||
status,
|
||||
remark,
|
||||
indiv_type,
|
||||
indiv_sub_type,
|
||||
indiv_gender,
|
||||
indiv_cert_type,
|
||||
indiv_phone,
|
||||
indiv_wechat,
|
||||
indiv_address,
|
||||
indiv_company,
|
||||
indiv_position,
|
||||
indiv_related_id,
|
||||
indiv_relation,
|
||||
corp_credit_code,
|
||||
corp_type,
|
||||
corp_nature,
|
||||
corp_industry_category,
|
||||
corp_industry,
|
||||
corp_establish_date,
|
||||
corp_address,
|
||||
corp_legal_rep,
|
||||
corp_legal_cert_type,
|
||||
corp_legal_cert_no,
|
||||
corp_shareholder_1,
|
||||
corp_shareholder_2,
|
||||
corp_shareholder_3,
|
||||
corp_shareholder_4,
|
||||
corp_shareholder_5,
|
||||
data_source,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.name},
|
||||
#{item.certificateNo},
|
||||
#{item.intermediaryType},
|
||||
#{item.status},
|
||||
#{item.remark},
|
||||
#{item.indivType},
|
||||
#{item.indivSubType},
|
||||
#{item.indivGender},
|
||||
#{item.indivCertType},
|
||||
#{item.indivPhone},
|
||||
#{item.indivWechat},
|
||||
#{item.indivAddress},
|
||||
#{item.indivCompany},
|
||||
#{item.indivPosition},
|
||||
#{item.indivRelatedId},
|
||||
#{item.indivRelation},
|
||||
#{item.corpCreditCode},
|
||||
#{item.corpType},
|
||||
#{item.corpNature},
|
||||
#{item.corpIndustryCategory},
|
||||
#{item.corpIndustry},
|
||||
#{item.corpEstablishDate},
|
||||
#{item.corpAddress},
|
||||
#{item.corpLegalRep},
|
||||
#{item.corpLegalCertType},
|
||||
#{item.corpLegalCertNo},
|
||||
#{item.corpShareholder1},
|
||||
#{item.corpShareholder2},
|
||||
#{item.corpShareholder3},
|
||||
#{item.corpShareholder4},
|
||||
#{item.corpShareholder5},
|
||||
#{item.dataSource},
|
||||
#{item.createBy},
|
||||
#{item.createTime},
|
||||
#{item.updateBy},
|
||||
#{item.updateTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 批量更新中介黑名单数据 -->
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
UPDATE ccdi_intermediary_blacklist
|
||||
<set>
|
||||
<if test="item.name != null">name = #{item.name},</if>
|
||||
<if test="item.certificateNo != null">certificate_no = #{item.certificateNo},</if>
|
||||
<if test="item.intermediaryType != null">intermediary_type = #{item.intermediaryType},</if>
|
||||
<if test="item.status != null">status = #{item.status},</if>
|
||||
<if test="item.remark != null">remark = #{item.remark},</if>
|
||||
<if test="item.indivType != null">indiv_type = #{item.indivType},</if>
|
||||
<if test="item.indivSubType != null">indiv_sub_type = #{item.indivSubType},</if>
|
||||
<if test="item.indivGender != null">indiv_gender = #{item.indivGender},</if>
|
||||
<if test="item.indivCertType != null">indiv_cert_type = #{item.indivCertType},</if>
|
||||
<if test="item.indivPhone != null">indiv_phone = #{item.indivPhone},</if>
|
||||
<if test="item.indivWechat != null">indiv_wechat = #{item.indivWechat},</if>
|
||||
<if test="item.indivAddress != null">indiv_address = #{item.indivAddress},</if>
|
||||
<if test="item.indivCompany != null">indiv_company = #{item.indivCompany},</if>
|
||||
<if test="item.indivPosition != null">indiv_position = #{item.indivPosition},</if>
|
||||
<if test="item.indivRelatedId != null">indiv_related_id = #{item.indivRelatedId},</if>
|
||||
<if test="item.indivRelation != null">indiv_relation = #{item.indivRelation},</if>
|
||||
<if test="item.corpCreditCode != null">corp_credit_code = #{item.corpCreditCode},</if>
|
||||
<if test="item.corpType != null">corp_type = #{item.corpType},</if>
|
||||
<if test="item.corpNature != null">corp_nature = #{item.corpNature},</if>
|
||||
<if test="item.corpIndustryCategory != null">corp_industry_category = #{item.corpIndustryCategory},</if>
|
||||
<if test="item.corpIndustry != null">corp_industry = #{item.corpIndustry},</if>
|
||||
<if test="item.corpEstablishDate != null">corp_establish_date = #{item.corpEstablishDate},</if>
|
||||
<if test="item.corpAddress != null">corp_address = #{item.corpAddress},</if>
|
||||
<if test="item.corpLegalRep != null">corp_legal_rep = #{item.corpLegalRep},</if>
|
||||
<if test="item.corpLegalCertType != null">corp_legal_cert_type = #{item.corpLegalCertType},</if>
|
||||
<if test="item.corpLegalCertNo != null">corp_legal_cert_no = #{item.corpLegalCertNo},</if>
|
||||
<if test="item.corpShareholder1 != null">corp_shareholder_1 = #{item.corpShareholder1},</if>
|
||||
<if test="item.corpShareholder2 != null">corp_shareholder_2 = #{item.corpShareholder2},</if>
|
||||
<if test="item.corpShareholder3 != null">corp_shareholder_3 = #{item.corpShareholder3},</if>
|
||||
<if test="item.corpShareholder4 != null">corp_shareholder_4 = #{item.corpShareholder4},</if>
|
||||
<if test="item.corpShareholder5 != null">corp_shareholder_5 = #{item.corpShareholder5},</if>
|
||||
<if test="item.dataSource != null">data_source = #{item.dataSource},</if>
|
||||
<if test="item.certificateNo != null">certificate_no = #{item.certificateNo},</if>
|
||||
update_by = #{item.updateBy},
|
||||
update_time = #{item.updateTime}
|
||||
</set>
|
||||
WHERE intermediary_id = #{item.intermediaryId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 联合查询分页 - 个人和机构中介 -->
|
||||
<select id="selectIntermediaryUnionPage" resultType="com.ruoyi.ccdi.domain.vo.CcdiIntermediaryBlacklistVO">
|
||||
SELECT * FROM (
|
||||
-- 个人中介查询
|
||||
SELECT
|
||||
biz_id AS intermediary_id,
|
||||
name,
|
||||
person_id AS certificate_no,
|
||||
'1' AS intermediary_type,
|
||||
'0' AS status,
|
||||
date_source AS data_source,
|
||||
create_time,
|
||||
update_time
|
||||
FROM ccdi_biz_intermediary
|
||||
WHERE 1=1
|
||||
<!-- 类型过滤: 只在查询个人或不指定类型时查询 -->
|
||||
<if test="queryDTO != null and queryDTO.intermediaryType != null and queryDTO.intermediaryType != ''">
|
||||
AND '1' = #{queryDTO.intermediaryType}
|
||||
</if>
|
||||
<if test="queryDTO != null">
|
||||
<if test="queryDTO.name != null and queryDTO.name != ''">
|
||||
AND name LIKE CONCAT('%', #{queryDTO.name}, '%')
|
||||
</if>
|
||||
<if test="queryDTO.certificateNo != null and queryDTO.certificateNo != ''">
|
||||
AND person_id LIKE CONCAT('%', #{queryDTO.certificateNo}, '%')
|
||||
</if>
|
||||
</if>
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- 机构中介查询
|
||||
SELECT
|
||||
0 AS intermediary_id,
|
||||
enterprise_name AS name,
|
||||
social_credit_code AS certificate_no,
|
||||
'2' AS intermediary_type,
|
||||
status,
|
||||
data_source,
|
||||
create_time,
|
||||
update_time
|
||||
FROM ccdi_enterprise_base_info
|
||||
WHERE ent_source = 'INTERMEDIARY'
|
||||
<!-- 类型过滤: 只在查询机构或不指定类型时查询 -->
|
||||
<if test="queryDTO != null and queryDTO.intermediaryType != null and queryDTO.intermediaryType != ''">
|
||||
AND '2' = #{queryDTO.intermediaryType}
|
||||
</if>
|
||||
<if test="queryDTO != null">
|
||||
<if test="queryDTO.name != null and queryDTO.name != ''">
|
||||
AND enterprise_name LIKE CONCAT('%', #{queryDTO.name}, '%')
|
||||
</if>
|
||||
<if test="queryDTO.certificateNo != null and queryDTO.certificateNo != ''">
|
||||
AND social_credit_code LIKE CONCAT('%', #{queryDTO.certificateNo}, '%')
|
||||
</if>
|
||||
</if>
|
||||
) AS combined_data
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user