Compare commits
4 Commits
5aaf6c83be
...
dev-ui
| Author | SHA1 | Date | |
|---|---|---|---|
| addea20fa1 | |||
| d4ac165723 | |||
| 1bb24ab0a2 | |||
| 9c22e8a3ce |
@@ -0,0 +1,181 @@
|
||||
package com.ruoyi.info.collection.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiAccountInfoExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.AccountInfoImportFailureVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountInfoVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiBaseStaffOptionVO;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportResult;
|
||||
import com.ruoyi.info.collection.service.ICcdiAccountInfoService;
|
||||
import com.ruoyi.info.collection.service.ICcdiBaseStaffService;
|
||||
import com.ruoyi.info.collection.utils.EasyExcelUtil;
|
||||
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.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 账户库Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Tag(name = "账户库管理")
|
||||
@RestController
|
||||
@RequestMapping("/ccdi/accountInfo")
|
||||
public class CcdiAccountInfoController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ICcdiAccountInfoService accountInfoService;
|
||||
|
||||
@Resource
|
||||
private ICcdiBaseStaffService baseStaffService;
|
||||
|
||||
/**
|
||||
* 查询账户库列表
|
||||
*/
|
||||
@Operation(summary = "查询账户库列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CcdiAccountInfoQueryDTO queryDTO) {
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Page<CcdiAccountInfoVO> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
Page<CcdiAccountInfoVO> result = accountInfoService.selectAccountInfoPage(page, queryDTO);
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户库详情
|
||||
*/
|
||||
@Operation(summary = "查询账户库详情")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return success(accountInfoService.selectAccountInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出账户库列表
|
||||
*/
|
||||
@Operation(summary = "导出账户库列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:export')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiAccountInfoQueryDTO queryDTO) {
|
||||
List<CcdiAccountInfoExcel> list = accountInfoService.selectAccountInfoListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiAccountInfoExcel.class, "账户库管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增账户
|
||||
*/
|
||||
@Operation(summary = "新增账户")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:add')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody CcdiAccountInfoAddDTO addDTO) {
|
||||
return toAjax(accountInfoService.insertAccountInfo(addDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改账户
|
||||
*/
|
||||
@Operation(summary = "修改账户")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:edit')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody CcdiAccountInfoEditDTO editDTO) {
|
||||
return toAjax(accountInfoService.updateAccountInfo(editDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除账户
|
||||
*/
|
||||
@Operation(summary = "删除账户")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:remove')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(accountInfoService.deleteAccountInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户归属员工下拉
|
||||
*/
|
||||
@Operation(summary = "查询账户归属员工下拉")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:list')")
|
||||
@GetMapping("/staffOptions")
|
||||
public AjaxResult getStaffOptions(@RequestParam(required = false) String query) {
|
||||
List<CcdiBaseStaffOptionVO> list = baseStaffService.selectStaffOptions(query);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询关系人下拉
|
||||
*/
|
||||
@Operation(summary = "查询关系人下拉")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:list')")
|
||||
@GetMapping("/relationOptions")
|
||||
public AjaxResult getRelationOptions(@RequestParam Long staffId) {
|
||||
return success(accountInfoService.selectRelationOptionsByStaffId(staffId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
*/
|
||||
@Operation(summary = "下载导入模板")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
EasyExcelUtil.importTemplateExcel(response, CcdiAccountInfoExcel.class, "账户库管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入账户库信息
|
||||
*/
|
||||
@Operation(summary = "导入账户库信息")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:import')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
List<CcdiAccountInfoExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiAccountInfoExcel.class);
|
||||
if (list == null || list.isEmpty()) {
|
||||
return error("至少需要一条数据");
|
||||
}
|
||||
ImportResult result = accountInfoService.importAccountInfo(list, updateSupport);
|
||||
List<AccountInfoImportFailureVO> failures = accountInfoService.getLatestImportFailures();
|
||||
Map<String, Object> data = new HashMap<>(4);
|
||||
data.put("totalCount", result.getTotalCount());
|
||||
data.put("successCount", result.getSuccessCount());
|
||||
data.put("failureCount", result.getFailureCount());
|
||||
data.put("failures", failures);
|
||||
String message = "导入完成,共 " + result.getTotalCount() + " 条,成功 " + result.getSuccessCount()
|
||||
+ " 条,失败 " + result.getFailureCount() + " 条";
|
||||
return AjaxResult.success(message, data);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentVO;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportResultVO;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportStatusVO;
|
||||
@@ -128,6 +129,15 @@ public class CcdiStaffRecruitmentController extends BaseController {
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiStaffRecruitmentExcel.class, "员工招聘信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载历史工作经历导入模板
|
||||
*/
|
||||
@Operation(summary = "下载历史工作经历导入模板")
|
||||
@PostMapping("/workImportTemplate")
|
||||
public void workImportTemplate(HttpServletResponse response) {
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiStaffRecruitmentWorkExcel.class, "历史工作经历");
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步导入招聘信息
|
||||
*/
|
||||
@@ -155,6 +165,31 @@ public class CcdiStaffRecruitmentController extends BaseController {
|
||||
return AjaxResult.success("导入任务已提交,正在后台处理", result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步导入历史工作经历
|
||||
*/
|
||||
@Operation(summary = "异步导入历史工作经历")
|
||||
@Parameter(name = "file", description = "导入文件", required = true)
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:staffRecruitment:import')")
|
||||
@Log(title = "员工招聘历史工作经历", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importWorkData")
|
||||
public AjaxResult importWorkData(@Parameter(description = "导入文件") MultipartFile file) throws Exception {
|
||||
List<CcdiStaffRecruitmentWorkExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiStaffRecruitmentWorkExcel.class);
|
||||
|
||||
if (list == null || list.isEmpty()) {
|
||||
return error("至少需要一条数据");
|
||||
}
|
||||
|
||||
String taskId = recruitmentService.importRecruitmentWork(list);
|
||||
|
||||
ImportResultVO result = new ImportResultVO();
|
||||
result.setTaskId(taskId);
|
||||
result.setStatus("PROCESSING");
|
||||
result.setMessage("历史工作经历导入任务已提交,正在后台处理");
|
||||
|
||||
return AjaxResult.success("历史工作经历导入任务已提交,正在后台处理", result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询导入状态
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.ruoyi.info.collection.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 com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户基础信息对象 ccdi_account_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_account_info")
|
||||
public class CcdiAccountInfo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(value = "account_id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 所属人类型:EMPLOYEE/RELATION/INTERMEDIARY/EXTERNAL */
|
||||
private String ownerType;
|
||||
|
||||
/** 所属人标识 */
|
||||
private String ownerId;
|
||||
|
||||
/** 账户号码 */
|
||||
private String accountNo;
|
||||
|
||||
/** 账户类型 */
|
||||
private String accountType;
|
||||
|
||||
/** 账户范围:INTERNAL/EXTERNAL */
|
||||
private String bankScope;
|
||||
|
||||
/** 账户姓名 */
|
||||
private String accountName;
|
||||
|
||||
/** 开户机构 */
|
||||
@TableField("bank")
|
||||
private String openBank;
|
||||
|
||||
/** 银行代码 */
|
||||
private String bankCode;
|
||||
|
||||
/** 币种 */
|
||||
private String currency;
|
||||
|
||||
/** 状态:1-正常 2-已销户 */
|
||||
private Integer status;
|
||||
|
||||
/** 生效日期 */
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 失效日期 */
|
||||
private Date invalidDate;
|
||||
|
||||
/** 创建者 */
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.ruoyi.info.collection.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 com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户分析结果对象 ccdi_account_result
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_account_result")
|
||||
public class CcdiAccountResult implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@TableId(value = "result_id", type = IdType.AUTO)
|
||||
private Long resultId;
|
||||
|
||||
/** 账户号码 */
|
||||
private String accountNo;
|
||||
|
||||
/** 是否实控账户:0-否 1-是 */
|
||||
@TableField("is_self_account")
|
||||
private Integer isActualControl;
|
||||
|
||||
/** 月均交易笔数 */
|
||||
@TableField("monthly_avg_trans_count")
|
||||
private Integer avgMonthTxnCount;
|
||||
|
||||
/** 月均交易金额 */
|
||||
@TableField("monthly_avg_trans_amount")
|
||||
private BigDecimal avgMonthTxnAmount;
|
||||
|
||||
/** 交易频率等级 */
|
||||
@TableField("trans_freq_type")
|
||||
private String txnFrequencyLevel;
|
||||
|
||||
/** 借方单笔最高额 */
|
||||
@TableField("dr_max_single_amount")
|
||||
private BigDecimal debitSingleMaxAmount;
|
||||
|
||||
/** 贷方单笔最高额 */
|
||||
@TableField("cr_max_single_amount")
|
||||
private BigDecimal creditSingleMaxAmount;
|
||||
|
||||
/** 借方日累计最高额 */
|
||||
@TableField("dr_max_daily_amount")
|
||||
private BigDecimal debitDailyMaxAmount;
|
||||
|
||||
/** 贷方日累计最高额 */
|
||||
@TableField("cr_max_daily_amount")
|
||||
private BigDecimal creditDailyMaxAmount;
|
||||
|
||||
/** 风险等级 */
|
||||
@TableField("trans_risk_level")
|
||||
private String txnRiskLevel;
|
||||
|
||||
/** 创建者 */
|
||||
@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;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class CcdiStaffRecruitment implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 招聘项目编号 */
|
||||
/** 招聘记录编号 */
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String recruitId;
|
||||
|
||||
@@ -41,6 +41,9 @@ public class CcdiStaffRecruitment implements Serializable {
|
||||
/** 应聘人员姓名 */
|
||||
private String candName;
|
||||
|
||||
/** 招聘类型:SOCIAL-社招,CAMPUS-校招 */
|
||||
private String recruitType;
|
||||
|
||||
/** 应聘人员学历 */
|
||||
private String candEdu;
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.info.collection.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 com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 招聘记录历史工作经历对象 ccdi_staff_recruitment_work
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-15
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_staff_recruitment_work")
|
||||
public class CcdiStaffRecruitmentWork implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 关联招聘记录编号 */
|
||||
private String recruitId;
|
||||
|
||||
/** 排序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 工作单位 */
|
||||
private String companyName;
|
||||
|
||||
/** 所属部门 */
|
||||
private String departmentName;
|
||||
|
||||
/** 岗位名称 */
|
||||
private String positionName;
|
||||
|
||||
/** 入职年月 */
|
||||
private String jobStartMonth;
|
||||
|
||||
/** 离职年月 */
|
||||
private String jobEndMonth;
|
||||
|
||||
/** 离职原因 */
|
||||
private String departureReason;
|
||||
|
||||
/** 主要工作内容 */
|
||||
private String workContent;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 创建人 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/** 更新人 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Min;
|
||||
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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户库新增DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库新增")
|
||||
public class CcdiAccountInfoAddDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 所属人类型 */
|
||||
@NotBlank(message = "所属人类型不能为空")
|
||||
@Schema(description = "所属人类型")
|
||||
private String ownerType;
|
||||
|
||||
/** 所属人标识 */
|
||||
@Schema(description = "所属人标识")
|
||||
private String ownerId;
|
||||
|
||||
/** 账户号码 */
|
||||
@NotBlank(message = "账户号码不能为空")
|
||||
@Size(max = 240, message = "账户号码长度不能超过240个字符")
|
||||
@Schema(description = "账户号码")
|
||||
private String accountNo;
|
||||
|
||||
/** 账户类型 */
|
||||
@NotBlank(message = "账户类型不能为空")
|
||||
@Size(max = 30, message = "账户类型长度不能超过30个字符")
|
||||
@Schema(description = "账户类型")
|
||||
private String accountType;
|
||||
|
||||
/** 账户范围 */
|
||||
@NotBlank(message = "账户范围不能为空")
|
||||
@Size(max = 20, message = "账户范围长度不能超过20个字符")
|
||||
@Schema(description = "账户范围")
|
||||
private String bankScope;
|
||||
|
||||
/** 账户姓名 */
|
||||
@NotBlank(message = "账户姓名不能为空")
|
||||
@Size(max = 100, message = "账户姓名长度不能超过100个字符")
|
||||
@Schema(description = "账户姓名")
|
||||
private String accountName;
|
||||
|
||||
/** 开户机构 */
|
||||
@NotBlank(message = "开户机构不能为空")
|
||||
@Size(max = 100, message = "开户机构长度不能超过100个字符")
|
||||
@Schema(description = "开户机构")
|
||||
private String openBank;
|
||||
|
||||
/** 银行代码 */
|
||||
@Size(max = 20, message = "银行代码长度不能超过20个字符")
|
||||
@Schema(description = "银行代码")
|
||||
private String bankCode;
|
||||
|
||||
/** 币种 */
|
||||
@Size(max = 3, message = "币种长度不能超过3个字符")
|
||||
@Schema(description = "币种")
|
||||
private String currency;
|
||||
|
||||
/** 状态 */
|
||||
@NotNull(message = "状态不能为空")
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 生效日期 */
|
||||
@NotNull(message = "生效日期不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "生效日期")
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 失效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "失效日期")
|
||||
private Date invalidDate;
|
||||
|
||||
/** 是否实控账户 */
|
||||
@Schema(description = "是否实控账户")
|
||||
private Integer isActualControl;
|
||||
|
||||
/** 月均交易笔数 */
|
||||
@Min(value = 0, message = "月均交易笔数不能小于0")
|
||||
@Schema(description = "月均交易笔数")
|
||||
private Integer avgMonthTxnCount;
|
||||
|
||||
/** 月均交易金额 */
|
||||
@DecimalMin(value = "0", message = "月均交易金额不能小于0")
|
||||
@Schema(description = "月均交易金额")
|
||||
private BigDecimal avgMonthTxnAmount;
|
||||
|
||||
/** 频率等级 */
|
||||
@Size(max = 20, message = "频率等级长度不能超过20个字符")
|
||||
@Schema(description = "频率等级")
|
||||
private String txnFrequencyLevel;
|
||||
|
||||
/** 借方单笔最高额 */
|
||||
@DecimalMin(value = "0", message = "借方单笔最高额不能小于0")
|
||||
@Schema(description = "借方单笔最高额")
|
||||
private BigDecimal debitSingleMaxAmount;
|
||||
|
||||
/** 贷方单笔最高额 */
|
||||
@DecimalMin(value = "0", message = "贷方单笔最高额不能小于0")
|
||||
@Schema(description = "贷方单笔最高额")
|
||||
private BigDecimal creditSingleMaxAmount;
|
||||
|
||||
/** 借方日累计最高额 */
|
||||
@DecimalMin(value = "0", message = "借方日累计最高额不能小于0")
|
||||
@Schema(description = "借方日累计最高额")
|
||||
private BigDecimal debitDailyMaxAmount;
|
||||
|
||||
/** 贷方日累计最高额 */
|
||||
@DecimalMin(value = "0", message = "贷方日累计最高额不能小于0")
|
||||
@Schema(description = "贷方日累计最高额")
|
||||
private BigDecimal creditDailyMaxAmount;
|
||||
|
||||
/** 风险等级 */
|
||||
@Size(max = 10, message = "风险等级长度不能超过10个字符")
|
||||
@Schema(description = "风险等级")
|
||||
private String txnRiskLevel;
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Min;
|
||||
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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户库编辑DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库编辑")
|
||||
public class CcdiAccountInfoEditDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@NotNull(message = "主键ID不能为空")
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 所属人类型 */
|
||||
@NotBlank(message = "所属人类型不能为空")
|
||||
@Schema(description = "所属人类型")
|
||||
private String ownerType;
|
||||
|
||||
/** 所属人标识 */
|
||||
@Schema(description = "所属人标识")
|
||||
private String ownerId;
|
||||
|
||||
/** 账户号码 */
|
||||
@NotBlank(message = "账户号码不能为空")
|
||||
@Size(max = 240, message = "账户号码长度不能超过240个字符")
|
||||
@Schema(description = "账户号码")
|
||||
private String accountNo;
|
||||
|
||||
/** 账户类型 */
|
||||
@NotBlank(message = "账户类型不能为空")
|
||||
@Size(max = 30, message = "账户类型长度不能超过30个字符")
|
||||
@Schema(description = "账户类型")
|
||||
private String accountType;
|
||||
|
||||
/** 账户范围 */
|
||||
@NotBlank(message = "账户范围不能为空")
|
||||
@Size(max = 20, message = "账户范围长度不能超过20个字符")
|
||||
@Schema(description = "账户范围")
|
||||
private String bankScope;
|
||||
|
||||
/** 账户姓名 */
|
||||
@NotBlank(message = "账户姓名不能为空")
|
||||
@Size(max = 100, message = "账户姓名长度不能超过100个字符")
|
||||
@Schema(description = "账户姓名")
|
||||
private String accountName;
|
||||
|
||||
/** 开户机构 */
|
||||
@NotBlank(message = "开户机构不能为空")
|
||||
@Size(max = 100, message = "开户机构长度不能超过100个字符")
|
||||
@Schema(description = "开户机构")
|
||||
private String openBank;
|
||||
|
||||
/** 银行代码 */
|
||||
@Size(max = 20, message = "银行代码长度不能超过20个字符")
|
||||
@Schema(description = "银行代码")
|
||||
private String bankCode;
|
||||
|
||||
/** 币种 */
|
||||
@Size(max = 3, message = "币种长度不能超过3个字符")
|
||||
@Schema(description = "币种")
|
||||
private String currency;
|
||||
|
||||
/** 状态 */
|
||||
@NotNull(message = "状态不能为空")
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 生效日期 */
|
||||
@NotNull(message = "生效日期不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "生效日期")
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 失效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "失效日期")
|
||||
private Date invalidDate;
|
||||
|
||||
/** 是否实控账户 */
|
||||
@Schema(description = "是否实控账户")
|
||||
private Integer isActualControl;
|
||||
|
||||
/** 月均交易笔数 */
|
||||
@Min(value = 0, message = "月均交易笔数不能小于0")
|
||||
@Schema(description = "月均交易笔数")
|
||||
private Integer avgMonthTxnCount;
|
||||
|
||||
/** 月均交易金额 */
|
||||
@DecimalMin(value = "0", message = "月均交易金额不能小于0")
|
||||
@Schema(description = "月均交易金额")
|
||||
private BigDecimal avgMonthTxnAmount;
|
||||
|
||||
/** 频率等级 */
|
||||
@Size(max = 20, message = "频率等级长度不能超过20个字符")
|
||||
@Schema(description = "频率等级")
|
||||
private String txnFrequencyLevel;
|
||||
|
||||
/** 借方单笔最高额 */
|
||||
@DecimalMin(value = "0", message = "借方单笔最高额不能小于0")
|
||||
@Schema(description = "借方单笔最高额")
|
||||
private BigDecimal debitSingleMaxAmount;
|
||||
|
||||
/** 贷方单笔最高额 */
|
||||
@DecimalMin(value = "0", message = "贷方单笔最高额不能小于0")
|
||||
@Schema(description = "贷方单笔最高额")
|
||||
private BigDecimal creditSingleMaxAmount;
|
||||
|
||||
/** 借方日累计最高额 */
|
||||
@DecimalMin(value = "0", message = "借方日累计最高额不能小于0")
|
||||
@Schema(description = "借方日累计最高额")
|
||||
private BigDecimal debitDailyMaxAmount;
|
||||
|
||||
/** 贷方日累计最高额 */
|
||||
@DecimalMin(value = "0", message = "贷方日累计最高额不能小于0")
|
||||
@Schema(description = "贷方日累计最高额")
|
||||
private BigDecimal creditDailyMaxAmount;
|
||||
|
||||
/** 风险等级 */
|
||||
@Size(max = 10, message = "风险等级长度不能超过10个字符")
|
||||
@Schema(description = "风险等级")
|
||||
private String txnRiskLevel;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 账户库查询DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库查询条件")
|
||||
public class CcdiAccountInfoQueryDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 员工姓名 */
|
||||
@Schema(description = "员工姓名")
|
||||
private String staffName;
|
||||
|
||||
/** 所属人类型 */
|
||||
@Schema(description = "所属人类型")
|
||||
private String ownerType;
|
||||
|
||||
/** 账户范围 */
|
||||
@Schema(description = "账户范围")
|
||||
private String bankScope;
|
||||
|
||||
/** 关系类型 */
|
||||
@Schema(description = "关系类型")
|
||||
private String relationType;
|
||||
|
||||
/** 账户姓名 */
|
||||
@Schema(description = "账户姓名")
|
||||
private String accountName;
|
||||
|
||||
/** 账户类型 */
|
||||
@Schema(description = "账户类型")
|
||||
private String accountType;
|
||||
|
||||
/** 是否实控账户 */
|
||||
@Schema(description = "是否实控账户")
|
||||
private Integer isActualControl;
|
||||
|
||||
/** 风险等级 */
|
||||
@Schema(description = "风险等级")
|
||||
private String riskLevel;
|
||||
|
||||
/** 状态 */
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import com.ruoyi.info.collection.annotation.EnumValid;
|
||||
import com.ruoyi.info.collection.enums.AdmitStatus;
|
||||
import com.ruoyi.info.collection.enums.RecruitType;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
@@ -22,9 +23,9 @@ public class CcdiStaffRecruitmentAddDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 招聘项目编号 */
|
||||
@NotBlank(message = "招聘项目编号不能为空")
|
||||
@Size(max = 32, message = "招聘项目编号长度不能超过32个字符")
|
||||
/** 招聘记录编号 */
|
||||
@NotBlank(message = "招聘记录编号不能为空")
|
||||
@Size(max = 32, message = "招聘记录编号长度不能超过32个字符")
|
||||
private String recruitId;
|
||||
|
||||
/** 招聘项目名称 */
|
||||
@@ -51,6 +52,11 @@ public class CcdiStaffRecruitmentAddDTO implements Serializable {
|
||||
@Size(max = 20, message = "应聘人员姓名长度不能超过20个字符")
|
||||
private String candName;
|
||||
|
||||
/** 招聘类型 */
|
||||
@NotBlank(message = "招聘类型不能为空")
|
||||
@EnumValid(enumClass = RecruitType.class, message = "招聘类型状态值不合法")
|
||||
private String recruitType;
|
||||
|
||||
/** 应聘人员学历 */
|
||||
@NotBlank(message = "应聘人员学历不能为空")
|
||||
@Size(max = 20, message = "应聘人员学历长度不能超过20个字符")
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import com.ruoyi.info.collection.annotation.EnumValid;
|
||||
import com.ruoyi.info.collection.enums.AdmitStatus;
|
||||
import com.ruoyi.info.collection.enums.RecruitType;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
@@ -23,8 +24,8 @@ public class CcdiStaffRecruitmentEditDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 招聘项目编号 */
|
||||
@NotNull(message = "招聘项目编号不能为空")
|
||||
/** 招聘记录编号 */
|
||||
@NotNull(message = "招聘记录编号不能为空")
|
||||
private String recruitId;
|
||||
|
||||
/** 招聘项目名称 */
|
||||
@@ -46,6 +47,10 @@ public class CcdiStaffRecruitmentEditDTO implements Serializable {
|
||||
@Size(max = 20, message = "应聘人员姓名长度不能超过20个字符")
|
||||
private String candName;
|
||||
|
||||
/** 招聘类型 */
|
||||
@EnumValid(enumClass = RecruitType.class, message = "招聘类型状态值不合法")
|
||||
private String recruitType;
|
||||
|
||||
/** 应聘人员学历 */
|
||||
@Size(max = 20, message = "应聘人员学历长度不能超过20个字符")
|
||||
private String candEdu;
|
||||
|
||||
@@ -26,6 +26,9 @@ public class CcdiStaffRecruitmentQueryDTO implements Serializable {
|
||||
/** 候选人姓名(模糊查询) */
|
||||
private String candName;
|
||||
|
||||
/** 招聘类型(精确查询) */
|
||||
private String recruitType;
|
||||
|
||||
/** 证件号码(精确查询) */
|
||||
private String candId;
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.info.collection.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;
|
||||
|
||||
/**
|
||||
* 账户库导入导出对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-14
|
||||
*/
|
||||
@Data
|
||||
public class CcdiAccountInfoExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "所属人类型*", index = 0)
|
||||
@ColumnWidth(16)
|
||||
private String ownerType;
|
||||
|
||||
@ExcelProperty(value = "证件号*", index = 1)
|
||||
@ColumnWidth(24)
|
||||
private String ownerId;
|
||||
|
||||
@ExcelProperty(value = "账户姓名*", index = 2)
|
||||
@ColumnWidth(18)
|
||||
private String accountName;
|
||||
|
||||
@ExcelProperty(value = "账户号码*", index = 3)
|
||||
@ColumnWidth(28)
|
||||
private String accountNo;
|
||||
|
||||
@ExcelProperty(value = "账户类型*", index = 4)
|
||||
@ColumnWidth(16)
|
||||
private String accountType;
|
||||
|
||||
@ExcelProperty(value = "账户范围*", index = 5)
|
||||
@ColumnWidth(14)
|
||||
private String bankScope;
|
||||
|
||||
@ExcelProperty(value = "开户机构*", index = 6)
|
||||
@ColumnWidth(28)
|
||||
private String openBank;
|
||||
|
||||
@ExcelProperty(value = "银行代码", index = 7)
|
||||
@ColumnWidth(16)
|
||||
private String bankCode;
|
||||
|
||||
@ExcelProperty(value = "币种", index = 8)
|
||||
@ColumnWidth(10)
|
||||
private String currency;
|
||||
|
||||
@ExcelProperty(value = "状态*", index = 9)
|
||||
@ColumnWidth(12)
|
||||
private String status;
|
||||
|
||||
@ExcelProperty(value = "生效日期*(yyyy-MM-dd)", index = 10)
|
||||
@ColumnWidth(18)
|
||||
private String effectiveDate;
|
||||
|
||||
@ExcelProperty(value = "失效日期(yyyy-MM-dd)", index = 11)
|
||||
@ColumnWidth(18)
|
||||
private String invalidDate;
|
||||
|
||||
@ExcelProperty(value = "是否实控账户", index = 12)
|
||||
@ColumnWidth(14)
|
||||
private String isActualControl;
|
||||
|
||||
@ExcelProperty(value = "月均交易笔数", index = 13)
|
||||
@ColumnWidth(14)
|
||||
private String avgMonthTxnCount;
|
||||
|
||||
@ExcelProperty(value = "月均交易金额", index = 14)
|
||||
@ColumnWidth(16)
|
||||
private String avgMonthTxnAmount;
|
||||
|
||||
@ExcelProperty(value = "频率等级", index = 15)
|
||||
@ColumnWidth(12)
|
||||
private String txnFrequencyLevel;
|
||||
|
||||
@ExcelProperty(value = "借方单笔最高额", index = 16)
|
||||
@ColumnWidth(16)
|
||||
private String debitSingleMaxAmount;
|
||||
|
||||
@ExcelProperty(value = "贷方单笔最高额", index = 17)
|
||||
@ColumnWidth(16)
|
||||
private String creditSingleMaxAmount;
|
||||
|
||||
@ExcelProperty(value = "借方日累计最高额", index = 18)
|
||||
@ColumnWidth(16)
|
||||
private String debitDailyMaxAmount;
|
||||
|
||||
@ExcelProperty(value = "贷方日累计最高额", index = 19)
|
||||
@ColumnWidth(16)
|
||||
private String creditDailyMaxAmount;
|
||||
|
||||
@ExcelProperty(value = "风险等级", index = 20)
|
||||
@ColumnWidth(12)
|
||||
private String txnRiskLevel;
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.info.collection.domain.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.ruoyi.common.annotation.Required;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 招聘记录历史工作经历Excel导入对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-20
|
||||
*/
|
||||
@Data
|
||||
public class CcdiStaffRecruitmentWorkExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 招聘记录编号 */
|
||||
@ExcelProperty(value = "招聘记录编号", index = 0)
|
||||
@ColumnWidth(20)
|
||||
@Required
|
||||
private String recruitId;
|
||||
|
||||
/** 候选人姓名 */
|
||||
@ExcelProperty(value = "候选人姓名", index = 1)
|
||||
@ColumnWidth(15)
|
||||
@Required
|
||||
private String candName;
|
||||
|
||||
/** 招聘项目名称 */
|
||||
@ExcelProperty(value = "招聘项目名称", index = 2)
|
||||
@ColumnWidth(25)
|
||||
@Required
|
||||
private String recruitName;
|
||||
|
||||
/** 职位名称 */
|
||||
@ExcelProperty(value = "职位名称", index = 3)
|
||||
@ColumnWidth(20)
|
||||
@Required
|
||||
private String posName;
|
||||
|
||||
/** 排序号 */
|
||||
@ExcelProperty(value = "排序号", index = 4)
|
||||
@ColumnWidth(10)
|
||||
@Required
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 工作单位 */
|
||||
@ExcelProperty(value = "工作单位", index = 5)
|
||||
@ColumnWidth(25)
|
||||
@Required
|
||||
private String companyName;
|
||||
|
||||
/** 所属部门 */
|
||||
@ExcelProperty(value = "所属部门", index = 6)
|
||||
@ColumnWidth(18)
|
||||
private String departmentName;
|
||||
|
||||
/** 岗位 */
|
||||
@ExcelProperty(value = "岗位", index = 7)
|
||||
@ColumnWidth(20)
|
||||
@Required
|
||||
private String positionName;
|
||||
|
||||
/** 入职年月 */
|
||||
@ExcelProperty(value = "入职年月", index = 8)
|
||||
@ColumnWidth(12)
|
||||
@Required
|
||||
private String jobStartMonth;
|
||||
|
||||
/** 离职年月 */
|
||||
@ExcelProperty(value = "离职年月", index = 9)
|
||||
@ColumnWidth(12)
|
||||
private String jobEndMonth;
|
||||
|
||||
/** 离职原因 */
|
||||
@ExcelProperty(value = "离职原因", index = 10)
|
||||
@ColumnWidth(30)
|
||||
private String departureReason;
|
||||
|
||||
/** 工作内容 */
|
||||
@ExcelProperty(value = "工作内容", index = 11)
|
||||
@ColumnWidth(35)
|
||||
private String workContent;
|
||||
|
||||
/** 备注 */
|
||||
@ExcelProperty(value = "备注", index = 12)
|
||||
@ColumnWidth(25)
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.info.collection.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 账户库导入失败记录
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-14
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库导入失败记录")
|
||||
public class AccountInfoImportFailureVO {
|
||||
|
||||
@Schema(description = "行号")
|
||||
private Integer rowNum;
|
||||
|
||||
@Schema(description = "所属人类型")
|
||||
private String ownerType;
|
||||
|
||||
@Schema(description = "证件号")
|
||||
private String ownerId;
|
||||
|
||||
@Schema(description = "账户号码")
|
||||
private String accountNo;
|
||||
|
||||
@Schema(description = "错误信息")
|
||||
private String errorMessage;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.ruoyi.info.collection.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 账户库VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库信息")
|
||||
public class CcdiAccountInfoVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@Schema(description = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 所属人类型 */
|
||||
@Schema(description = "所属人类型")
|
||||
private String ownerType;
|
||||
|
||||
/** 所属人标识 */
|
||||
@Schema(description = "所属人标识")
|
||||
private String ownerId;
|
||||
|
||||
/** 员工工号 */
|
||||
@Schema(description = "员工工号")
|
||||
private Long staffId;
|
||||
|
||||
/** 员工姓名 */
|
||||
@Schema(description = "员工姓名")
|
||||
private String staffName;
|
||||
|
||||
/** 关系人ID */
|
||||
@Schema(description = "关系人ID")
|
||||
private Long relationId;
|
||||
|
||||
/** 关系类型 */
|
||||
@Schema(description = "关系类型")
|
||||
private String relationType;
|
||||
|
||||
/** 关系人姓名 */
|
||||
@Schema(description = "关系人姓名")
|
||||
private String relationName;
|
||||
|
||||
/** 关系人证件号 */
|
||||
@Schema(description = "关系人证件号")
|
||||
private String relationCertNo;
|
||||
|
||||
/** 账户号码 */
|
||||
@Schema(description = "账户号码")
|
||||
private String accountNo;
|
||||
|
||||
/** 账户类型 */
|
||||
@Schema(description = "账户类型")
|
||||
private String accountType;
|
||||
|
||||
/** 账户范围 */
|
||||
@Schema(description = "账户范围")
|
||||
private String bankScope;
|
||||
|
||||
/** 账户姓名 */
|
||||
@Schema(description = "账户姓名")
|
||||
private String accountName;
|
||||
|
||||
/** 开户机构 */
|
||||
@Schema(description = "开户机构")
|
||||
private String openBank;
|
||||
|
||||
/** 银行代码 */
|
||||
@Schema(description = "银行代码")
|
||||
private String bankCode;
|
||||
|
||||
/** 币种 */
|
||||
@Schema(description = "币种")
|
||||
private String currency;
|
||||
|
||||
/** 状态 */
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 生效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "生效日期")
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 失效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "失效日期")
|
||||
private Date invalidDate;
|
||||
|
||||
/** 是否实控账户 */
|
||||
@Schema(description = "是否实控账户")
|
||||
private Integer isActualControl;
|
||||
|
||||
/** 月均交易笔数 */
|
||||
@Schema(description = "月均交易笔数")
|
||||
private Integer avgMonthTxnCount;
|
||||
|
||||
/** 月均交易金额 */
|
||||
@Schema(description = "月均交易金额")
|
||||
private BigDecimal avgMonthTxnAmount;
|
||||
|
||||
/** 频率等级 */
|
||||
@Schema(description = "频率等级")
|
||||
private String txnFrequencyLevel;
|
||||
|
||||
/** 借方单笔最高额 */
|
||||
@Schema(description = "借方单笔最高额")
|
||||
private BigDecimal debitSingleMaxAmount;
|
||||
|
||||
/** 贷方单笔最高额 */
|
||||
@Schema(description = "贷方单笔最高额")
|
||||
private BigDecimal creditSingleMaxAmount;
|
||||
|
||||
/** 借方日累计最高额 */
|
||||
@Schema(description = "借方日累计最高额")
|
||||
private BigDecimal debitDailyMaxAmount;
|
||||
|
||||
/** 贷方日累计最高额 */
|
||||
@Schema(description = "贷方日累计最高额")
|
||||
private BigDecimal creditDailyMaxAmount;
|
||||
|
||||
/** 风险等级 */
|
||||
@Schema(description = "风险等级")
|
||||
private String txnRiskLevel;
|
||||
|
||||
/** 创建者 */
|
||||
@Schema(description = "创建者")
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@Schema(description = "更新者")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.info.collection.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 账户库关系人下拉VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "账户库关系人下拉选项")
|
||||
public class CcdiAccountRelationOptionVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 关系人ID */
|
||||
@Schema(description = "关系人ID")
|
||||
private Long id;
|
||||
|
||||
/** 关系人姓名 */
|
||||
@Schema(description = "关系人姓名")
|
||||
private String relationName;
|
||||
|
||||
/** 关系类型 */
|
||||
@Schema(description = "关系类型")
|
||||
private String relationType;
|
||||
|
||||
/** 关系人证件号 */
|
||||
@Schema(description = "关系人证件号")
|
||||
private String relationCertNo;
|
||||
}
|
||||
@@ -26,6 +26,11 @@ public class CcdiBaseStaffOptionVO {
|
||||
*/
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工招聘信息VO
|
||||
@@ -18,7 +19,7 @@ public class CcdiStaffRecruitmentVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 招聘项目编号 */
|
||||
/** 招聘记录编号 */
|
||||
private String recruitId;
|
||||
|
||||
/** 招聘项目名称 */
|
||||
@@ -36,6 +37,9 @@ public class CcdiStaffRecruitmentVO implements Serializable {
|
||||
/** 应聘人员姓名 */
|
||||
private String candName;
|
||||
|
||||
/** 招聘类型 */
|
||||
private String recruitType;
|
||||
|
||||
/** 应聘人员学历 */
|
||||
private String candEdu;
|
||||
|
||||
@@ -57,6 +61,12 @@ public class CcdiStaffRecruitmentVO implements Serializable {
|
||||
/** 录用情况描述 */
|
||||
private String admitStatusDesc;
|
||||
|
||||
/** 历史工作经历条数 */
|
||||
private Long workExperienceCount;
|
||||
|
||||
/** 历史工作经历列表 */
|
||||
private List<CcdiStaffRecruitmentWorkVO> workExperienceList;
|
||||
|
||||
/** 面试官1姓名 */
|
||||
private String interviewerName1;
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.info.collection.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 招聘记录历史工作经历VO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-15
|
||||
*/
|
||||
@Data
|
||||
public class CcdiStaffRecruitmentWorkVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 排序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 工作单位 */
|
||||
private String companyName;
|
||||
|
||||
/** 所属部门 */
|
||||
private String departmentName;
|
||||
|
||||
/** 岗位名称 */
|
||||
private String positionName;
|
||||
|
||||
/** 入职年月 */
|
||||
private String jobStartMonth;
|
||||
|
||||
/** 离职年月 */
|
||||
private String jobEndMonth;
|
||||
|
||||
/** 离职原因 */
|
||||
private String departureReason;
|
||||
|
||||
/** 主要工作内容 */
|
||||
private String workContent;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
}
|
||||
@@ -19,6 +19,9 @@ public class RecruitmentImportFailureVO {
|
||||
@Schema(description = "招聘项目名称")
|
||||
private String recruitName;
|
||||
|
||||
@Schema(description = "职位名称")
|
||||
private String posName;
|
||||
|
||||
@Schema(description = "应聘人员姓名")
|
||||
private String candName;
|
||||
|
||||
@@ -28,6 +31,12 @@ public class RecruitmentImportFailureVO {
|
||||
@Schema(description = "录用情况")
|
||||
private String admitStatus;
|
||||
|
||||
@Schema(description = "工作单位")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "岗位")
|
||||
private String positionName;
|
||||
|
||||
@Schema(description = "错误信息")
|
||||
private String errorMessage;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.info.collection.enums;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 招聘类型枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public enum RecruitType {
|
||||
|
||||
/** 社招 */
|
||||
SOCIAL("SOCIAL", "社招"),
|
||||
|
||||
/** 校招 */
|
||||
CAMPUS("CAMPUS", "校招");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
RecruitType(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
for (RecruitType type : values()) {
|
||||
if (type.code.equals(code)) {
|
||||
return type.desc;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String inferCode(String recruitName) {
|
||||
if (StringUtils.isNotEmpty(recruitName) && recruitName.contains("校园")) {
|
||||
return CAMPUS.code;
|
||||
}
|
||||
return SOCIAL.code;
|
||||
}
|
||||
}
|
||||
@@ -11,26 +11,26 @@ public enum RelationType {
|
||||
/** 配偶 */
|
||||
SPOUSE("配偶", "配偶"),
|
||||
|
||||
/** 父子 */
|
||||
FATHER_SON("父子", "父子"),
|
||||
/** 父亲 */
|
||||
FATHER("父亲", "父亲"),
|
||||
|
||||
/** 母女 */
|
||||
MOTHER_DAUGHTER("母女", "母女"),
|
||||
/** 母亲 */
|
||||
MOTHER("母亲", "母亲"),
|
||||
|
||||
/** 兄弟 */
|
||||
BROTHER("兄弟", "兄弟"),
|
||||
/** 子女 */
|
||||
CHILDREN("子女", "子女"),
|
||||
|
||||
/** 姐妹 */
|
||||
SISTER("姐妹", "姐妹"),
|
||||
|
||||
/** 亲属 */
|
||||
RELATIVE("亲属", "亲属"),
|
||||
/** 兄弟姐妹 */
|
||||
SIBLINGS("兄弟姐妹", "兄弟姐妹"),
|
||||
|
||||
/** 朋友 */
|
||||
FRIEND("朋友", "朋友"),
|
||||
|
||||
/** 同事 */
|
||||
COLLEAGUE("同事", "同事");
|
||||
COLLEAGUE("同事", "同事"),
|
||||
|
||||
/** 其他 */
|
||||
OTHER("其他", "其他");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.info.collection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.info.collection.domain.CcdiAccountInfo;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountInfoVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountRelationOptionVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户库数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
public interface CcdiAccountInfoMapper extends BaseMapper<CcdiAccountInfo> {
|
||||
|
||||
/**
|
||||
* 分页查询账户库
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryDTO 查询条件
|
||||
* @return 账户库分页结果
|
||||
*/
|
||||
Page<CcdiAccountInfoVO> selectAccountInfoPage(@Param("page") Page<CcdiAccountInfoVO> page,
|
||||
@Param("query") CcdiAccountInfoQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询账户库详情
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 账户库详情
|
||||
*/
|
||||
CcdiAccountInfoVO selectAccountInfoById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 导出账户库列表
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 导出列表
|
||||
*/
|
||||
List<CcdiAccountInfoVO> selectAccountInfoListForExport(@Param("query") CcdiAccountInfoQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询关系人下拉选项
|
||||
*
|
||||
* @param staffId 员工工号
|
||||
* @return 关系人下拉
|
||||
*/
|
||||
List<CcdiAccountRelationOptionVO> selectRelationOptionsByStaffId(@Param("staffId") Long staffId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.info.collection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.info.collection.domain.CcdiAccountResult;
|
||||
|
||||
/**
|
||||
* 账户分析结果数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
public interface CcdiAccountResultMapper extends BaseMapper<CcdiAccountResult> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.info.collection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffRecruitmentWork;
|
||||
|
||||
/**
|
||||
* 招聘记录历史工作经历 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-15
|
||||
*/
|
||||
public interface CcdiStaffRecruitmentWorkMapper extends BaseMapper<CcdiStaffRecruitmentWork> {
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.info.collection.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiAccountInfoExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.AccountInfoImportFailureVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountInfoVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountRelationOptionVO;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户库服务层
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
public interface ICcdiAccountInfoService {
|
||||
|
||||
/**
|
||||
* 分页查询账户库
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param queryDTO 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
Page<CcdiAccountInfoVO> selectAccountInfoPage(Page<CcdiAccountInfoVO> page, CcdiAccountInfoQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询账户库详情
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 账户库详情
|
||||
*/
|
||||
CcdiAccountInfoVO selectAccountInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 新增账户
|
||||
*
|
||||
* @param addDTO 新增DTO
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertAccountInfo(CcdiAccountInfoAddDTO addDTO);
|
||||
|
||||
/**
|
||||
* 修改账户
|
||||
*
|
||||
* @param editDTO 编辑DTO
|
||||
* @return 影响行数
|
||||
*/
|
||||
int updateAccountInfo(CcdiAccountInfoEditDTO editDTO);
|
||||
|
||||
/**
|
||||
* 批量删除账户
|
||||
*
|
||||
* @param ids 主键ID数组
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteAccountInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询关系人下拉
|
||||
*
|
||||
* @param staffId 员工工号
|
||||
* @return 下拉列表
|
||||
*/
|
||||
List<CcdiAccountRelationOptionVO> selectRelationOptionsByStaffId(Long staffId);
|
||||
|
||||
/**
|
||||
* 导出账户库列表
|
||||
*
|
||||
* @param queryDTO 查询条件
|
||||
* @return 导出列表
|
||||
*/
|
||||
List<CcdiAccountInfoExcel> selectAccountInfoListForExport(CcdiAccountInfoQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 导入账户库信息
|
||||
*
|
||||
* @param excelList Excel数据
|
||||
* @param updateSupport 是否更新已存在账户
|
||||
* @return 导入结果
|
||||
*/
|
||||
ImportResult importAccountInfo(List<CcdiAccountInfoExcel> excelList, boolean updateSupport);
|
||||
|
||||
/**
|
||||
* 获取导入失败记录
|
||||
*
|
||||
* @return 失败记录
|
||||
*/
|
||||
List<AccountInfoImportFailureVO> getLatestImportFailures();
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.info.collection.service;
|
||||
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportStatusVO;
|
||||
import com.ruoyi.info.collection.domain.vo.RecruitmentImportFailureVO;
|
||||
|
||||
@@ -25,6 +26,17 @@ public interface ICcdiStaffRecruitmentImportService {
|
||||
String taskId,
|
||||
String userName);
|
||||
|
||||
/**
|
||||
* 异步导入招聘记录历史工作经历数据
|
||||
*
|
||||
* @param excelList Excel数据列表
|
||||
* @param taskId 任务ID
|
||||
* @param userName 用户名
|
||||
*/
|
||||
void importRecruitmentWorkAsync(List<CcdiStaffRecruitmentWorkExcel> excelList,
|
||||
String taskId,
|
||||
String userName);
|
||||
|
||||
/**
|
||||
* 查询导入状态
|
||||
*
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -81,4 +82,12 @@ public interface ICcdiStaffRecruitmentService {
|
||||
* @return 结果
|
||||
*/
|
||||
String importRecruitment(List<CcdiStaffRecruitmentExcel> excelList);
|
||||
|
||||
/**
|
||||
* 导入招聘记录历史工作经历数据(异步)
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @return 任务ID
|
||||
*/
|
||||
String importRecruitmentWork(List<CcdiStaffRecruitmentWorkExcel> excelList);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,618 @@
|
||||
package com.ruoyi.info.collection.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.info.collection.domain.CcdiAccountInfo;
|
||||
import com.ruoyi.info.collection.domain.CcdiAccountResult;
|
||||
import com.ruoyi.info.collection.domain.CcdiBaseStaff;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffFmyRelation;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiAccountInfoQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiAccountInfoExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.AccountInfoImportFailureVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountInfoVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiAccountRelationOptionVO;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportResult;
|
||||
import com.ruoyi.info.collection.mapper.CcdiAccountInfoMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiAccountResultMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiBaseStaffMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffFmyRelationMapper;
|
||||
import com.ruoyi.info.collection.service.ICcdiAccountInfoService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
/**
|
||||
* 账户库服务实现
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-13
|
||||
*/
|
||||
@Service
|
||||
public class CcdiAccountInfoServiceImpl implements ICcdiAccountInfoService {
|
||||
|
||||
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
private static final Set<String> OWNER_TYPES = Set.of("EMPLOYEE", "RELATION", "INTERMEDIARY", "EXTERNAL");
|
||||
private static final Set<String> ACCOUNT_TYPES = Set.of("BANK", "SECURITIES", "PAYMENT", "OTHER");
|
||||
private static final Set<String> BANK_SCOPES = Set.of("INTERNAL", "EXTERNAL");
|
||||
private static final Set<String> LEVELS = Set.of("LOW", "MEDIUM", "HIGH");
|
||||
private final List<AccountInfoImportFailureVO> latestImportFailures = new CopyOnWriteArrayList<>();
|
||||
|
||||
@Resource
|
||||
private CcdiAccountInfoMapper accountInfoMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiAccountResultMapper accountResultMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiBaseStaffMapper baseStaffMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiStaffFmyRelationMapper staffFmyRelationMapper;
|
||||
|
||||
@Override
|
||||
public Page<CcdiAccountInfoVO> selectAccountInfoPage(Page<CcdiAccountInfoVO> page, CcdiAccountInfoQueryDTO queryDTO) {
|
||||
return accountInfoMapper.selectAccountInfoPage(page, queryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CcdiAccountInfoVO selectAccountInfoById(Long id) {
|
||||
return accountInfoMapper.selectAccountInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertAccountInfo(CcdiAccountInfoAddDTO addDTO) {
|
||||
normalizeAddDto(addDTO);
|
||||
validateDto(addDTO.getOwnerType(), addDTO.getOwnerId(), addDTO.getAccountType(), addDTO.getBankScope(),
|
||||
addDTO.getStatus(), addDTO.getEffectiveDate(), addDTO.getInvalidDate(), addDTO.getTxnFrequencyLevel(),
|
||||
addDTO.getTxnRiskLevel(), addDTO.getAvgMonthTxnAmount(), addDTO.getDebitSingleMaxAmount(),
|
||||
addDTO.getCreditSingleMaxAmount(), addDTO.getDebitDailyMaxAmount(), addDTO.getCreditDailyMaxAmount());
|
||||
validateDuplicateAccountNo(addDTO.getAccountNo(), null);
|
||||
|
||||
CcdiAccountInfo accountInfo = new CcdiAccountInfo();
|
||||
BeanUtils.copyProperties(addDTO, accountInfo);
|
||||
int result = accountInfoMapper.insert(accountInfo);
|
||||
syncAccountResult(accountInfo.getBankScope(), null, accountInfo.getAccountNo(), addDTO);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateAccountInfo(CcdiAccountInfoEditDTO editDTO) {
|
||||
normalizeEditDto(editDTO);
|
||||
validateDto(editDTO.getOwnerType(), editDTO.getOwnerId(), editDTO.getAccountType(), editDTO.getBankScope(),
|
||||
editDTO.getStatus(), editDTO.getEffectiveDate(), editDTO.getInvalidDate(), editDTO.getTxnFrequencyLevel(),
|
||||
editDTO.getTxnRiskLevel(), editDTO.getAvgMonthTxnAmount(), editDTO.getDebitSingleMaxAmount(),
|
||||
editDTO.getCreditSingleMaxAmount(), editDTO.getDebitDailyMaxAmount(), editDTO.getCreditDailyMaxAmount());
|
||||
|
||||
CcdiAccountInfo existing = accountInfoMapper.selectById(editDTO.getId());
|
||||
if (existing == null) {
|
||||
throw new RuntimeException("账户不存在");
|
||||
}
|
||||
|
||||
validateDuplicateAccountNo(editDTO.getAccountNo(), editDTO.getId());
|
||||
|
||||
CcdiAccountInfo accountInfo = new CcdiAccountInfo();
|
||||
BeanUtils.copyProperties(editDTO, accountInfo);
|
||||
int result = accountInfoMapper.updateById(accountInfo);
|
||||
syncAccountResult(accountInfo.getBankScope(), existing, accountInfo.getAccountNo(), editDTO);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteAccountInfoByIds(Long[] ids) {
|
||||
List<CcdiAccountInfo> accountList = accountInfoMapper.selectBatchIds(Arrays.asList(ids));
|
||||
if (!accountList.isEmpty()) {
|
||||
List<String> accountNos = accountList.stream()
|
||||
.map(CcdiAccountInfo::getAccountNo)
|
||||
.filter(StringUtils::isNotEmpty)
|
||||
.toList();
|
||||
if (!accountNos.isEmpty()) {
|
||||
LambdaQueryWrapper<CcdiAccountResult> resultWrapper = new LambdaQueryWrapper<>();
|
||||
resultWrapper.in(CcdiAccountResult::getAccountNo, accountNos);
|
||||
accountResultMapper.delete(resultWrapper);
|
||||
}
|
||||
}
|
||||
return accountInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CcdiAccountRelationOptionVO> selectRelationOptionsByStaffId(Long staffId) {
|
||||
if (staffId == null) {
|
||||
return List.of();
|
||||
}
|
||||
return accountInfoMapper.selectRelationOptionsByStaffId(staffId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CcdiAccountInfoExcel> selectAccountInfoListForExport(CcdiAccountInfoQueryDTO queryDTO) {
|
||||
return accountInfoMapper.selectAccountInfoListForExport(queryDTO).stream().map(this::toExcel).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ImportResult importAccountInfo(List<CcdiAccountInfoExcel> excelList, boolean updateSupport) {
|
||||
latestImportFailures.clear();
|
||||
ImportResult result = new ImportResult();
|
||||
result.setTotalCount(excelList.size());
|
||||
|
||||
int successCount = 0;
|
||||
int rowNum = 1;
|
||||
for (CcdiAccountInfoExcel excel : excelList) {
|
||||
rowNum++;
|
||||
try {
|
||||
importSingleRow(excel, updateSupport);
|
||||
successCount++;
|
||||
} catch (Exception e) {
|
||||
latestImportFailures.add(buildFailure(rowNum, excel, e.getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
result.setSuccessCount(successCount);
|
||||
result.setFailureCount(latestImportFailures.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountInfoImportFailureVO> getLatestImportFailures() {
|
||||
return new ArrayList<>(latestImportFailures);
|
||||
}
|
||||
|
||||
private void validateDto(String ownerType, String ownerId, String accountType, String bankScope, Integer status,
|
||||
java.util.Date effectiveDate, java.util.Date invalidDate, String txnFrequencyLevel,
|
||||
String txnRiskLevel, BigDecimal avgMonthTxnAmount, BigDecimal debitSingleMaxAmount,
|
||||
BigDecimal creditSingleMaxAmount, BigDecimal debitDailyMaxAmount,
|
||||
BigDecimal creditDailyMaxAmount) {
|
||||
if (!OWNER_TYPES.contains(ownerType)) {
|
||||
throw new RuntimeException("所属人类型不合法");
|
||||
}
|
||||
if (!ACCOUNT_TYPES.contains(accountType)) {
|
||||
throw new RuntimeException("账户类型不合法");
|
||||
}
|
||||
if (!BANK_SCOPES.contains(bankScope)) {
|
||||
throw new RuntimeException("账户范围不合法");
|
||||
}
|
||||
if (status == null || (status != 1 && status != 2)) {
|
||||
throw new RuntimeException("状态不合法");
|
||||
}
|
||||
if (effectiveDate == null) {
|
||||
throw new RuntimeException("生效日期不能为空");
|
||||
}
|
||||
if (invalidDate != null && invalidDate.before(effectiveDate)) {
|
||||
throw new RuntimeException("失效日期不能早于生效日期");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(txnFrequencyLevel) && !LEVELS.contains(txnFrequencyLevel)) {
|
||||
throw new RuntimeException("频率等级不合法");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(txnRiskLevel) && !LEVELS.contains(txnRiskLevel)) {
|
||||
throw new RuntimeException("风险等级不合法");
|
||||
}
|
||||
validateAmount(avgMonthTxnAmount, "月均交易金额");
|
||||
validateAmount(debitSingleMaxAmount, "借方单笔最高额");
|
||||
validateAmount(creditSingleMaxAmount, "贷方单笔最高额");
|
||||
validateAmount(debitDailyMaxAmount, "借方日累计最高额");
|
||||
validateAmount(creditDailyMaxAmount, "贷方日累计最高额");
|
||||
validateOwner(ownerType, ownerId);
|
||||
}
|
||||
|
||||
private void validateOwner(String ownerType, String ownerId) {
|
||||
if (StringUtils.isEmpty(ownerId)) {
|
||||
if ("EXTERNAL".equals(ownerType) || "INTERMEDIARY".equals(ownerType)) {
|
||||
throw new RuntimeException("证件号不能为空");
|
||||
}
|
||||
throw new RuntimeException("所属人不能为空");
|
||||
}
|
||||
if ("EXTERNAL".equals(ownerType) || "INTERMEDIARY".equals(ownerType)) {
|
||||
return;
|
||||
}
|
||||
if ("EMPLOYEE".equals(ownerType)) {
|
||||
LambdaQueryWrapper<CcdiBaseStaff> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiBaseStaff::getIdCard, ownerId);
|
||||
CcdiBaseStaff staff = baseStaffMapper.selectOne(wrapper);
|
||||
if (staff == null) {
|
||||
throw new RuntimeException("员工不存在");
|
||||
}
|
||||
return;
|
||||
}
|
||||
LambdaQueryWrapper<CcdiStaffFmyRelation> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiStaffFmyRelation::getRelationCertNo, ownerId);
|
||||
CcdiStaffFmyRelation relation = staffFmyRelationMapper.selectOne(wrapper);
|
||||
if (relation == null) {
|
||||
throw new RuntimeException("关系人不存在");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDuplicateAccountNo(String accountNo, Long excludeId) {
|
||||
LambdaQueryWrapper<CcdiAccountInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiAccountInfo::getAccountNo, accountNo);
|
||||
if (excludeId != null) {
|
||||
wrapper.ne(CcdiAccountInfo::getId, excludeId);
|
||||
}
|
||||
if (accountInfoMapper.selectCount(wrapper) > 0) {
|
||||
throw new RuntimeException("账户号码已存在");
|
||||
}
|
||||
}
|
||||
|
||||
private void syncAccountResult(String newBankScope, CcdiAccountInfo existing, String accountNo, Object dto) {
|
||||
String oldBankScope = existing == null ? null : existing.getBankScope();
|
||||
String oldAccountNo = existing == null ? null : existing.getAccountNo();
|
||||
|
||||
if (existing != null && "EXTERNAL".equals(oldBankScope)
|
||||
&& (!"EXTERNAL".equals(newBankScope) || !StringUtils.equals(oldAccountNo, accountNo))) {
|
||||
LambdaQueryWrapper<CcdiAccountResult> deleteWrapper = new LambdaQueryWrapper<>();
|
||||
deleteWrapper.eq(CcdiAccountResult::getAccountNo, oldAccountNo);
|
||||
accountResultMapper.delete(deleteWrapper);
|
||||
}
|
||||
|
||||
if (!"EXTERNAL".equals(newBankScope)) {
|
||||
return;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<CcdiAccountResult> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiAccountResult::getAccountNo, accountNo);
|
||||
CcdiAccountResult existingResult = accountResultMapper.selectOne(wrapper);
|
||||
|
||||
CcdiAccountResult accountResult = new CcdiAccountResult();
|
||||
BeanUtils.copyProperties(dto, accountResult);
|
||||
accountResult.setAccountNo(accountNo);
|
||||
if (accountResult.getIsActualControl() == null) {
|
||||
accountResult.setIsActualControl(1);
|
||||
}
|
||||
if (accountResult.getAvgMonthTxnCount() == null) {
|
||||
accountResult.setAvgMonthTxnCount(0);
|
||||
}
|
||||
if (accountResult.getAvgMonthTxnAmount() == null) {
|
||||
accountResult.setAvgMonthTxnAmount(BigDecimal.ZERO);
|
||||
}
|
||||
if (StringUtils.isEmpty(accountResult.getTxnFrequencyLevel())) {
|
||||
accountResult.setTxnFrequencyLevel("MEDIUM");
|
||||
}
|
||||
if (StringUtils.isEmpty(accountResult.getTxnRiskLevel())) {
|
||||
accountResult.setTxnRiskLevel("LOW");
|
||||
}
|
||||
|
||||
if (existingResult == null) {
|
||||
accountResultMapper.insert(accountResult);
|
||||
return;
|
||||
}
|
||||
|
||||
accountResult.setResultId(existingResult.getResultId());
|
||||
accountResultMapper.updateById(accountResult);
|
||||
}
|
||||
|
||||
private void validateAmount(BigDecimal amount, String fieldLabel) {
|
||||
if (amount == null) {
|
||||
return;
|
||||
}
|
||||
if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new RuntimeException(fieldLabel + "不能为负数");
|
||||
}
|
||||
if (amount.scale() > 2) {
|
||||
throw new RuntimeException(fieldLabel + "最多保留2位小数");
|
||||
}
|
||||
}
|
||||
|
||||
private void normalizeAddDto(CcdiAccountInfoAddDTO addDTO) {
|
||||
addDTO.setOwnerType(toUpper(addDTO.getOwnerType()));
|
||||
addDTO.setAccountType(toUpper(addDTO.getAccountType()));
|
||||
addDTO.setBankScope(toUpper(addDTO.getBankScope()));
|
||||
addDTO.setCurrency(normalizeCurrency(addDTO.getCurrency()));
|
||||
addDTO.setTxnFrequencyLevel(toUpper(addDTO.getTxnFrequencyLevel()));
|
||||
addDTO.setTxnRiskLevel(toUpper(addDTO.getTxnRiskLevel()));
|
||||
addDTO.setOwnerId(normalizeOwnerId(addDTO.getOwnerId()));
|
||||
}
|
||||
|
||||
private void normalizeEditDto(CcdiAccountInfoEditDTO editDTO) {
|
||||
editDTO.setOwnerType(toUpper(editDTO.getOwnerType()));
|
||||
editDTO.setAccountType(toUpper(editDTO.getAccountType()));
|
||||
editDTO.setBankScope(toUpper(editDTO.getBankScope()));
|
||||
editDTO.setCurrency(normalizeCurrency(editDTO.getCurrency()));
|
||||
editDTO.setTxnFrequencyLevel(toUpper(editDTO.getTxnFrequencyLevel()));
|
||||
editDTO.setTxnRiskLevel(toUpper(editDTO.getTxnRiskLevel()));
|
||||
editDTO.setOwnerId(normalizeOwnerId(editDTO.getOwnerId()));
|
||||
}
|
||||
|
||||
private String normalizeCurrency(String currency) {
|
||||
if (StringUtils.isEmpty(currency)) {
|
||||
return "CNY";
|
||||
}
|
||||
return currency.trim().toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
private String toUpper(String value) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
return value;
|
||||
}
|
||||
return value.trim().toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
private String normalizeOwnerId(String ownerId) {
|
||||
if (StringUtils.isEmpty(ownerId)) {
|
||||
return ownerId;
|
||||
}
|
||||
return ownerId.trim();
|
||||
}
|
||||
|
||||
private CcdiAccountInfoExcel toExcel(CcdiAccountInfoVO vo) {
|
||||
CcdiAccountInfoExcel excel = new CcdiAccountInfoExcel();
|
||||
excel.setOwnerType(ownerTypeLabel(vo.getOwnerType()));
|
||||
excel.setOwnerId(vo.getOwnerId());
|
||||
excel.setAccountName(vo.getAccountName());
|
||||
excel.setAccountNo(vo.getAccountNo());
|
||||
excel.setAccountType(accountTypeLabel(vo.getAccountType()));
|
||||
excel.setBankScope(bankScopeLabel(vo.getBankScope()));
|
||||
excel.setOpenBank(vo.getOpenBank());
|
||||
excel.setBankCode(vo.getBankCode());
|
||||
excel.setCurrency(vo.getCurrency());
|
||||
excel.setStatus(vo.getStatus() == null ? "" : (vo.getStatus() == 1 ? "正常" : "已销户"));
|
||||
excel.setEffectiveDate(formatDate(vo.getEffectiveDate()));
|
||||
excel.setInvalidDate(formatDate(vo.getInvalidDate()));
|
||||
excel.setIsActualControl(formatYesNo(vo.getIsActualControl()));
|
||||
excel.setAvgMonthTxnCount(vo.getAvgMonthTxnCount() == null ? "" : String.valueOf(vo.getAvgMonthTxnCount()));
|
||||
excel.setAvgMonthTxnAmount(formatNumber(vo.getAvgMonthTxnAmount()));
|
||||
excel.setTxnFrequencyLevel(StringUtils.isEmpty(vo.getTxnFrequencyLevel()) ? "" : vo.getTxnFrequencyLevel());
|
||||
excel.setDebitSingleMaxAmount(formatNumber(vo.getDebitSingleMaxAmount()));
|
||||
excel.setCreditSingleMaxAmount(formatNumber(vo.getCreditSingleMaxAmount()));
|
||||
excel.setDebitDailyMaxAmount(formatNumber(vo.getDebitDailyMaxAmount()));
|
||||
excel.setCreditDailyMaxAmount(formatNumber(vo.getCreditDailyMaxAmount()));
|
||||
excel.setTxnRiskLevel(StringUtils.isEmpty(vo.getTxnRiskLevel()) ? "" : vo.getTxnRiskLevel());
|
||||
return excel;
|
||||
}
|
||||
|
||||
private void importSingleRow(CcdiAccountInfoExcel excel, boolean updateSupport) {
|
||||
CcdiAccountInfo existing = findByAccountNo(excel.getAccountNo());
|
||||
if (existing != null && !updateSupport) {
|
||||
throw new RuntimeException("账户号码已存在,请勾选更新已存在数据后重试");
|
||||
}
|
||||
|
||||
if (existing != null) {
|
||||
CcdiAccountInfoEditDTO editDTO = toEditDto(existing.getId(), excel);
|
||||
updateAccountInfo(editDTO);
|
||||
return;
|
||||
}
|
||||
|
||||
CcdiAccountInfoAddDTO addDTO = toAddDto(excel);
|
||||
insertAccountInfo(addDTO);
|
||||
}
|
||||
|
||||
private CcdiAccountInfoAddDTO toAddDto(CcdiAccountInfoExcel excel) {
|
||||
CcdiAccountInfoAddDTO dto = new CcdiAccountInfoAddDTO();
|
||||
dto.setOwnerType(parseOwnerType(excel.getOwnerType()));
|
||||
dto.setOwnerId(normalizeOwnerId(excel.getOwnerId()));
|
||||
dto.setAccountName(trimToNull(excel.getAccountName()));
|
||||
dto.setAccountNo(trimToNull(excel.getAccountNo()));
|
||||
dto.setAccountType(parseAccountType(excel.getAccountType()));
|
||||
dto.setBankScope(parseBankScope(excel.getBankScope()));
|
||||
dto.setOpenBank(trimToNull(excel.getOpenBank()));
|
||||
dto.setBankCode(trimToNull(excel.getBankCode()));
|
||||
dto.setCurrency(normalizeCurrency(excel.getCurrency()));
|
||||
dto.setStatus(parseStatus(excel.getStatus()));
|
||||
dto.setEffectiveDate(parseDateRequired(excel.getEffectiveDate(), "生效日期"));
|
||||
dto.setInvalidDate(parseDateOptional(excel.getInvalidDate()));
|
||||
dto.setIsActualControl(parseBooleanFlag(excel.getIsActualControl(), 1));
|
||||
dto.setAvgMonthTxnCount(parseInteger(excel.getAvgMonthTxnCount()));
|
||||
dto.setAvgMonthTxnAmount(parseDecimal(excel.getAvgMonthTxnAmount()));
|
||||
dto.setTxnFrequencyLevel(parseLevel(excel.getTxnFrequencyLevel(), "频率等级"));
|
||||
dto.setDebitSingleMaxAmount(parseDecimal(excel.getDebitSingleMaxAmount()));
|
||||
dto.setCreditSingleMaxAmount(parseDecimal(excel.getCreditSingleMaxAmount()));
|
||||
dto.setDebitDailyMaxAmount(parseDecimal(excel.getDebitDailyMaxAmount()));
|
||||
dto.setCreditDailyMaxAmount(parseDecimal(excel.getCreditDailyMaxAmount()));
|
||||
dto.setTxnRiskLevel(parseLevel(excel.getTxnRiskLevel(), "风险等级"));
|
||||
return dto;
|
||||
}
|
||||
|
||||
private CcdiAccountInfoEditDTO toEditDto(Long id, CcdiAccountInfoExcel excel) {
|
||||
CcdiAccountInfoEditDTO dto = new CcdiAccountInfoEditDTO();
|
||||
BeanUtils.copyProperties(toAddDto(excel), dto);
|
||||
dto.setId(id);
|
||||
return dto;
|
||||
}
|
||||
|
||||
private CcdiAccountInfo findByAccountNo(String accountNo) {
|
||||
LambdaQueryWrapper<CcdiAccountInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiAccountInfo::getAccountNo, trimToNull(accountNo));
|
||||
return accountInfoMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
private AccountInfoImportFailureVO buildFailure(int rowNum, CcdiAccountInfoExcel excel, String errorMessage) {
|
||||
AccountInfoImportFailureVO failure = new AccountInfoImportFailureVO();
|
||||
failure.setRowNum(rowNum);
|
||||
failure.setOwnerType(excel.getOwnerType());
|
||||
failure.setOwnerId(excel.getOwnerId());
|
||||
failure.setAccountNo(excel.getAccountNo());
|
||||
failure.setErrorMessage(errorMessage);
|
||||
return failure;
|
||||
}
|
||||
|
||||
private String parseOwnerType(String value) {
|
||||
String normalized = toUpper(value);
|
||||
if ("员工".equals(value)) {
|
||||
return "EMPLOYEE";
|
||||
}
|
||||
if ("员工关系人".equals(value)) {
|
||||
return "RELATION";
|
||||
}
|
||||
if ("中介".equals(value)) {
|
||||
return "INTERMEDIARY";
|
||||
}
|
||||
if ("外部人员".equals(value)) {
|
||||
return "EXTERNAL";
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
|
||||
private String parseAccountType(String value) {
|
||||
String normalized = toUpper(value);
|
||||
return switch (normalized) {
|
||||
case "银行账户" -> "BANK";
|
||||
case "证券账户" -> "SECURITIES";
|
||||
case "支付账户" -> "PAYMENT";
|
||||
case "其他" -> "OTHER";
|
||||
default -> normalized;
|
||||
};
|
||||
}
|
||||
|
||||
private String parseBankScope(String value) {
|
||||
String normalized = toUpper(value);
|
||||
return switch (normalized) {
|
||||
case "行内" -> "INTERNAL";
|
||||
case "行外" -> "EXTERNAL";
|
||||
default -> normalized;
|
||||
};
|
||||
}
|
||||
|
||||
private Integer parseStatus(String value) {
|
||||
String normalized = trimToNull(value);
|
||||
if (normalized == null) {
|
||||
return null;
|
||||
}
|
||||
return switch (normalized) {
|
||||
case "1", "正常" -> 1;
|
||||
case "2", "已销户" -> 2;
|
||||
default -> throw new RuntimeException("状态仅支持“正常/已销户”或“1/2”");
|
||||
};
|
||||
}
|
||||
|
||||
private Integer parseBooleanFlag(String value, Integer defaultValue) {
|
||||
String normalized = trimToNull(value);
|
||||
if (normalized == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
return switch (normalized) {
|
||||
case "1", "是", "Y", "YES", "TRUE", "true" -> 1;
|
||||
case "0", "否", "N", "NO", "FALSE", "false" -> 0;
|
||||
default -> throw new RuntimeException("是否实控账户仅支持“是/否”或“1/0”");
|
||||
};
|
||||
}
|
||||
|
||||
private Integer parseInteger(String value) {
|
||||
String normalized = trimToNull(value);
|
||||
if (normalized == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Integer.valueOf(normalized);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new RuntimeException("月均交易笔数格式不正确");
|
||||
}
|
||||
}
|
||||
|
||||
private BigDecimal parseDecimal(String value) {
|
||||
String normalized = trimToNull(value);
|
||||
if (normalized == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return new BigDecimal(normalized);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new RuntimeException("金额字段格式不正确");
|
||||
}
|
||||
}
|
||||
|
||||
private String parseLevel(String value, String fieldLabel) {
|
||||
String normalized = toUpper(value);
|
||||
if (StringUtils.isEmpty(normalized)) {
|
||||
return null;
|
||||
}
|
||||
return switch (normalized) {
|
||||
case "低", "LOW" -> "LOW";
|
||||
case "中", "MEDIUM" -> "MEDIUM";
|
||||
case "高", "HIGH" -> "HIGH";
|
||||
default -> throw new RuntimeException(fieldLabel + "仅支持 LOW/MEDIUM/HIGH");
|
||||
};
|
||||
}
|
||||
|
||||
private Date parseDateRequired(String value, String fieldLabel) {
|
||||
Date date = parseDateOptional(value);
|
||||
if (date == null) {
|
||||
throw new RuntimeException(fieldLabel + "不能为空");
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
private Date parseDateOptional(String value) {
|
||||
String normalized = trimToNull(value);
|
||||
if (normalized == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
synchronized (DATE_FORMAT) {
|
||||
return DATE_FORMAT.parse(normalized);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException("日期格式需为 yyyy-MM-dd");
|
||||
}
|
||||
}
|
||||
|
||||
private String trimToNull(String value) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
return null;
|
||||
}
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
private String ownerTypeLabel(String value) {
|
||||
return switch (value) {
|
||||
case "EMPLOYEE" -> "员工";
|
||||
case "RELATION" -> "员工关系人";
|
||||
case "INTERMEDIARY" -> "中介";
|
||||
case "EXTERNAL" -> "外部人员";
|
||||
default -> value;
|
||||
};
|
||||
}
|
||||
|
||||
private String accountTypeLabel(String value) {
|
||||
return switch (value) {
|
||||
case "BANK" -> "银行账户";
|
||||
case "SECURITIES" -> "证券账户";
|
||||
case "PAYMENT" -> "支付账户";
|
||||
case "OTHER" -> "其他";
|
||||
default -> value;
|
||||
};
|
||||
}
|
||||
|
||||
private String bankScopeLabel(String value) {
|
||||
return switch (value) {
|
||||
case "INTERNAL" -> "行内";
|
||||
case "EXTERNAL" -> "行外";
|
||||
default -> value;
|
||||
};
|
||||
}
|
||||
|
||||
private String formatYesNo(Integer value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
return value == 1 ? "是" : "否";
|
||||
}
|
||||
|
||||
private String formatDate(Date value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
synchronized (DATE_FORMAT) {
|
||||
return DATE_FORMAT.format(value);
|
||||
}
|
||||
}
|
||||
|
||||
private String formatNumber(Number value) {
|
||||
return value == null ? "" : String.valueOf(value);
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,17 @@ package com.ruoyi.info.collection.service.impl;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffRecruitment;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffRecruitmentWork;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentAddDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportResult;
|
||||
import com.ruoyi.info.collection.domain.vo.ImportStatusVO;
|
||||
import com.ruoyi.info.collection.domain.vo.RecruitmentImportFailureVO;
|
||||
import com.ruoyi.info.collection.enums.AdmitStatus;
|
||||
import com.ruoyi.info.collection.enums.RecruitType;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentWorkMapper;
|
||||
import com.ruoyi.info.collection.service.ICcdiStaffRecruitmentImportService;
|
||||
import com.ruoyi.info.collection.utils.ImportLogUtils;
|
||||
import com.ruoyi.common.utils.IdCardUtil;
|
||||
@@ -43,6 +47,9 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
@Resource
|
||||
private CcdiStaffRecruitmentMapper recruitmentMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiStaffRecruitmentWorkMapper recruitmentWorkMapper;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
@@ -60,10 +67,10 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
List<CcdiStaffRecruitment> newRecords = new ArrayList<>();
|
||||
List<RecruitmentImportFailureVO> failures = new ArrayList<>();
|
||||
|
||||
// 批量查询已存在的招聘项目编号
|
||||
ImportLogUtils.logBatchQueryStart(log, taskId, "已存在的招聘项目编号", excelList.size());
|
||||
// 批量查询已存在的招聘记录编号
|
||||
ImportLogUtils.logBatchQueryStart(log, taskId, "已存在的招聘记录编号", excelList.size());
|
||||
Set<String> existingRecruitIds = getExistingRecruitIds(excelList);
|
||||
ImportLogUtils.logBatchQueryComplete(log, taskId, "招聘项目编号", existingRecruitIds.size());
|
||||
ImportLogUtils.logBatchQueryComplete(log, taskId, "招聘记录编号", existingRecruitIds.size());
|
||||
|
||||
// 用于检测Excel内部的重复ID
|
||||
Set<String> excelProcessedIds = new HashSet<>();
|
||||
@@ -76,19 +83,21 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
// 转换为AddDTO进行验证
|
||||
CcdiStaffRecruitmentAddDTO addDTO = new CcdiStaffRecruitmentAddDTO();
|
||||
BeanUtils.copyProperties(excel, addDTO);
|
||||
addDTO.setRecruitType(RecruitType.inferCode(addDTO.getRecruitName()));
|
||||
|
||||
// 验证数据
|
||||
validateRecruitmentData(addDTO, existingRecruitIds);
|
||||
|
||||
CcdiStaffRecruitment recruitment = new CcdiStaffRecruitment();
|
||||
BeanUtils.copyProperties(excel, recruitment);
|
||||
recruitment.setRecruitType(addDTO.getRecruitType());
|
||||
|
||||
if (existingRecruitIds.contains(excel.getRecruitId())) {
|
||||
// 招聘项目编号在数据库中已存在,直接报错
|
||||
throw new RuntimeException(String.format("招聘项目编号[%s]已存在,请勿重复导入", excel.getRecruitId()));
|
||||
// 招聘记录编号在数据库中已存在,直接报错
|
||||
throw new RuntimeException(String.format("招聘记录编号[%s]已存在,请勿重复导入", excel.getRecruitId()));
|
||||
} else if (excelProcessedIds.contains(excel.getRecruitId())) {
|
||||
// 招聘项目编号在Excel文件内部重复
|
||||
throw new RuntimeException(String.format("招聘项目编号[%s]在导入文件中重复,已跳过此条记录", excel.getRecruitId()));
|
||||
// 招聘记录编号在Excel文件内部重复
|
||||
throw new RuntimeException(String.format("招聘记录编号[%s]在导入文件中重复,已跳过此条记录", excel.getRecruitId()));
|
||||
} else {
|
||||
recruitment.setCreatedBy(userName);
|
||||
recruitment.setUpdatedBy(userName);
|
||||
@@ -107,7 +116,7 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
failures.add(failure);
|
||||
|
||||
// 记录验证失败日志
|
||||
String keyData = String.format("招聘项目编号=%s, 项目名称=%s, 应聘人员=%s",
|
||||
String keyData = String.format("招聘记录编号=%s, 项目名称=%s, 应聘人员=%s",
|
||||
excel.getRecruitId(), excel.getRecruitName(), excel.getCandName());
|
||||
ImportLogUtils.logValidationError(log, taskId, i + 1, e.getMessage(), keyData);
|
||||
}
|
||||
@@ -142,7 +151,85 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
|
||||
// 记录导入完成
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
ImportLogUtils.logImportComplete(log, taskId, "招聘信息",
|
||||
ImportLogUtils.logImportComplete(log, taskId, "招聘信息",
|
||||
excelList.size(), result.getSuccessCount(), result.getFailureCount(), duration);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Async
|
||||
@Transactional
|
||||
public void importRecruitmentWorkAsync(List<CcdiStaffRecruitmentWorkExcel> excelList,
|
||||
String taskId,
|
||||
String userName) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
ImportLogUtils.logImportStart(log, taskId, "招聘历史工作经历", excelList.size(), userName);
|
||||
|
||||
List<RecruitmentImportFailureVO> failures = new ArrayList<>();
|
||||
List<CcdiStaffRecruitmentWork> validRecords = new ArrayList<>();
|
||||
Set<String> failedRecruitIds = new HashSet<>();
|
||||
Set<String> processedRecruitSortKeys = new HashSet<>();
|
||||
|
||||
Map<String, CcdiStaffRecruitment> recruitmentMap = getRecruitmentMap(excelList);
|
||||
|
||||
for (int i = 0; i < excelList.size(); i++) {
|
||||
CcdiStaffRecruitmentWorkExcel excel = excelList.get(i);
|
||||
try {
|
||||
CcdiStaffRecruitment recruitment = recruitmentMap.get(trim(excel.getRecruitId()));
|
||||
validateRecruitmentWorkData(excel, recruitment, processedRecruitSortKeys);
|
||||
|
||||
CcdiStaffRecruitmentWork work = new CcdiStaffRecruitmentWork();
|
||||
BeanUtils.copyProperties(excel, work);
|
||||
work.setRecruitId(trim(excel.getRecruitId()));
|
||||
work.setCreatedBy(userName);
|
||||
work.setUpdatedBy(userName);
|
||||
validRecords.add(work);
|
||||
|
||||
ImportLogUtils.logProgress(log, taskId, i + 1, excelList.size(),
|
||||
validRecords.size(), failures.size());
|
||||
} catch (Exception e) {
|
||||
failedRecruitIds.add(trim(excel.getRecruitId()));
|
||||
failures.add(buildWorkFailure(excel, e.getMessage()));
|
||||
String keyData = String.format("招聘记录编号=%s, 候选人=%s, 工作单位=%s",
|
||||
excel.getRecruitId(), excel.getCandName(), excel.getCompanyName());
|
||||
ImportLogUtils.logValidationError(log, taskId, i + 1, e.getMessage(), keyData);
|
||||
}
|
||||
}
|
||||
|
||||
List<CcdiStaffRecruitmentWork> importRecords = validRecords.stream()
|
||||
.filter(work -> !failedRecruitIds.contains(work.getRecruitId()))
|
||||
.toList();
|
||||
appendSkippedFailures(validRecords, failedRecruitIds, failures);
|
||||
|
||||
if (!importRecords.isEmpty()) {
|
||||
Set<String> importRecruitIds = importRecords.stream()
|
||||
.map(CcdiStaffRecruitmentWork::getRecruitId)
|
||||
.collect(Collectors.toSet());
|
||||
LambdaQueryWrapper<CcdiStaffRecruitmentWork> deleteWrapper = new LambdaQueryWrapper<>();
|
||||
deleteWrapper.in(CcdiStaffRecruitmentWork::getRecruitId, importRecruitIds);
|
||||
recruitmentWorkMapper.delete(deleteWrapper);
|
||||
|
||||
importRecords.forEach(recruitmentWorkMapper::insert);
|
||||
}
|
||||
|
||||
if (!failures.isEmpty()) {
|
||||
try {
|
||||
String failuresKey = "import:recruitment:" + taskId + ":failures";
|
||||
redisTemplate.opsForValue().set(failuresKey, failures, 7, TimeUnit.DAYS);
|
||||
ImportLogUtils.logRedisOperation(log, taskId, "保存失败记录", failures.size());
|
||||
} catch (Exception e) {
|
||||
ImportLogUtils.logRedisError(log, taskId, "保存失败记录", e);
|
||||
}
|
||||
}
|
||||
|
||||
ImportResult result = new ImportResult();
|
||||
result.setTotalCount(excelList.size());
|
||||
result.setSuccessCount(importRecords.size());
|
||||
result.setFailureCount(failures.size());
|
||||
String finalStatus = result.getFailureCount() == 0 ? "SUCCESS" : "PARTIAL_SUCCESS";
|
||||
updateImportStatus(taskId, finalStatus, result);
|
||||
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
ImportLogUtils.logImportComplete(log, taskId, "招聘历史工作经历",
|
||||
excelList.size(), result.getSuccessCount(), result.getFailureCount(), duration);
|
||||
}
|
||||
|
||||
@@ -184,7 +271,7 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询已存在的招聘项目编号
|
||||
* 批量查询已存在的招聘记录编号
|
||||
*/
|
||||
private Set<String> getExistingRecruitIds(List<CcdiStaffRecruitmentExcel> excelList) {
|
||||
List<String> recruitIds = excelList.stream()
|
||||
@@ -212,7 +299,7 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
Set<String> existingRecruitIds) {
|
||||
// 验证必填字段
|
||||
if (StringUtils.isEmpty(addDTO.getRecruitId())) {
|
||||
throw new RuntimeException("招聘项目编号不能为空");
|
||||
throw new RuntimeException("招聘记录编号不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(addDTO.getRecruitName())) {
|
||||
throw new RuntimeException("招聘项目名称不能为空");
|
||||
@@ -247,6 +334,9 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
if (StringUtils.isEmpty(addDTO.getAdmitStatus())) {
|
||||
throw new RuntimeException("录用情况不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(addDTO.getRecruitType())) {
|
||||
throw new RuntimeException("招聘类型不能为空");
|
||||
}
|
||||
|
||||
// 验证证件号码格式
|
||||
String idCardError = IdCardUtil.getErrorMessage(addDTO.getCandId());
|
||||
@@ -263,6 +353,115 @@ public class CcdiStaffRecruitmentImportServiceImpl implements ICcdiStaffRecruitm
|
||||
if (AdmitStatus.getDescByCode(addDTO.getAdmitStatus()) == null) {
|
||||
throw new RuntimeException("录用情况只能填写'录用'、'未录用'或'放弃'");
|
||||
}
|
||||
|
||||
if (RecruitType.getDescByCode(addDTO.getRecruitType()) == null) {
|
||||
throw new RuntimeException("招聘类型只能填写'SOCIAL'或'CAMPUS'");
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, CcdiStaffRecruitment> getRecruitmentMap(List<CcdiStaffRecruitmentWorkExcel> excelList) {
|
||||
List<String> recruitIds = excelList.stream()
|
||||
.map(CcdiStaffRecruitmentWorkExcel::getRecruitId)
|
||||
.map(this::trim)
|
||||
.filter(StringUtils::isNotEmpty)
|
||||
.distinct()
|
||||
.toList();
|
||||
if (recruitIds.isEmpty()) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<CcdiStaffRecruitment> recruitments = recruitmentMapper.selectBatchIds(recruitIds);
|
||||
return recruitments.stream()
|
||||
.collect(Collectors.toMap(CcdiStaffRecruitment::getRecruitId, item -> item));
|
||||
}
|
||||
|
||||
private void validateRecruitmentWorkData(CcdiStaffRecruitmentWorkExcel excel,
|
||||
CcdiStaffRecruitment recruitment,
|
||||
Set<String> processedRecruitSortKeys) {
|
||||
if (StringUtils.isEmpty(trim(excel.getRecruitId()))) {
|
||||
throw new RuntimeException("招聘记录编号不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getCandName()))) {
|
||||
throw new RuntimeException("候选人姓名不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getRecruitName()))) {
|
||||
throw new RuntimeException("招聘项目名称不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getPosName()))) {
|
||||
throw new RuntimeException("职位名称不能为空");
|
||||
}
|
||||
if (excel.getSortOrder() == null || excel.getSortOrder() <= 0) {
|
||||
throw new RuntimeException("排序号不能为空且必须大于0");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getCompanyName()))) {
|
||||
throw new RuntimeException("工作单位不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getPositionName()))) {
|
||||
throw new RuntimeException("岗位不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(trim(excel.getJobStartMonth()))) {
|
||||
throw new RuntimeException("入职年月不能为空");
|
||||
}
|
||||
validateMonth(excel.getJobStartMonth(), "入职年月");
|
||||
if (StringUtils.isNotEmpty(trim(excel.getJobEndMonth()))) {
|
||||
validateMonth(excel.getJobEndMonth(), "离职年月");
|
||||
}
|
||||
if (recruitment == null) {
|
||||
throw new RuntimeException("招聘记录编号不存在,请先维护招聘主信息");
|
||||
}
|
||||
if (!"SOCIAL".equals(recruitment.getRecruitType())) {
|
||||
throw new RuntimeException("该招聘记录不是社招,不允许导入历史工作经历");
|
||||
}
|
||||
if (!sameText(excel.getCandName(), recruitment.getCandName())) {
|
||||
throw new RuntimeException("招聘记录编号与候选人姓名不匹配");
|
||||
}
|
||||
if (!sameText(excel.getRecruitName(), recruitment.getRecruitName())) {
|
||||
throw new RuntimeException("招聘记录编号与招聘项目名称不匹配");
|
||||
}
|
||||
if (!sameText(excel.getPosName(), recruitment.getPosName())) {
|
||||
throw new RuntimeException("招聘记录编号与职位名称不匹配");
|
||||
}
|
||||
String duplicateKey = trim(excel.getRecruitId()) + "#" + excel.getSortOrder();
|
||||
if (!processedRecruitSortKeys.add(duplicateKey)) {
|
||||
throw new RuntimeException("同一招聘记录编号下排序号重复");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateMonth(String value, String fieldName) {
|
||||
String month = trim(value);
|
||||
if (!month.matches("^((19|20)\\d{2})-(0[1-9]|1[0-2])$")) {
|
||||
throw new RuntimeException(fieldName + "格式不正确,应为YYYY-MM");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean sameText(String first, String second) {
|
||||
return Objects.equals(trim(first), trim(second));
|
||||
}
|
||||
|
||||
private String trim(String value) {
|
||||
return value == null ? null : value.trim();
|
||||
}
|
||||
|
||||
private RecruitmentImportFailureVO buildWorkFailure(CcdiStaffRecruitmentWorkExcel excel, String errorMessage) {
|
||||
RecruitmentImportFailureVO failure = new RecruitmentImportFailureVO();
|
||||
BeanUtils.copyProperties(excel, failure);
|
||||
failure.setErrorMessage(errorMessage);
|
||||
return failure;
|
||||
}
|
||||
|
||||
private void appendSkippedFailures(List<CcdiStaffRecruitmentWork> validRecords,
|
||||
Set<String> failedRecruitIds,
|
||||
List<RecruitmentImportFailureVO> failures) {
|
||||
Set<String> appendedRecruitIds = new HashSet<>();
|
||||
for (CcdiStaffRecruitmentWork work : validRecords) {
|
||||
if (failedRecruitIds.contains(work.getRecruitId()) && appendedRecruitIds.add(work.getRecruitId())) {
|
||||
RecruitmentImportFailureVO failure = new RecruitmentImportFailureVO();
|
||||
failure.setRecruitId(work.getRecruitId());
|
||||
failure.setCompanyName(work.getCompanyName());
|
||||
failure.setPositionName(work.getPositionName());
|
||||
failure.setErrorMessage("同一招聘记录编号存在失败行,已跳过该编号下全部工作经历,避免覆盖旧数据");
|
||||
failures.add(failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.ruoyi.info.collection.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffRecruitment;
|
||||
import com.ruoyi.info.collection.domain.CcdiStaffRecruitmentWork;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentWorkVO;
|
||||
import com.ruoyi.info.collection.enums.AdmitStatus;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentWorkMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentMapper;
|
||||
import com.ruoyi.info.collection.service.ICcdiStaffRecruitmentImportService;
|
||||
import com.ruoyi.info.collection.service.ICcdiStaffRecruitmentService;
|
||||
@@ -19,6 +24,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -37,6 +43,9 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
@Resource
|
||||
private CcdiStaffRecruitmentMapper recruitmentMapper;
|
||||
|
||||
@Resource
|
||||
private CcdiStaffRecruitmentWorkMapper recruitmentWorkMapper;
|
||||
|
||||
@Resource
|
||||
private ICcdiStaffRecruitmentImportService recruitmentImportService;
|
||||
|
||||
@@ -96,7 +105,7 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
/**
|
||||
* 查询招聘信息详情
|
||||
*
|
||||
* @param recruitId 招聘项目编号
|
||||
* @param recruitId 招聘记录编号
|
||||
* @return 招聘信息VO
|
||||
*/
|
||||
@Override
|
||||
@@ -104,6 +113,7 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
CcdiStaffRecruitmentVO vo = recruitmentMapper.selectRecruitmentById(recruitId);
|
||||
if (vo != null) {
|
||||
vo.setAdmitStatusDesc(AdmitStatus.getDescByCode(vo.getAdmitStatus()));
|
||||
vo.setWorkExperienceList(selectWorkExperienceList(recruitId));
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
@@ -117,9 +127,9 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertRecruitment(CcdiStaffRecruitmentAddDTO addDTO) {
|
||||
// 检查招聘项目编号唯一性
|
||||
// 检查招聘记录编号唯一性
|
||||
if (recruitmentMapper.selectById(addDTO.getRecruitId()) != null) {
|
||||
throw new RuntimeException("该招聘项目编号已存在");
|
||||
throw new RuntimeException("该招聘记录编号已存在");
|
||||
}
|
||||
|
||||
CcdiStaffRecruitment recruitment = new CcdiStaffRecruitment();
|
||||
@@ -148,12 +158,15 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
/**
|
||||
* 批量删除招聘信息
|
||||
*
|
||||
* @param recruitIds 需要删除的招聘项目编号
|
||||
* @param recruitIds 需要删除的招聘记录编号
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteRecruitmentByIds(String[] recruitIds) {
|
||||
LambdaQueryWrapper<CcdiStaffRecruitmentWork> workWrapper = new LambdaQueryWrapper<>();
|
||||
workWrapper.in(CcdiStaffRecruitmentWork::getRecruitId, List.of(recruitIds));
|
||||
recruitmentWorkMapper.delete(workWrapper);
|
||||
return recruitmentMapper.deleteBatchIds(List.of(recruitIds));
|
||||
}
|
||||
|
||||
@@ -197,4 +210,56 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入招聘记录历史工作经历数据(异步)
|
||||
*
|
||||
* @param excelList Excel实体列表
|
||||
* @return 任务ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public String importRecruitmentWork(List<CcdiStaffRecruitmentWorkExcel> excelList) {
|
||||
if (StringUtils.isNull(excelList) || excelList.isEmpty()) {
|
||||
throw new RuntimeException("至少需要一条数据");
|
||||
}
|
||||
|
||||
String taskId = UUID.randomUUID().toString();
|
||||
long startTime = System.currentTimeMillis();
|
||||
String userName = SecurityUtils.getUsername();
|
||||
|
||||
String statusKey = "import:recruitment:" + taskId;
|
||||
Map<String, Object> statusData = new HashMap<>();
|
||||
statusData.put("taskId", taskId);
|
||||
statusData.put("status", "PROCESSING");
|
||||
statusData.put("totalCount", excelList.size());
|
||||
statusData.put("successCount", 0);
|
||||
statusData.put("failureCount", 0);
|
||||
statusData.put("progress", 0);
|
||||
statusData.put("startTime", startTime);
|
||||
statusData.put("message", "正在处理历史工作经历...");
|
||||
|
||||
redisTemplate.opsForHash().putAll(statusKey, statusData);
|
||||
redisTemplate.expire(statusKey, 7, TimeUnit.DAYS);
|
||||
|
||||
recruitmentImportService.importRecruitmentWorkAsync(excelList, taskId, userName);
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
private List<CcdiStaffRecruitmentWorkVO> selectWorkExperienceList(String recruitId) {
|
||||
LambdaQueryWrapper<CcdiStaffRecruitmentWork> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CcdiStaffRecruitmentWork::getRecruitId, recruitId)
|
||||
.orderByAsc(CcdiStaffRecruitmentWork::getSortOrder)
|
||||
.orderByDesc(CcdiStaffRecruitmentWork::getId);
|
||||
List<CcdiStaffRecruitmentWork> workList = recruitmentWorkMapper.selectList(wrapper);
|
||||
if (workList == null || workList.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return workList.stream().map(work -> {
|
||||
CcdiStaffRecruitmentWorkVO vo = new CcdiStaffRecruitmentWorkVO();
|
||||
BeanUtils.copyProperties(work, vo);
|
||||
return vo;
|
||||
}).toList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<?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.info.collection.mapper.CcdiAccountInfoMapper">
|
||||
|
||||
<resultMap id="CcdiAccountInfoVOResult" type="com.ruoyi.info.collection.domain.vo.CcdiAccountInfoVO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="ownerType" column="ownerType"/>
|
||||
<result property="ownerId" column="ownerId"/>
|
||||
<result property="staffId" column="staffId"/>
|
||||
<result property="staffName" column="staffName"/>
|
||||
<result property="relationId" column="relationId"/>
|
||||
<result property="relationType" column="relationType"/>
|
||||
<result property="relationName" column="relationName"/>
|
||||
<result property="relationCertNo" column="relationCertNo"/>
|
||||
<result property="accountNo" column="accountNo"/>
|
||||
<result property="accountType" column="accountType"/>
|
||||
<result property="bankScope" column="bankScope"/>
|
||||
<result property="accountName" column="accountName"/>
|
||||
<result property="openBank" column="openBank"/>
|
||||
<result property="bankCode" column="bankCode"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="effectiveDate" column="effectiveDate"/>
|
||||
<result property="invalidDate" column="invalidDate"/>
|
||||
<result property="isActualControl" column="isActualControl"/>
|
||||
<result property="avgMonthTxnCount" column="avgMonthTxnCount"/>
|
||||
<result property="avgMonthTxnAmount" column="avgMonthTxnAmount"/>
|
||||
<result property="txnFrequencyLevel" column="txnFrequencyLevel"/>
|
||||
<result property="debitSingleMaxAmount" column="debitSingleMaxAmount"/>
|
||||
<result property="creditSingleMaxAmount" column="creditSingleMaxAmount"/>
|
||||
<result property="debitDailyMaxAmount" column="debitDailyMaxAmount"/>
|
||||
<result property="creditDailyMaxAmount" column="creditDailyMaxAmount"/>
|
||||
<result property="txnRiskLevel" column="txnRiskLevel"/>
|
||||
<result property="createBy" column="createBy"/>
|
||||
<result property="createTime" column="createTime"/>
|
||||
<result property="updateBy" column="updateBy"/>
|
||||
<result property="updateTime" column="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="AccountInfoSelectColumns">
|
||||
ai.account_id AS id,
|
||||
ai.owner_type AS ownerType,
|
||||
ai.owner_id AS ownerId,
|
||||
CASE
|
||||
WHEN ai.owner_type = 'EMPLOYEE' THEN bs.staff_id
|
||||
WHEN ai.owner_type = 'RELATION' THEN bsRel.staff_id
|
||||
ELSE NULL
|
||||
END AS staffId,
|
||||
CASE
|
||||
WHEN ai.owner_type = 'EMPLOYEE' THEN bs.name
|
||||
WHEN ai.owner_type = 'RELATION' THEN bsRel.name
|
||||
ELSE NULL
|
||||
END AS staffName,
|
||||
CASE WHEN ai.owner_type = 'RELATION' THEN fr.id ELSE NULL END AS relationId,
|
||||
CASE WHEN ai.owner_type = 'RELATION' THEN fr.relation_type ELSE NULL END AS relationType,
|
||||
CASE WHEN ai.owner_type = 'RELATION' THEN fr.relation_name ELSE NULL END AS relationName,
|
||||
CASE WHEN ai.owner_type = 'RELATION' THEN fr.relation_cert_no ELSE NULL END AS relationCertNo,
|
||||
ai.account_no AS accountNo,
|
||||
ai.account_type AS accountType,
|
||||
ai.bank_scope AS bankScope,
|
||||
ai.account_name AS accountName,
|
||||
ai.bank AS openBank,
|
||||
ai.bank_code AS bankCode,
|
||||
ai.currency AS currency,
|
||||
ai.status AS status,
|
||||
ai.effective_date AS effectiveDate,
|
||||
ai.invalid_date AS invalidDate,
|
||||
ar.is_self_account AS isActualControl,
|
||||
ar.monthly_avg_trans_count AS avgMonthTxnCount,
|
||||
ar.monthly_avg_trans_amount AS avgMonthTxnAmount,
|
||||
ar.trans_freq_type AS txnFrequencyLevel,
|
||||
ar.dr_max_single_amount AS debitSingleMaxAmount,
|
||||
ar.cr_max_single_amount AS creditSingleMaxAmount,
|
||||
ar.dr_max_daily_amount AS debitDailyMaxAmount,
|
||||
ar.cr_max_daily_amount AS creditDailyMaxAmount,
|
||||
ar.trans_risk_level AS txnRiskLevel,
|
||||
ai.create_by AS createBy,
|
||||
ai.create_time AS createTime,
|
||||
ai.update_by AS updateBy,
|
||||
ai.update_time AS updateTime
|
||||
</sql>
|
||||
|
||||
<sql id="AccountInfoWhereClause">
|
||||
WHERE 1 = 1
|
||||
<if test="query.staffName != null and query.staffName != ''">
|
||||
AND (
|
||||
(ai.owner_type = 'EMPLOYEE' AND bs.name LIKE CONCAT('%', #{query.staffName}, '%'))
|
||||
OR
|
||||
(ai.owner_type = 'RELATION' AND bsRel.name LIKE CONCAT('%', #{query.staffName}, '%'))
|
||||
)
|
||||
</if>
|
||||
<if test="query.ownerType != null and query.ownerType != ''">
|
||||
AND ai.owner_type = #{query.ownerType}
|
||||
</if>
|
||||
<if test="query.bankScope != null and query.bankScope != ''">
|
||||
AND ai.bank_scope = #{query.bankScope}
|
||||
</if>
|
||||
<if test="query.relationType != null and query.relationType != ''">
|
||||
AND fr.relation_type = #{query.relationType}
|
||||
</if>
|
||||
<if test="query.accountName != null and query.accountName != ''">
|
||||
AND ai.account_name LIKE CONCAT('%', #{query.accountName}, '%')
|
||||
</if>
|
||||
<if test="query.accountType != null and query.accountType != ''">
|
||||
AND ai.account_type = #{query.accountType}
|
||||
</if>
|
||||
<if test="query.isActualControl != null">
|
||||
AND ar.is_self_account = #{query.isActualControl}
|
||||
</if>
|
||||
<if test="query.riskLevel != null and query.riskLevel != ''">
|
||||
AND ar.trans_risk_level = #{query.riskLevel}
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
AND ai.status = #{query.status}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAccountInfoPage" resultMap="CcdiAccountInfoVOResult">
|
||||
SELECT
|
||||
<include refid="AccountInfoSelectColumns"/>
|
||||
FROM ccdi_account_info ai
|
||||
LEFT JOIN ccdi_account_result ar ON ai.account_no = ar.account_no
|
||||
LEFT JOIN ccdi_base_staff bs ON ai.owner_type = 'EMPLOYEE' AND ai.owner_id = bs.id_card
|
||||
LEFT JOIN ccdi_staff_fmy_relation fr ON ai.owner_type = 'RELATION' AND ai.owner_id = fr.relation_cert_no
|
||||
LEFT JOIN ccdi_base_staff bsRel ON fr.person_id = bsRel.id_card
|
||||
<include refid="AccountInfoWhereClause"/>
|
||||
ORDER BY ai.update_time DESC, ai.account_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAccountInfoListForExport" resultMap="CcdiAccountInfoVOResult">
|
||||
SELECT
|
||||
<include refid="AccountInfoSelectColumns"/>
|
||||
FROM ccdi_account_info ai
|
||||
LEFT JOIN ccdi_account_result ar ON ai.account_no = ar.account_no
|
||||
LEFT JOIN ccdi_base_staff bs ON ai.owner_type = 'EMPLOYEE' AND ai.owner_id = bs.id_card
|
||||
LEFT JOIN ccdi_staff_fmy_relation fr ON ai.owner_type = 'RELATION' AND ai.owner_id = fr.relation_cert_no
|
||||
LEFT JOIN ccdi_base_staff bsRel ON fr.person_id = bsRel.id_card
|
||||
<include refid="AccountInfoWhereClause"/>
|
||||
ORDER BY ai.update_time DESC, ai.account_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAccountInfoById" resultMap="CcdiAccountInfoVOResult">
|
||||
SELECT
|
||||
<include refid="AccountInfoSelectColumns"/>
|
||||
FROM ccdi_account_info ai
|
||||
LEFT JOIN ccdi_account_result ar ON ai.account_no = ar.account_no
|
||||
LEFT JOIN ccdi_base_staff bs ON ai.owner_type = 'EMPLOYEE' AND ai.owner_id = bs.id_card
|
||||
LEFT JOIN ccdi_staff_fmy_relation fr ON ai.owner_type = 'RELATION' AND ai.owner_id = fr.relation_cert_no
|
||||
LEFT JOIN ccdi_base_staff bsRel ON fr.person_id = bsRel.id_card
|
||||
WHERE ai.account_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectRelationOptionsByStaffId" resultType="com.ruoyi.info.collection.domain.vo.CcdiAccountRelationOptionVO">
|
||||
SELECT
|
||||
fr.id,
|
||||
fr.relation_name AS relationName,
|
||||
fr.relation_type AS relationType,
|
||||
fr.relation_cert_no AS relationCertNo
|
||||
FROM ccdi_staff_fmy_relation fr
|
||||
INNER JOIN ccdi_base_staff bs ON fr.person_id = bs.id_card
|
||||
WHERE bs.staff_id = #{staffId}
|
||||
AND fr.is_emp_family = 1
|
||||
AND fr.status = 1
|
||||
ORDER BY fr.id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -86,6 +86,7 @@
|
||||
e.staff_id,
|
||||
e.name,
|
||||
e.dept_id,
|
||||
e.id_card,
|
||||
d.dept_name
|
||||
FROM ccdi_base_staff e
|
||||
LEFT JOIN sys_dept d ON e.dept_id = d.dept_id
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
<result property="posCategory" column="pos_category"/>
|
||||
<result property="posDesc" column="pos_desc"/>
|
||||
<result property="candName" column="cand_name"/>
|
||||
<result property="recruitType" column="recruit_type"/>
|
||||
<result property="candEdu" column="cand_edu"/>
|
||||
<result property="candId" column="cand_id"/>
|
||||
<result property="candSchool" column="cand_school"/>
|
||||
<result property="candMajor" column="cand_major"/>
|
||||
<result property="candGrad" column="cand_grad"/>
|
||||
<result property="admitStatus" column="admit_status"/>
|
||||
<result property="workExperienceCount" column="work_experience_count"/>
|
||||
<result property="interviewerName1" column="interviewer_name1"/>
|
||||
<result property="interviewerId1" column="interviewer_id1"/>
|
||||
<result property="interviewerName2" column="interviewer_name2"/>
|
||||
@@ -31,44 +33,53 @@
|
||||
<!-- 分页查询招聘信息列表 -->
|
||||
<select id="selectRecruitmentPage" resultMap="CcdiStaffRecruitmentVOResult">
|
||||
SELECT
|
||||
recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
cand_name, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
admit_status, interviewer_name1, interviewer_id1, interviewer_name2, interviewer_id2,
|
||||
created_by, create_time, updated_by, update_time
|
||||
FROM ccdi_staff_recruitment
|
||||
r.recruit_id, r.recruit_name, r.pos_name, r.pos_category, r.pos_desc,
|
||||
r.cand_name, r.recruit_type, r.cand_edu, r.cand_id, r.cand_school, r.cand_major, r.cand_grad,
|
||||
r.admit_status, COALESCE(w.work_experience_count, 0) AS work_experience_count,
|
||||
r.interviewer_name1, r.interviewer_id1, r.interviewer_name2, r.interviewer_id2,
|
||||
r.created_by, r.create_time, r.updated_by, r.update_time
|
||||
FROM ccdi_staff_recruitment r
|
||||
LEFT JOIN (
|
||||
SELECT recruit_id, COUNT(1) AS work_experience_count
|
||||
FROM ccdi_staff_recruitment_work
|
||||
GROUP BY recruit_id
|
||||
) w ON w.recruit_id = r.recruit_id
|
||||
<where>
|
||||
<if test="query.recruitName != null and query.recruitName != ''">
|
||||
AND recruit_name LIKE CONCAT('%', #{query.recruitName}, '%')
|
||||
AND r.recruit_name LIKE CONCAT('%', #{query.recruitName}, '%')
|
||||
</if>
|
||||
<if test="query.posName != null and query.posName != ''">
|
||||
AND pos_name LIKE CONCAT('%', #{query.posName}, '%')
|
||||
AND r.pos_name LIKE CONCAT('%', #{query.posName}, '%')
|
||||
</if>
|
||||
<if test="query.candName != null and query.candName != ''">
|
||||
AND cand_name LIKE CONCAT('%', #{query.candName}, '%')
|
||||
AND r.cand_name LIKE CONCAT('%', #{query.candName}, '%')
|
||||
</if>
|
||||
<if test="query.recruitType != null and query.recruitType != ''">
|
||||
AND r.recruit_type = #{query.recruitType}
|
||||
</if>
|
||||
<if test="query.candId != null and query.candId != ''">
|
||||
AND cand_id = #{query.candId}
|
||||
AND r.cand_id = #{query.candId}
|
||||
</if>
|
||||
<if test="query.admitStatus != null and query.admitStatus != ''">
|
||||
AND admit_status = #{query.admitStatus}
|
||||
AND r.admit_status = #{query.admitStatus}
|
||||
</if>
|
||||
<if test="query.interviewerName != null and query.interviewerName != ''">
|
||||
AND (interviewer_name1 LIKE CONCAT('%', #{query.interviewerName}, '%')
|
||||
OR interviewer_name2 LIKE CONCAT('%', #{query.interviewerName}, '%'))
|
||||
AND (r.interviewer_name1 LIKE CONCAT('%', #{query.interviewerName}, '%')
|
||||
OR r.interviewer_name2 LIKE CONCAT('%', #{query.interviewerName}, '%'))
|
||||
</if>
|
||||
<if test="query.interviewerId != null and query.interviewerId != ''">
|
||||
AND (interviewer_id1 = #{query.interviewerId}
|
||||
OR interviewer_id2 = #{query.interviewerId})
|
||||
AND (r.interviewer_id1 = #{query.interviewerId}
|
||||
OR r.interviewer_id2 = #{query.interviewerId})
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
ORDER BY r.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询招聘信息详情 -->
|
||||
<select id="selectRecruitmentById" resultMap="CcdiStaffRecruitmentVOResult">
|
||||
SELECT
|
||||
recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
cand_name, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
cand_name, recruit_type, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
admit_status, interviewer_name1, interviewer_id1, interviewer_name2, interviewer_id2,
|
||||
created_by, create_time, updated_by, update_time
|
||||
FROM ccdi_staff_recruitment
|
||||
@@ -79,13 +90,13 @@
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO ccdi_staff_recruitment
|
||||
(recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
cand_name, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
cand_name, recruit_type, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
admit_status, interviewer_name1, interviewer_id1, interviewer_name2, interviewer_id2,
|
||||
created_by, create_time, updated_by, update_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.recruitId}, #{item.recruitName}, #{item.posName}, #{item.posCategory}, #{item.posDesc},
|
||||
#{item.candName}, #{item.candEdu}, #{item.candId}, #{item.candSchool}, #{item.candMajor}, #{item.candGrad},
|
||||
#{item.candName}, #{item.recruitType}, #{item.candEdu}, #{item.candId}, #{item.candSchool}, #{item.candMajor}, #{item.candGrad},
|
||||
#{item.admitStatus}, #{item.interviewerName1}, #{item.interviewerId1}, #{item.interviewerName2}, #{item.interviewerId2},
|
||||
#{item.createdBy}, NOW(), #{item.updatedBy}, NOW())
|
||||
</foreach>
|
||||
@@ -100,6 +111,7 @@
|
||||
pos_category = #{item.posCategory},
|
||||
pos_desc = #{item.posDesc},
|
||||
cand_name = #{item.candName},
|
||||
recruit_type = #{item.recruitType},
|
||||
cand_edu = #{item.candEdu},
|
||||
cand_id = #{item.candId},
|
||||
cand_school = #{item.candSchool},
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.ccdi.project.controller;
|
||||
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceQueryDTO;
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceSaveDTO;
|
||||
import com.ruoyi.ccdi.project.domain.vo.CcdiEvidenceVO;
|
||||
import com.ruoyi.ccdi.project.service.ICcdiEvidenceService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目证据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ccdi/evidence")
|
||||
@Tag(name = "项目证据")
|
||||
public class CcdiEvidenceController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ICcdiEvidenceService evidenceService;
|
||||
|
||||
/**
|
||||
* 保存证据
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "保存证据")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:project:query')")
|
||||
public AjaxResult saveEvidence(@Validated @RequestBody CcdiEvidenceSaveDTO dto) {
|
||||
CcdiEvidenceVO vo = evidenceService.saveEvidence(dto, SecurityUtils.getUsername());
|
||||
return AjaxResult.success("证据入库成功", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目证据列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查询项目证据列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:project:query')")
|
||||
public AjaxResult listEvidence(CcdiEvidenceQueryDTO queryDTO) {
|
||||
List<CcdiEvidenceVO> list = evidenceService.listEvidence(queryDTO);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询证据详情
|
||||
*/
|
||||
@GetMapping("/{evidenceId}")
|
||||
@Operation(summary = "查询证据详情")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:project:query')")
|
||||
public AjaxResult getEvidence(@PathVariable Long evidenceId) {
|
||||
CcdiEvidenceVO vo = evidenceService.getEvidence(evidenceId);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.ccdi.project.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目证据查询入参
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class CcdiEvidenceQueryDTO {
|
||||
|
||||
/** 项目ID */
|
||||
private Long projectId;
|
||||
|
||||
/** 证据类型:FLOW/MODEL/ASSET */
|
||||
private String evidenceType;
|
||||
|
||||
/** 关键词:姓名、标题、摘要、证据编号 */
|
||||
private String keyword;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.ccdi.project.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 保存项目证据入参
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class CcdiEvidenceSaveDTO {
|
||||
|
||||
/** 项目ID */
|
||||
@NotNull(message = "项目ID不能为空")
|
||||
private Long projectId;
|
||||
|
||||
/** 证据类型:FLOW/MODEL/ASSET */
|
||||
@NotBlank(message = "证据类型不能为空")
|
||||
private String evidenceType;
|
||||
|
||||
/** 关联人员姓名 */
|
||||
@NotBlank(message = "关联人员不能为空")
|
||||
private String relatedPersonName;
|
||||
|
||||
/** 关联人员标识 */
|
||||
private String relatedPersonId;
|
||||
|
||||
/** 证据标题 */
|
||||
@NotBlank(message = "证据标题不能为空")
|
||||
private String evidenceTitle;
|
||||
|
||||
/** 证据摘要 */
|
||||
@NotBlank(message = "证据摘要不能为空")
|
||||
private String evidenceSummary;
|
||||
|
||||
/** 来源类型 */
|
||||
@NotBlank(message = "来源类型不能为空")
|
||||
private String sourceType;
|
||||
|
||||
/** 来源记录ID */
|
||||
private String sourceRecordId;
|
||||
|
||||
/** 来源页面名称 */
|
||||
private String sourcePage;
|
||||
|
||||
/** 证据快照JSON */
|
||||
private String snapshotJson;
|
||||
|
||||
/** 确认理由/备注 */
|
||||
@NotBlank(message = "确认理由/备注不能为空")
|
||||
private String confirmReason;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.ccdi.project.domain.entity;
|
||||
|
||||
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 com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目证据对象 ccdi_evidence
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
@TableName("ccdi_evidence")
|
||||
public class CcdiEvidence implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 证据ID */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long evidenceId;
|
||||
|
||||
/** 项目ID */
|
||||
private Long projectId;
|
||||
|
||||
/** 证据类型:FLOW/MODEL/ASSET */
|
||||
private String evidenceType;
|
||||
|
||||
/** 关联人员姓名 */
|
||||
private String relatedPersonName;
|
||||
|
||||
/** 关联人员标识,优先存身份证号或员工号 */
|
||||
private String relatedPersonId;
|
||||
|
||||
/** 证据标题 */
|
||||
private String evidenceTitle;
|
||||
|
||||
/** 证据摘要 */
|
||||
private String evidenceSummary;
|
||||
|
||||
/** 来源类型:BANK_STATEMENT/MODEL_DETAIL/ASSET_DETAIL */
|
||||
private String sourceType;
|
||||
|
||||
/** 来源记录ID */
|
||||
private String sourceRecordId;
|
||||
|
||||
/** 来源页面名称 */
|
||||
private String sourcePage;
|
||||
|
||||
/** 证据快照JSON */
|
||||
private String snapshotJson;
|
||||
|
||||
/** 确认理由/备注 */
|
||||
private String confirmReason;
|
||||
|
||||
/** 确认人 */
|
||||
private String confirmBy;
|
||||
|
||||
/** 确认时间 */
|
||||
private Date confirmTime;
|
||||
|
||||
/** 创建者 */
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.ccdi.project.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目证据返回对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class CcdiEvidenceVO {
|
||||
|
||||
/** 证据ID */
|
||||
private Long evidenceId;
|
||||
|
||||
/** 项目ID */
|
||||
private Long projectId;
|
||||
|
||||
/** 证据类型:FLOW/MODEL/ASSET */
|
||||
private String evidenceType;
|
||||
|
||||
/** 关联人员姓名 */
|
||||
private String relatedPersonName;
|
||||
|
||||
/** 关联人员标识 */
|
||||
private String relatedPersonId;
|
||||
|
||||
/** 证据标题 */
|
||||
private String evidenceTitle;
|
||||
|
||||
/** 证据摘要 */
|
||||
private String evidenceSummary;
|
||||
|
||||
/** 来源类型 */
|
||||
private String sourceType;
|
||||
|
||||
/** 来源记录ID */
|
||||
private String sourceRecordId;
|
||||
|
||||
/** 来源页面名称 */
|
||||
private String sourcePage;
|
||||
|
||||
/** 证据快照JSON */
|
||||
private String snapshotJson;
|
||||
|
||||
/** 确认理由/备注 */
|
||||
private String confirmReason;
|
||||
|
||||
/** 确认人 */
|
||||
private String confirmBy;
|
||||
|
||||
/** 确认时间 */
|
||||
private Date confirmTime;
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class CcdiProjectPersonAnalysisObjectRecordVO {
|
||||
|
||||
private String modelCode;
|
||||
|
||||
private String title;
|
||||
|
||||
private String subtitle;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.ccdi.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.ccdi.project.domain.entity.CcdiEvidence;
|
||||
|
||||
/**
|
||||
* 项目证据Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface CcdiEvidenceMapper extends BaseMapper<CcdiEvidence> {
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.ccdi.project.service;
|
||||
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceQueryDTO;
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceSaveDTO;
|
||||
import com.ruoyi.ccdi.project.domain.vo.CcdiEvidenceVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目证据Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ICcdiEvidenceService {
|
||||
|
||||
/**
|
||||
* 保存证据
|
||||
*
|
||||
* @param dto 保存入参
|
||||
* @param operator 操作人
|
||||
* @return 证据
|
||||
*/
|
||||
CcdiEvidenceVO saveEvidence(CcdiEvidenceSaveDTO dto, String operator);
|
||||
|
||||
/**
|
||||
* 查询项目证据列表
|
||||
*
|
||||
* @param queryDTO 查询入参
|
||||
* @return 证据列表
|
||||
*/
|
||||
List<CcdiEvidenceVO> listEvidence(CcdiEvidenceQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询证据详情
|
||||
*
|
||||
* @param evidenceId 证据ID
|
||||
* @return 证据
|
||||
*/
|
||||
CcdiEvidenceVO getEvidence(Long evidenceId);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.ccdi.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceQueryDTO;
|
||||
import com.ruoyi.ccdi.project.domain.dto.CcdiEvidenceSaveDTO;
|
||||
import com.ruoyi.ccdi.project.domain.entity.CcdiEvidence;
|
||||
import com.ruoyi.ccdi.project.domain.vo.CcdiEvidenceVO;
|
||||
import com.ruoyi.ccdi.project.mapper.CcdiEvidenceMapper;
|
||||
import com.ruoyi.ccdi.project.service.ICcdiEvidenceService;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目证据Service实现类
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class CcdiEvidenceServiceImpl implements ICcdiEvidenceService {
|
||||
|
||||
@Resource
|
||||
private CcdiEvidenceMapper evidenceMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CcdiEvidenceVO saveEvidence(CcdiEvidenceSaveDTO dto, String operator) {
|
||||
CcdiEvidence evidence = new CcdiEvidence();
|
||||
BeanUtils.copyProperties(dto, evidence);
|
||||
evidence.setConfirmBy(operator);
|
||||
evidence.setConfirmTime(new Date());
|
||||
evidenceMapper.insert(evidence);
|
||||
return toVO(evidence);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CcdiEvidenceVO> listEvidence(CcdiEvidenceQueryDTO queryDTO) {
|
||||
if (queryDTO.getProjectId() == null) {
|
||||
throw new ServiceException("项目ID不能为空");
|
||||
}
|
||||
LambdaQueryWrapper<CcdiEvidence> wrapper = new LambdaQueryWrapper<CcdiEvidence>()
|
||||
.eq(CcdiEvidence::getProjectId, queryDTO.getProjectId())
|
||||
.orderByDesc(CcdiEvidence::getConfirmTime)
|
||||
.orderByDesc(CcdiEvidence::getEvidenceId);
|
||||
|
||||
if (StringUtils.hasText(queryDTO.getEvidenceType())) {
|
||||
wrapper.eq(CcdiEvidence::getEvidenceType, queryDTO.getEvidenceType());
|
||||
}
|
||||
if (StringUtils.hasText(queryDTO.getKeyword())) {
|
||||
String keyword = queryDTO.getKeyword().trim();
|
||||
wrapper.and(item -> item
|
||||
.like(CcdiEvidence::getRelatedPersonName, keyword)
|
||||
.or()
|
||||
.like(CcdiEvidence::getRelatedPersonId, keyword)
|
||||
.or()
|
||||
.like(CcdiEvidence::getEvidenceTitle, keyword)
|
||||
.or()
|
||||
.like(CcdiEvidence::getEvidenceSummary, keyword)
|
||||
);
|
||||
}
|
||||
return evidenceMapper.selectList(wrapper).stream().map(this::toVO).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CcdiEvidenceVO getEvidence(Long evidenceId) {
|
||||
CcdiEvidence evidence = evidenceMapper.selectById(evidenceId);
|
||||
if (evidence == null) {
|
||||
throw new ServiceException("证据不存在");
|
||||
}
|
||||
return toVO(evidence);
|
||||
}
|
||||
|
||||
private CcdiEvidenceVO toVO(CcdiEvidence evidence) {
|
||||
CcdiEvidenceVO vo = new CcdiEvidenceVO();
|
||||
BeanUtils.copyProperties(evidence, vo);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -741,6 +741,7 @@
|
||||
|
||||
<select id="selectPersonAnalysisObjectRows" resultType="com.ruoyi.ccdi.project.domain.vo.CcdiProjectPersonAnalysisObjectRecordVO">
|
||||
select
|
||||
max(tr.model_code) as modelCode,
|
||||
coalesce(max(staff.name), max(relation.relation_name), max(tr.object_key), max(tr.object_type)) as title,
|
||||
max(case
|
||||
when tr.object_type = 'STAFF_ID_CARD' then '员工对象'
|
||||
|
||||
437
docs/plans/fullstack/2026-04-09-account-library-design.md
Normal file
437
docs/plans/fullstack/2026-04-09-account-library-design.md
Normal file
@@ -0,0 +1,437 @@
|
||||
# 账户库管理设计方案
|
||||
|
||||
## 1. 背景与目标
|
||||
|
||||
当前系统在“信息维护”下已具备员工信息维护、员工亲属关系维护等基础档案能力,但尚未形成独立的“账户库管理”。现有员工表 `ccdi_base_staff` 与员工亲属关系表 `ccdi_staff_fmy_relation` 中均不承载完整账户信息,无法满足后续账户台账维护、手工补录、导入和账户分析展示的需要。
|
||||
|
||||
本次设计目标如下:
|
||||
|
||||
- 在“信息维护”菜单下新增“账户库管理”
|
||||
- 支持维护员工本人账户与员工亲属账户
|
||||
- 账户静态档案与分析结果分表存储
|
||||
- 页面风格沿用现有维护页交互方式
|
||||
- 第一版仅考虑当前有效账户分析结果,不保留多版本分析历史
|
||||
|
||||
本次明确不做以下事项:
|
||||
|
||||
- 不扩展朋友、同事、司机、秘书等非亲属关系
|
||||
- 不修改“员工亲属关系维护”现有业务命名
|
||||
- 不增加额外脱敏展示字段
|
||||
- 不展开后端实现设计
|
||||
|
||||
## 2. 设计原则
|
||||
|
||||
- 主表只描述“谁持有了什么账户”
|
||||
- 分析表只描述“该账户的交易画像和风险等级”
|
||||
- 员工本人账户依附员工表
|
||||
- 亲属账户依附员工亲属关系表
|
||||
- 页面录入时允许在一个弹窗中同时维护主表和分析表信息
|
||||
- 第一版以人工维护为主,分析字段允许手工录入或后续导入覆盖
|
||||
|
||||
## 3. 数据模型
|
||||
|
||||
### 3.1 关系说明
|
||||
|
||||
- 员工主表:`ccdi_base_staff`
|
||||
- 员工亲属关系表:`ccdi_staff_fmy_relation`
|
||||
- 账户主表:`ccdi_account_info`
|
||||
- 账户分析表:`ccdi_account_analysis`
|
||||
|
||||
关系约束如下:
|
||||
|
||||
- 一个员工可有多个本人账户
|
||||
- 一个员工亲属关系记录可有多个账户
|
||||
- 一个账户仅归属于一个员工或一个亲属关系记录
|
||||
- 一个账户在第一版仅对应一条当前分析记录
|
||||
|
||||
### 3.2 归属规则
|
||||
|
||||
- 当 `is_self_account = 1` 时:
|
||||
- `staff_id` 必填
|
||||
- `relation_id` 为空
|
||||
- 当 `is_self_account = 0` 时:
|
||||
- `staff_id` 必填
|
||||
- `relation_id` 必填
|
||||
- `relation_id` 对应的亲属记录应属于该 `staff_id`
|
||||
|
||||
## 4. 表结构设计
|
||||
|
||||
### 4.1 账户主表 `ccdi_account_info`
|
||||
|
||||
用途:存储账户静态档案、开户信息、归属关系和生效状态。
|
||||
|
||||
| 字段名 | 类型 | 必填 | 默认值 | 说明 |
|
||||
|------|------|------|------|------|
|
||||
| id | BIGINT | 是 | 自增 | 主键 |
|
||||
| staff_id | BIGINT | 是 | - | 员工ID,对应 `ccdi_base_staff.staff_id` |
|
||||
| relation_id | BIGINT | 否 | NULL | 亲属关系ID,对应 `ccdi_staff_fmy_relation.id` |
|
||||
| account_no | VARCHAR(200) | 是 | - | 账户号码,按业务要求加密存储 |
|
||||
| account_type | VARCHAR(30) | 是 | - | `BANK/SECURITIES/PAYMENT/OTHER` |
|
||||
| account_name | VARCHAR(100) | 是 | - | 账户名称 |
|
||||
| open_bank | VARCHAR(100) | 是 | - | 开户银行、证券公司或支付平台 |
|
||||
| bank_code | VARCHAR(20) | 否 | NULL | 金融机构代码 |
|
||||
| currency | CHAR(3) | 是 | `CNY` | 币种,ISO 4217 标准 |
|
||||
| is_self_account | BOOLEAN | 是 | TRUE | 是否本人账户 |
|
||||
| status | INT | 是 | 1 | 状态:1-有效,0-无效 |
|
||||
| effective_date | DATE | 是 | 当前日期 | 生效日期 |
|
||||
| invalid_date | DATE | 否 | NULL | 失效日期 |
|
||||
| data_source | VARCHAR(30) | 是 | `MANUAL` | 数据来源:MANUAL、IMPORT、SYNC |
|
||||
| remark | VARCHAR(500) | 否 | NULL | 备注 |
|
||||
| create_by | VARCHAR(64) | 是 | - | 创建人 |
|
||||
| create_time | DATETIME | 是 | 当前时间 | 创建时间 |
|
||||
| update_by | VARCHAR(64) | 否 | NULL | 更新人 |
|
||||
| update_time | DATETIME | 否 | 当前时间 | 更新时间 |
|
||||
|
||||
说明:
|
||||
|
||||
- `relation_id` 为空表示员工本人账户
|
||||
- `relation_id` 不为空表示员工亲属账户
|
||||
- 本次不增加账户号码 hash 字段与脱敏展示字段
|
||||
|
||||
### 4.2 账户分析表 `ccdi_account_analysis`
|
||||
|
||||
用途:存储账户交易画像、金额特征和风险等级。
|
||||
|
||||
| 字段名 | 类型 | 必填 | 默认值 | 说明 |
|
||||
|------|------|------|------|------|
|
||||
| id | BIGINT | 是 | 自增 | 主键 |
|
||||
| account_id | BIGINT | 是 | - | 账户ID,对应 `ccdi_account_info.id` |
|
||||
| analysis_months | INT | 是 | 6 | 统计月数 |
|
||||
| stat_start_date | DATE | 否 | NULL | 统计开始日期 |
|
||||
| stat_end_date | DATE | 否 | NULL | 统计结束日期 |
|
||||
| avg_month_txn_count | INT | 否 | 0 | 月均交易笔数 |
|
||||
| avg_month_txn_amount | DECIMAL(18,2) | 否 | 0.00 | 月均交易金额 |
|
||||
| txn_frequency_level | VARCHAR(20) | 否 | `MEDIUM` | 交易频率:LOW、MEDIUM、HIGH |
|
||||
| debit_single_max_amount | DECIMAL(18,2) | 否 | NULL | 借方单笔交易最高额 |
|
||||
| credit_single_max_amount | DECIMAL(18,2) | 否 | NULL | 贷方单笔交易最高额 |
|
||||
| debit_daily_max_amount | DECIMAL(18,2) | 否 | NULL | 借方日累计交易最高额 |
|
||||
| credit_daily_max_amount | DECIMAL(18,2) | 否 | NULL | 贷方日累计交易最高额 |
|
||||
| txn_risk_level | VARCHAR(10) | 否 | `MEDIUM` | 交易风险等级 |
|
||||
| remark | VARCHAR(500) | 否 | NULL | 分析备注 |
|
||||
| create_by | VARCHAR(64) | 是 | - | 创建人 |
|
||||
| create_time | DATETIME | 是 | 当前时间 | 创建时间 |
|
||||
| update_by | VARCHAR(64) | 否 | NULL | 更新人 |
|
||||
| update_time | DATETIME | 否 | 当前时间 | 更新时间 |
|
||||
|
||||
说明:
|
||||
|
||||
- 第一版以“一户一条当前分析记录”为目标
|
||||
- 后续如果需要保留历史分析版本,可新增 `is_latest`、`analysis_batch_no` 或改造唯一约束
|
||||
|
||||
## 5. 索引与约束建议
|
||||
|
||||
### 5.1 `ccdi_account_info`
|
||||
|
||||
- 主键:`PRIMARY KEY (id)`
|
||||
- 索引:`idx_staff_id (staff_id)`
|
||||
- 索引:`idx_relation_id (relation_id)`
|
||||
- 索引:`idx_account_type (account_type)`
|
||||
- 索引:`idx_open_bank (open_bank)`
|
||||
- 索引:`idx_is_self_account (is_self_account)`
|
||||
- 索引:`idx_status (status)`
|
||||
|
||||
### 5.2 `ccdi_account_analysis`
|
||||
|
||||
- 主键:`PRIMARY KEY (id)`
|
||||
- 唯一索引:`uk_account_id (account_id)`
|
||||
- 索引:`idx_txn_risk_level (txn_risk_level)`
|
||||
|
||||
### 5.3 校验规则
|
||||
|
||||
- `invalid_date` 不得早于 `effective_date`
|
||||
- `analysis_months` 应大于 0
|
||||
- 金额字段不得为负数
|
||||
- 若账户为本人账户,则不允许选择亲属
|
||||
- 若账户为亲属账户,则必须选定亲属关系记录
|
||||
|
||||
## 6. DDL 草案
|
||||
|
||||
```sql
|
||||
CREATE TABLE IF NOT EXISTS `ccdi_account_info` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`staff_id` BIGINT(20) NOT NULL COMMENT '员工ID',
|
||||
`relation_id` BIGINT(20) DEFAULT NULL COMMENT '员工亲属关系ID,员工本人账户为空',
|
||||
`account_no` VARCHAR(200) NOT NULL COMMENT '账户号码(加密存储)',
|
||||
`account_type` VARCHAR(30) NOT NULL COMMENT '账户类型:BANK/SECURITIES/PAYMENT/OTHER',
|
||||
`account_name` VARCHAR(100) NOT NULL COMMENT '账户名称',
|
||||
`open_bank` VARCHAR(100) NOT NULL COMMENT '开户银行/证券公司/支付平台',
|
||||
`bank_code` VARCHAR(20) DEFAULT NULL COMMENT '金融机构代码',
|
||||
`currency` CHAR(3) NOT NULL DEFAULT 'CNY' COMMENT '币种',
|
||||
`is_self_account` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否本人账户:1-是 0-否',
|
||||
`status` INT(11) NOT NULL DEFAULT 1 COMMENT '状态:1-有效 0-无效',
|
||||
`effective_date` DATE NOT NULL COMMENT '生效日期',
|
||||
`invalid_date` DATE DEFAULT NULL COMMENT '失效日期',
|
||||
`data_source` VARCHAR(30) NOT NULL DEFAULT 'MANUAL' COMMENT '数据来源',
|
||||
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_by` VARCHAR(64) NOT NULL COMMENT '创建人',
|
||||
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` VARCHAR(64) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_staff_id` (`staff_id`),
|
||||
KEY `idx_relation_id` (`relation_id`),
|
||||
KEY `idx_account_type` (`account_type`),
|
||||
KEY `idx_open_bank` (`open_bank`),
|
||||
KEY `idx_is_self_account` (`is_self_account`),
|
||||
KEY `idx_status` (`status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='账户主表';
|
||||
```
|
||||
|
||||
```sql
|
||||
CREATE TABLE IF NOT EXISTS `ccdi_account_analysis` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`account_id` BIGINT(20) NOT NULL COMMENT '账户ID',
|
||||
`analysis_months` INT(11) NOT NULL DEFAULT 6 COMMENT '统计月数',
|
||||
`stat_start_date` DATE DEFAULT NULL COMMENT '统计开始日期',
|
||||
`stat_end_date` DATE DEFAULT NULL COMMENT '统计结束日期',
|
||||
`avg_month_txn_count` INT(11) DEFAULT 0 COMMENT '月均交易笔数',
|
||||
`avg_month_txn_amount` DECIMAL(18,2) DEFAULT 0.00 COMMENT '月均交易金额',
|
||||
`txn_frequency_level` VARCHAR(20) DEFAULT 'MEDIUM' COMMENT '交易频率等级',
|
||||
`debit_single_max_amount` DECIMAL(18,2) DEFAULT NULL COMMENT '借方单笔最高额',
|
||||
`credit_single_max_amount` DECIMAL(18,2) DEFAULT NULL COMMENT '贷方单笔最高额',
|
||||
`debit_daily_max_amount` DECIMAL(18,2) DEFAULT NULL COMMENT '借方日累计最高额',
|
||||
`credit_daily_max_amount` DECIMAL(18,2) DEFAULT NULL COMMENT '贷方日累计最高额',
|
||||
`txn_risk_level` VARCHAR(10) DEFAULT 'MEDIUM' COMMENT '交易风险等级',
|
||||
`remark` VARCHAR(500) DEFAULT NULL COMMENT '分析备注',
|
||||
`create_by` VARCHAR(64) NOT NULL COMMENT '创建人',
|
||||
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` VARCHAR(64) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_account_id` (`account_id`),
|
||||
KEY `idx_txn_risk_level` (`txn_risk_level`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='账户分析表';
|
||||
```
|
||||
|
||||
## 7. 页面原型设计
|
||||
|
||||
### 7.1 菜单位置
|
||||
|
||||
新增菜单:
|
||||
|
||||
- 父级:信息维护
|
||||
- 名称:账户库管理
|
||||
- 建议顺序:放在“员工亲属关系维护”后、“招聘信息管理”前
|
||||
|
||||
### 7.2 列表页
|
||||
|
||||
#### 查询区
|
||||
|
||||
- 员工姓名
|
||||
- 归属类型:本人 / 亲属
|
||||
- 关系类型
|
||||
- 关系人姓名
|
||||
- 账户类型
|
||||
- 开户机构
|
||||
- 风险等级
|
||||
- 状态
|
||||
|
||||
#### 操作区
|
||||
|
||||
- 新增
|
||||
- 导入
|
||||
- 导出
|
||||
|
||||
#### 表格字段
|
||||
|
||||
- 员工姓名
|
||||
- 归属类型
|
||||
- 关系类型
|
||||
- 关系人姓名
|
||||
- 账户号码
|
||||
- 账户名称
|
||||
- 账户类型
|
||||
- 开户机构
|
||||
- 币种
|
||||
- 是否本人账户
|
||||
- 月均交易笔数
|
||||
- 月均交易金额
|
||||
- 交易频率等级
|
||||
- 交易风险等级
|
||||
- 生效日期
|
||||
- 状态
|
||||
- 创建时间
|
||||
- 操作
|
||||
|
||||
#### 列表页低保真线框
|
||||
|
||||
```text
|
||||
+----------------------------------------------------------------------------------+
|
||||
| 账户库管理 |
|
||||
+----------------------------------------------------------------------------------+
|
||||
| 员工姓名 [________] 归属类型 [本人/亲属] 关系类型 [____] 关系人姓名 [________] |
|
||||
| 账户类型 [____] 开户机构 [________] 风险等级 [____] 状态 [有效/无效] |
|
||||
| [搜索] [重置] |
|
||||
+----------------------------------------------------------------------------------+
|
||||
| [新增] [导入] [导出] |
|
||||
+----------------------------------------------------------------------------------+
|
||||
| 员工姓名 | 归属类型 | 关系类型 | 关系人姓名 | 账号 | 账户名称 | 账户类型 | ... |
|
||||
|----------------------------------------------------------------------------------|
|
||||
| 张三 | 本人 | - | - | 6222 | 工资卡 | BANK | ... |
|
||||
| 张三 | 亲属 | 配偶 | 李四 | 6217 | 储蓄卡 | BANK | ... |
|
||||
| ... |
|
||||
+----------------------------------------------------------------------------------+
|
||||
| 分页 |
|
||||
+----------------------------------------------------------------------------------+
|
||||
```
|
||||
|
||||
### 7.3 新增/编辑弹窗
|
||||
|
||||
#### 一、归属信息
|
||||
|
||||
- 归属类型
|
||||
- 员工选择
|
||||
- 关系人选择
|
||||
- 关系类型
|
||||
- 是否本人账户
|
||||
|
||||
交互规则:
|
||||
|
||||
- 归属类型为“本人”时,关系人选择和关系类型隐藏
|
||||
- 归属类型为“亲属”时,先选员工,再加载该员工亲属列表
|
||||
- 是否本人账户根据归属类型自动带出,只读显示
|
||||
|
||||
#### 二、账户信息
|
||||
|
||||
- 账户号码
|
||||
- 账户类型
|
||||
- 账户名称
|
||||
- 开户机构
|
||||
- 银行代码
|
||||
- 币种
|
||||
- 生效日期
|
||||
- 失效日期
|
||||
- 状态
|
||||
- 备注
|
||||
|
||||
#### 三、分析信息
|
||||
|
||||
- 统计月数
|
||||
- 统计开始日期
|
||||
- 统计结束日期
|
||||
- 月均交易笔数
|
||||
- 月均交易金额
|
||||
- 交易频率等级
|
||||
- 借方单笔最高额
|
||||
- 贷方单笔最高额
|
||||
- 借方日累计最高额
|
||||
- 贷方日累计最高额
|
||||
- 交易风险等级
|
||||
- 分析备注
|
||||
|
||||
#### 弹窗低保真线框
|
||||
|
||||
```text
|
||||
+--------------------------------------------------------------+
|
||||
| 新增账户 [X] |
|
||||
+--------------------------------------------------------------+
|
||||
| 一、归属信息 |
|
||||
| 归属类型 [本人/亲属] |
|
||||
| 员工 [请选择员工____________________] |
|
||||
| 关系人 [请选择关系人__________________] |
|
||||
| 关系类型 [自动带出______________________] |
|
||||
| 是否本人 [是/否,只读] |
|
||||
+--------------------------------------------------------------+
|
||||
| 二、账户信息 |
|
||||
| 账户号码 [____________________________] |
|
||||
| 账户类型 [BANK/SECURITIES/PAYMENT/OTHER] |
|
||||
| 账户名称 [____________________________] |
|
||||
| 开户机构 [____________________________] |
|
||||
| 银行代码 [________________] 币种 [CNY] |
|
||||
| 生效日期 [yyyy-MM-dd] 失效日期 [yyyy-MM-dd] |
|
||||
| 状态 [有效/无效] |
|
||||
| 备注 [____________________________________________] |
|
||||
+--------------------------------------------------------------+
|
||||
| 三、分析信息 |
|
||||
| 统计月数 [6] |
|
||||
| 开始日期 [yyyy-MM-dd] 结束日期 [yyyy-MM-dd] |
|
||||
| 月均笔数 [____] 月均金额 [__________] |
|
||||
| 频率等级 [LOW/MEDIUM/HIGH] 风险等级 [LOW/MEDIUM/HIGH] |
|
||||
| 借方单笔最高 [________] 贷方单笔最高 [________] |
|
||||
| 借方日累计最高 [________] 贷方日累计最高 [________] |
|
||||
| 分析备注 [____________________________________________] |
|
||||
+--------------------------------------------------------------+
|
||||
| [取消] [确定] |
|
||||
+--------------------------------------------------------------+
|
||||
```
|
||||
|
||||
### 7.4 详情弹窗
|
||||
|
||||
详情页建议与新增/编辑弹窗结构一致,全部字段只读展示,避免维护两套信息布局。
|
||||
|
||||
## 8. 导入模板建议
|
||||
|
||||
建议导入模板字段如下:
|
||||
|
||||
- 员工柜员号
|
||||
- 员工姓名
|
||||
- 归属类型
|
||||
- 关系人姓名
|
||||
- 关系类型
|
||||
- 账户号码
|
||||
- 账户类型
|
||||
- 账户名称
|
||||
- 开户机构
|
||||
- 银行代码
|
||||
- 币种
|
||||
- 生效日期
|
||||
- 失效日期
|
||||
- 统计月数
|
||||
- 月均交易笔数
|
||||
- 月均交易金额
|
||||
- 交易频率等级
|
||||
- 借方单笔最高额
|
||||
- 贷方单笔最高额
|
||||
- 借方日累计最高额
|
||||
- 贷方日累计最高额
|
||||
- 交易风险等级
|
||||
- 备注
|
||||
|
||||
导入校验建议:
|
||||
|
||||
- 本人账户时,不允许填写关系人姓名
|
||||
- 亲属账户时,关系人姓名不能为空
|
||||
- 若员工不存在,则导入失败
|
||||
- 若亲属不存在,则导入失败
|
||||
|
||||
## 9. 菜单 SQL 草案
|
||||
|
||||
```sql
|
||||
SET @parent_menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE menu_name = '信息维护' AND parent_id = 0
|
||||
LIMIT 1
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name, parent_id, order_num, path, component, is_frame, is_cache,
|
||||
menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark
|
||||
) VALUES (
|
||||
'账户库管理', @parent_menu_id, 5, 'accountInfo', 'ccdiAccountInfo/index', 1, 0,
|
||||
'C', '0', '0', 'ccdi:accountInfo:list', 'money', 'admin', NOW(), '', NULL, '账户库管理菜单'
|
||||
);
|
||||
|
||||
SET @menu_id = LAST_INSERT_ID();
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name, parent_id, order_num, path, component, is_frame, is_cache,
|
||||
menu_type, visible, status, perms, icon, create_by, create_time, remark
|
||||
) VALUES
|
||||
('账户查询', @menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:query', '#', 'admin', NOW(), ''),
|
||||
('账户新增', @menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:add', '#', 'admin', NOW(), ''),
|
||||
('账户修改', @menu_id, 3, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:edit', '#', 'admin', NOW(), ''),
|
||||
('账户删除', @menu_id, 4, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:remove', '#', 'admin', NOW(), ''),
|
||||
('账户导入', @menu_id, 5, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:import', '#', 'admin', NOW(), ''),
|
||||
('账户导出', @menu_id, 6, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:export', '#', 'admin', NOW(), '');
|
||||
```
|
||||
|
||||
## 10. 后续落地建议
|
||||
|
||||
如果本方案确认,可按以下顺序实施:
|
||||
|
||||
1. 先建两张表并补菜单 SQL
|
||||
2. 再补前端列表页与弹窗原型
|
||||
3. 最后对接后端接口与导入导出
|
||||
|
||||
当前方案适合作为第一版基础模型,后续若需要接入自动打标或保留历史分析结果,可在 `ccdi_account_analysis` 上继续扩展,而不破坏 `ccdi_account_info` 主档结构。
|
||||
96
docs/plans/fullstack/2026-04-10-account-library-handoff.md
Normal file
96
docs/plans/fullstack/2026-04-10-account-library-handoff.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# 账户库管理交接记录
|
||||
|
||||
日期:2026-04-10
|
||||
|
||||
## 当前状态
|
||||
|
||||
- 前端原型页:`ruoyi-ui/src/views/ccdiAccountInfoPrototype/index.vue`
|
||||
- 本地预览路由:`/ccdiAccountInfo`
|
||||
- 原型页入口路由:`/prototype/account-library`
|
||||
- 当前截图:`docs/plans/fullstack/account-library-preview-2026-04-10.png`
|
||||
- 真实数据库:`ccdi.ccdi_account_info`、`ccdi.ccdi_account_result`
|
||||
- 当前实现仍是前端静态原型,尚未接真实后端接口。
|
||||
|
||||
## 本次已落地
|
||||
|
||||
1. `ccdi_account_info` 已新增字段:
|
||||
- 字段名:`bank_scope`
|
||||
- 类型:`VARCHAR(20) NOT NULL DEFAULT 'INTERNAL'`
|
||||
- 含义:`INTERNAL-行内,EXTERNAL-行外`
|
||||
- 当前已有 21 条账户数据均为 `INTERNAL`
|
||||
|
||||
2. `ccdi_account_result.trans_risk_level` 默认值已改为 `LOW`。
|
||||
|
||||
3. 前端原型已恢复“账户范围”:
|
||||
- 查询区支持按“行内/行外”筛选
|
||||
- 表格展示“账户范围”
|
||||
- 新增/编辑弹窗可选择“账户范围”
|
||||
- 行内账户的分析信息默认只展示,语义上由 T+1 自动同步维护
|
||||
- 行外账户的分析信息允许手工维护
|
||||
|
||||
4. 前端原型兼容当前数据库 `account_type = DEBIT` 的老数据:
|
||||
- `DEBIT` 展示为“借记卡账户”
|
||||
- 仍保留 `BANK`、`SECURITIES`、`PAYMENT`、`OTHER` 作为后续扩展选项
|
||||
|
||||
5. 关系类型口径已按员工亲属关系统一为:
|
||||
- 配偶、父亲、母亲、子女、兄弟姐妹、朋友、同事、其他
|
||||
|
||||
## 字段对应
|
||||
|
||||
### `ccdi_account_info`
|
||||
|
||||
| 页面字段 | 前端字段 | 数据库字段 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| 账户号码 | `accountNo` | `account_no` | 账号 |
|
||||
| 账户类型 | `accountType` | `account_type` | 当前库里有 `DEBIT` |
|
||||
| 账户范围 | `bankScope` | `bank_scope` | `INTERNAL` 行内,`EXTERNAL` 行外 |
|
||||
| 账户姓名 | `accountName` | `account_name` | 账户户名/所属姓名 |
|
||||
| 所属人类型 | `ownerType` | `owner_type` | 员工、员工关系人、外部人员 |
|
||||
| 所属人标识 | `staffId` / `relationId` | `owner_id` | 后续接口需按类型取值 |
|
||||
| 开户机构 | `openBank` | `bank` | 开户行/机构 |
|
||||
| 银行代码 | `bankCode` | `bank_code` | 机构代码 |
|
||||
| 币种 | `currency` | `currency` | 默认 `CNY` |
|
||||
| 状态 | `status` | `status` | `1` 正常,`2` 已销户 |
|
||||
| 生效日期 | `effectiveDate` | `effective_date` | 开户/生效日期 |
|
||||
| 失效日期 | `invalidDate` | `invalid_date` | 销户/失效日期 |
|
||||
|
||||
### `ccdi_account_result`
|
||||
|
||||
| 页面字段 | 前端字段 | 数据库字段 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| 是否实控账户 | `isActualControl` | `is_self_account` | `1` 是,`0` 否 |
|
||||
| 月均交易笔数 | `avgMonthTxnCount` | `monthly_avg_trans_count` | 交易画像 |
|
||||
| 月均交易金额 | `avgMonthTxnAmount` | `monthly_avg_trans_amount` | 交易画像 |
|
||||
| 频率等级 | `txnFrequencyLevel` | `trans_freq_type` | `LOW`、`MEDIUM`、`HIGH` |
|
||||
| 借方单笔最高额 | `debitSingleMaxAmount` | `dr_max_single_amount` | 交易画像 |
|
||||
| 贷方单笔最高额 | `creditSingleMaxAmount` | `cr_max_single_amount` | 交易画像 |
|
||||
| 借方日累计最高额 | `debitDailyMaxAmount` | `dr_max_daily_amount` | 交易画像 |
|
||||
| 贷方日累计最高额 | `creditDailyMaxAmount` | `cr_max_daily_amount` | 交易画像 |
|
||||
| 风险等级 | `txnRiskLevel` | `trans_risk_level` | 默认 `LOW` |
|
||||
|
||||
## 后端同步判断
|
||||
|
||||
仓库里当前没有找到已成型的 `CcdiAccountInfo` 后端 Controller、Entity、Mapper、Service 或前端 API 文件,所以本次没有强行新建完整后端 CRUD。
|
||||
|
||||
后续如果正式接后端接口,需要同步增加:
|
||||
|
||||
- Entity/DTO/VO 字段:`bankScope`
|
||||
- Mapper XML 或 MyBatis Plus 查询条件:支持 `bank_scope`
|
||||
- 新增/编辑接口:写入 `bank_scope`
|
||||
- 列表接口:返回 `bank_scope`
|
||||
- 行内账户:分析结果从同步任务/T+1结果表维护
|
||||
- 行外账户:允许页面写入或更新 `ccdi_account_result`
|
||||
|
||||
## 本地启动说明
|
||||
|
||||
前端可以在 `ruoyi-ui` 下启动:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
当前环境里没有检测到 `java`、`mvn`、`mvnw`,所以这台机器不能直接用命令启动后端。后端正常需要 Java 21 和 Maven,然后启动端口按配置是 `62318`。
|
||||
|
||||
## 明天切换对话可以这样说
|
||||
|
||||
继续做 `C:\Users\20696\Desktop\初核\ccdi` 这个仓库的“账户库管理”。请先阅读 `docs/plans/fullstack/2026-04-10-account-library-handoff.md`,然后检查以下本地改动:前端原型 `ruoyi-ui/src/views/ccdiAccountInfoPrototype/index.vue`、路由 `ruoyi-ui/src/router/index.js`、白名单 `ruoyi-ui/src/permission.js`、关系枚举 `ccdi-info-collection/src/main/java/com/ruoyi/info/collection/enums/RelationType.java`、SQL 脚本 `sql/migration/2026-04-10-split-ccdi-account-info.sql`。数据库 `ccdi_account_info` 已新增 `bank_scope`,`ccdi_account_result.trans_risk_level` 默认值已是 `LOW`。下一步优先判断是否要做真实后端 CRUD/API 联调,而不是继续只改静态原型。
|
||||
BIN
docs/plans/fullstack/account-library-preview-2026-04-10.png
Normal file
BIN
docs/plans/fullstack/account-library-preview-2026-04-10.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 803 KiB |
@@ -0,0 +1,219 @@
|
||||
# 账户库管理验收清单
|
||||
|
||||
## 1. 验收目标
|
||||
|
||||
确认“账户库管理”页面已满足本轮最小闭环范围,包含:
|
||||
|
||||
- 菜单可见
|
||||
- 页面可打开
|
||||
- 列表查询正常
|
||||
- 新增、编辑、删除正常
|
||||
- 导入、导出正常
|
||||
- 导入模板可下载
|
||||
- 字段口径与数据库一致
|
||||
- 页面样式与其他“信息维护”页面保持一致
|
||||
|
||||
## 2. 验收前提
|
||||
|
||||
验收前需先确认:
|
||||
|
||||
- 前端服务已启动
|
||||
- 后端服务已启动
|
||||
- Redis 可连接
|
||||
- 数据库使用开发库 `116.62.17.81:3307/ccdi`
|
||||
- 当前账号具备“账户库管理”菜单与按钮权限
|
||||
|
||||
建议验收入口:
|
||||
|
||||
- 菜单入口:`信息维护 -> 账户库管理`
|
||||
- 路由入口:`/maintain/accountInfo`
|
||||
|
||||
## 3. 基础可用性验收
|
||||
|
||||
### 3.1 菜单与路由
|
||||
|
||||
- [ ] 左侧“信息维护”下可见“账户库管理”
|
||||
- [ ] 点击“账户库管理”可正常进入页面
|
||||
- [ ] 页面打开后无白屏、无 404、无 `No static resource`
|
||||
- [ ] 页面刷新后仍可正常进入
|
||||
|
||||
### 3.2 页面样式
|
||||
|
||||
- [ ] 页面背景、卡片、表头颜色与其他“信息维护”页面一致
|
||||
- [ ] 页面顶部不再显示“信息维护 / 账户库管理”说明卡片
|
||||
- [ ] 搜索区、工具栏、表格、分页布局正常
|
||||
- [ ] 右上角搜索折叠工具栏可正常使用
|
||||
|
||||
## 4. 查询列表验收
|
||||
|
||||
### 4.1 列表展示
|
||||
|
||||
- [ ] 页面默认可加载账户列表
|
||||
- [ ] 表格列显示完整,无错位、无遮挡
|
||||
- [ ] 列表包含“证件号”列
|
||||
- [ ] “所属人类型”列能正确显示:员工、员工关系人、中介、外部人员
|
||||
- [ ] “账户类型”列能正确显示:银行账户、证券账户、支付账户、其他
|
||||
- [ ] “账户范围”列能正确显示:行内、行外
|
||||
- [ ] 风险等级、频率等级、状态色块显示正常
|
||||
|
||||
### 4.2 查询条件
|
||||
|
||||
- [ ] “所属人类型”筛选在最前面
|
||||
- [ ] 可按员工姓名查询
|
||||
- [ ] 可按账户范围查询
|
||||
- [ ] 可按关系类型查询
|
||||
- [ ] 可按账户姓名查询
|
||||
- [ ] 可按账户类型查询
|
||||
- [ ] 可按是否实控查询
|
||||
- [ ] 可按风险等级查询
|
||||
- [ ] 可按状态查询
|
||||
- [ ] “搜索”后结果正确
|
||||
- [ ] “重置”后条件恢复默认
|
||||
|
||||
## 5. 新增验收
|
||||
|
||||
### 5.1 新增弹窗
|
||||
|
||||
- [ ] 点击“新增”可打开弹窗
|
||||
- [ ] 弹窗内“所属人类型”可选:员工、员工关系人、中介、外部人员
|
||||
- [ ] 默认新增账户范围为“行外”
|
||||
- [ ] 账户类型下拉仅有:
|
||||
- [ ] `BANK`
|
||||
- [ ] `SECURITIES`
|
||||
- [ ] `PAYMENT`
|
||||
- [ ] `OTHER`
|
||||
|
||||
### 5.2 所属人逻辑
|
||||
|
||||
- [ ] 选择“员工”时,可选择员工姓名
|
||||
- [ ] 选择“员工”后可自动带出证件号
|
||||
- [ ] 选择“员工关系人”时,可先选员工,再选关系人
|
||||
- [ ] 选择“员工关系人”后可自动带出关系类型、关系人证件号
|
||||
- [ ] 选择“中介”时,可手工录入中介名称和证件号
|
||||
- [ ] 选择“外部人员”时,可手工录入姓名和证件号
|
||||
|
||||
### 5.3 保存验证
|
||||
|
||||
- [ ] 必填项为空时有校验提示
|
||||
- [ ] 保存成功后列表可看到新增数据
|
||||
- [ ] 刷新页面后新增数据仍存在
|
||||
|
||||
## 6. 编辑验收
|
||||
|
||||
- [ ] 点击“编辑”可打开已有记录
|
||||
- [ ] 已有字段可正确回显
|
||||
- [ ] 可修改基础信息并保存成功
|
||||
- [ ] 保存后列表显示更新内容
|
||||
- [ ] 刷新页面后修改结果仍存在
|
||||
|
||||
## 7. 删除验收
|
||||
|
||||
- [ ] 点击“删除”有确认提示
|
||||
- [ ] 确认删除后提示成功
|
||||
- [ ] 删除后列表不再显示该数据
|
||||
- [ ] 刷新页面后该数据仍已删除
|
||||
|
||||
## 8. 详情验收
|
||||
|
||||
- [ ] 点击“详情”可打开只读弹窗
|
||||
- [ ] 基础信息、归属信息、分析信息都可查看
|
||||
- [ ] 详情弹窗内字段与列表、数据库保持一致
|
||||
|
||||
## 9. 批量维护验收
|
||||
|
||||
### 9.1 工具栏能力
|
||||
|
||||
- [ ] 页面工具栏包含“导入”“导出”按钮
|
||||
- [ ] 按钮风格、位置与其他“信息维护”页面一致
|
||||
- [ ] 权限控制正常,无权限时按钮不显示
|
||||
|
||||
### 9.2 导入功能
|
||||
|
||||
- [ ] 点击“导入”可打开上传弹窗
|
||||
- [ ] 点击“下载模板”可下载 Excel 模板
|
||||
- [ ] 上传合法模板后可返回导入结果
|
||||
- [ ] 导入成功后页面列表可看到更新结果
|
||||
|
||||
### 9.3 导出功能
|
||||
|
||||
- [ ] 点击“导出”可按当前筛选条件导出 Excel
|
||||
- [ ] 导出文件可正常打开
|
||||
- [ ] 导出列与页面口径一致
|
||||
|
||||
## 10. 数据口径验收
|
||||
|
||||
### 9.1 页面与数据库字段映射
|
||||
|
||||
- [ ] `ccdi_account_info.account_id -> 页面主键 id`
|
||||
- [ ] `ccdi_account_info.owner_type -> 所属人类型`
|
||||
- [ ] `ccdi_account_info.owner_id -> 证件号`
|
||||
- [ ] `ccdi_account_info.account_no -> 账户号码`
|
||||
- [ ] `ccdi_account_info.account_type -> 账户类型`
|
||||
- [ ] `ccdi_account_info.bank_scope -> 账户范围`
|
||||
- [ ] `ccdi_account_info.account_name -> 账户姓名`
|
||||
- [ ] `ccdi_account_info.bank -> 开户机构`
|
||||
- [ ] `ccdi_account_info.bank_code -> 银行代码`
|
||||
- [ ] `ccdi_account_info.currency -> 币种`
|
||||
- [ ] `ccdi_account_info.status -> 状态`
|
||||
- [ ] `ccdi_account_info.effective_date -> 生效日期`
|
||||
- [ ] `ccdi_account_info.invalid_date -> 失效日期`
|
||||
- [ ] `ccdi_account_result.is_self_account -> 是否实控账户`
|
||||
- [ ] `ccdi_account_result.monthly_avg_trans_count -> 月均交易笔数`
|
||||
- [ ] `ccdi_account_result.monthly_avg_trans_amount -> 月均交易金额`
|
||||
- [ ] `ccdi_account_result.trans_freq_type -> 频率等级`
|
||||
- [ ] `ccdi_account_result.trans_risk_level -> 风险等级`
|
||||
|
||||
### 9.2 当前口径确认
|
||||
|
||||
- [ ] `owner_id` 口径为“证件号”
|
||||
- [ ] `owner_type` 仅有:`EMPLOYEE / RELATION / INTERMEDIARY / EXTERNAL`
|
||||
- [ ] `account_type` 仅有:`BANK / SECURITIES / PAYMENT / OTHER`
|
||||
- [ ] 行内账户分析信息只读
|
||||
- [ ] 行外账户分析信息支持人工维护
|
||||
|
||||
## 11. 测试数据验收
|
||||
|
||||
建议至少核对以下场景各 1 条:
|
||||
|
||||
- [ ] 员工 + 银行账户 + 行外
|
||||
- [ ] 员工关系人 + 证券账户 + 行外
|
||||
- [ ] 中介 + 支付账户 + 行外
|
||||
- [ ] 外部人员 + 其他账户 + 行外
|
||||
|
||||
建议重点核对:
|
||||
|
||||
- [ ] 中介支付账户账号表现为手机号样式
|
||||
- [ ] 证件号列显示正确
|
||||
- [ ] 不存在本轮新增测试数据被重复插入两次的情况
|
||||
|
||||
## 12. 异常与兼容性验收
|
||||
|
||||
- [ ] 后端不可用时,前端错误提示可理解
|
||||
- [ ] 页面没有明显控制台报错
|
||||
- [ ] 分页切换正常
|
||||
- [ ] 搜索后再点详情/编辑不报错
|
||||
- [ ] 移动端窄屏下页面不出现严重错位
|
||||
|
||||
## 13. 本轮验收结论
|
||||
|
||||
### 12.1 验收结果
|
||||
|
||||
- [ ] 通过
|
||||
- [ ] 有问题需整改
|
||||
|
||||
### 12.2 问题记录
|
||||
|
||||
| 序号 | 问题描述 | 严重程度 | 是否已修复 | 备注 |
|
||||
|---|---|---|---|---|
|
||||
| 1 | | | | |
|
||||
| 2 | | | | |
|
||||
| 3 | | | | |
|
||||
|
||||
### 12.3 验收签字
|
||||
|
||||
| 角色 | 姓名 | 日期 | 结果 |
|
||||
|---|---|---|---|
|
||||
| 业务验收 | | | |
|
||||
| 产品/需求 | | | |
|
||||
| 开发确认 | | | |
|
||||
| 测试确认 | | | |
|
||||
@@ -0,0 +1,44 @@
|
||||
# 证据库最小改造验证清单
|
||||
|
||||
## 验证范围
|
||||
|
||||
- 流水证据:流水详情中小号「加入证据库」按钮、确认弹窗、保存入库。
|
||||
- 模型证据:模型详情异常对象卡片中小号「加入证据库」按钮、确认弹窗、保存入库。
|
||||
- 资产证据:资产详情中小号「加入证据库」按钮、确认弹窗、保存入库。
|
||||
- 证据线索:项目详情右上角小号「证据线索」入口、右侧抽屉列表、搜索框基础展示。
|
||||
|
||||
## 版式约束
|
||||
|
||||
- 不新增独立证据库页面。
|
||||
- 不改变原详情页主体字段、表格列、字号体系和业务阅读顺序。
|
||||
- 「加入证据库」只能作为低频辅助按钮出现,使用 mini 尺寸、弱边框、弱背景。
|
||||
- 「证据线索」只能作为轻入口和右侧抽屉,不遮挡或重排项目详情主体内容。
|
||||
|
||||
## 功能验证
|
||||
|
||||
- 项目详情页能正常打开,顶部「证据线索」按钮可打开抽屉。
|
||||
- 抽屉无证据时展示空状态,有证据时展示编号、类型、关联人员、摘要、来源、确认人、备注。
|
||||
- 模型详情点击「加入证据库」后,弹窗自动带出证据类型、关联人员、证据摘要。
|
||||
- 流水详情点击「加入证据库」后,弹窗自动带出流水证据摘要,`source_record_id` 使用 `md5(本方账号+本方名称+对方账号+对方名称+交易时间+金额+摘要)`。
|
||||
- 资产详情点击「加入证据库」后,弹窗自动带出资产证据摘要。
|
||||
- 模型证据 `source_record_id` 使用 `md5(人员身份证+模型编码)`,缺少人员身份证或模型编码时不允许入库。
|
||||
- 资产证据 `source_record_id` 使用 `md5(人员身份证+资产字段)`,当前资产负债聚合口径的资产字段为家庭总收入、家庭总负债、家庭总资产、风险等级编码。
|
||||
- 确认理由为空时不能提交。
|
||||
- 填写确认理由后可以提交,提交成功后自动打开或刷新证据线索抽屉。
|
||||
- 保存后的证据落库到 `ccdi_evidence`。
|
||||
|
||||
## 技术验证
|
||||
|
||||
- 后端 `ccdi-project` 编译通过。
|
||||
- 前端 `npm run build:prod` 通过。
|
||||
- 数据库表 `ccdi_evidence` 存在。
|
||||
- 流水证据 `source_record_id` 不依赖 `statementId/bankStatementId`,应为 32 位 MD5 指纹。
|
||||
- 模型证据、资产证据的 `source_record_id` 均不拼接项目 ID,项目归属仅存 `project_id` 字段。
|
||||
- 页面控制台不出现由本次改造引入的明显错误。
|
||||
- 不提交或误动无关文件。
|
||||
|
||||
## 本期不做
|
||||
|
||||
- 证据卡片「查看详情」真实跳转原记录。
|
||||
- 跨项目引用/复用 UI。
|
||||
- 重复证据拦截。
|
||||
@@ -0,0 +1,119 @@
|
||||
# 账户库管理验收记录
|
||||
|
||||
## 验收时间
|
||||
|
||||
- 日期:2026-04-14
|
||||
- 验收方式:代码检查 + 数据库核对 + 页面在线验收 + 真实接口联调
|
||||
|
||||
## 验收结论
|
||||
|
||||
本轮“账户库管理”页面已完成最小闭环与批量维护能力验收,字段口径、菜单挂载、批量导入导出、测试数据、页面收口均已完成,正式页联调通过。
|
||||
|
||||
## 已通过项
|
||||
|
||||
### 1. 页面与样式
|
||||
|
||||
- 已删除顶部“信息维护 / 账户库管理”说明卡片
|
||||
- 页面背景、主卡片、表头样式已收回到信息维护页常见灰白体系
|
||||
- 已补 `right-toolbar`
|
||||
- 搜索区域支持显隐
|
||||
- 工具栏、操作列风格已向若依现有页面对齐
|
||||
- 页面工具栏已补“导入”“导出”按钮,风格与中介库等页面保持一致
|
||||
|
||||
### 2. 字段口径
|
||||
|
||||
- `owner_id` 已按“证件号”口径处理
|
||||
- `owner_type` 仅支持:
|
||||
- `EMPLOYEE`
|
||||
- `RELATION`
|
||||
- `INTERMEDIARY`
|
||||
- `EXTERNAL`
|
||||
- `account_type` 仅支持:
|
||||
- `BANK`
|
||||
- `SECURITIES`
|
||||
- `PAYMENT`
|
||||
- `OTHER`
|
||||
- 新增默认账户范围为“行外”
|
||||
- 列表已展示“证件号”列
|
||||
- 所属人类型筛选已移动到最前面
|
||||
|
||||
### 3. 批量维护能力
|
||||
|
||||
- 已补导入模板下载接口:`POST /ccdi/accountInfo/importTemplate`
|
||||
- 已补导入接口:`POST /ccdi/accountInfo/importData`
|
||||
- 已补导出接口:`POST /ccdi/accountInfo/export`
|
||||
- 已补按钮权限:
|
||||
- `ccdi:accountInfo:import`
|
||||
- `ccdi:accountInfo:export`
|
||||
- 已补管理员角色菜单授权
|
||||
|
||||
本次在线验收结果:
|
||||
|
||||
- 导入模板下载成功,生成文件:`logs/account-info-import-template-check.xlsx`
|
||||
- 导出成功,生成文件:`logs/account-info-export-check.xlsx`
|
||||
- 合法导入样例成功,结果为“共 1 条,成功 1 条,失败 0 条”
|
||||
- 非法导入样例会在导入结果中提示失败数量,失败原因校验正常
|
||||
|
||||
### 4. 数据与测试样例
|
||||
|
||||
已核对本轮补充的 4 条测试数据,且未重复插入:
|
||||
|
||||
| account_id | owner_type | owner_id | account_no | account_type | bank_scope |
|
||||
|---|---|---|---|---|---|
|
||||
| 30 | RELATION | 330101199104010101 | ZQ330101199104010101 | SECURITIES | EXTERNAL |
|
||||
| 31 | INTERMEDIARY | 330101197901010055 | 13700000035 | PAYMENT | EXTERNAL |
|
||||
| 32 | EXTERNAL | 91330100EXT20260413 | wx-ext-20260413-001 | OTHER | EXTERNAL |
|
||||
| 33 | EMPLOYEE | 330101199001010001 | 622202440000010001 | BANK | EXTERNAL |
|
||||
|
||||
补充说明:
|
||||
|
||||
- `account_no` 维度未发现本轮测试数据重复插入
|
||||
- 页面中“看起来重复”的旧数据,主要来自历史库里原本存在的同人多卡记录
|
||||
|
||||
### 5. 菜单与权限
|
||||
|
||||
- 已补菜单 SQL:`sql/migration/2026-04-13-add-ccdi-account-info-menu.sql`
|
||||
- 前端已补按钮权限:
|
||||
- `ccdi:accountInfo:add`
|
||||
- `ccdi:accountInfo:edit`
|
||||
- `ccdi:accountInfo:remove`
|
||||
- `ccdi:accountInfo:import`
|
||||
- `ccdi:accountInfo:export`
|
||||
|
||||
### 6. 真实联调结果
|
||||
|
||||
本次已在正式页完成真实联调,结果如下:
|
||||
|
||||
- `/ccdi/accountInfo/list` 可正常返回真实库数据
|
||||
- 详情接口可用
|
||||
- 新增接口可用
|
||||
- 编辑接口可用
|
||||
- 删除接口可用
|
||||
- 导入模板接口可用
|
||||
- 导入接口可用
|
||||
- 导出接口可用
|
||||
- `ccdi_account_info` 与 `ccdi_account_result` 联表映射正确
|
||||
|
||||
## 当前可查看页面
|
||||
|
||||
当前正式页已可访问:
|
||||
|
||||
- `http://localhost/maintain/accountInfo`
|
||||
|
||||
说明:
|
||||
|
||||
- 此地址为“真前端 + 真后端 + 真数据库”联调页
|
||||
- 页面当前显示的账户数据为开发库真实数据
|
||||
- 可继续用于业务验收
|
||||
|
||||
## 最终判断
|
||||
|
||||
- 页面功能验收:通过
|
||||
- 数据口径验收:通过
|
||||
- 批量维护验收:通过
|
||||
- 真实联调环境验收:通过
|
||||
|
||||
## 建议下一步
|
||||
|
||||
1. 由业务侧继续在线验收页面与数据口径
|
||||
2. 如后续确认需要,再继续补导入模板说明或批量校验规则优化
|
||||
@@ -0,0 +1,64 @@
|
||||
# 员工招聘功能自验收清单
|
||||
|
||||
验收日期:2026-04-20
|
||||
|
||||
## 验收范围
|
||||
|
||||
本次自验收覆盖员工招聘页面与接口联动所需的前后端能力,包括招聘类型、候选人历史工作经历、工作经历单独导入、详情/编辑页展示顺序、面试官字段展示一致性,以及基于现有招聘数据补充联调样例数据。
|
||||
|
||||
## 前端页面
|
||||
|
||||
- [x] 查询条件保持原有结构,仅新增“招聘类型”筛选项。
|
||||
- [x] 顶部操作区包含“新增”“导入”“导入工作经历”“导出”。
|
||||
- [x] 列表列按最新口径展示:招聘记录编号、招聘项目名称、职位名称、候选人姓名、录用情况、学历 / 毕业学校、招聘类型、历史工作经历、操作。
|
||||
- [x] 列表“操作”列包含“详情”“编辑”“删除”按钮。
|
||||
- [x] 招聘项目名称列已加宽,长名称不再只显示为“办结”一类截断残片。
|
||||
- [x] “学历 / 毕业学校”在列表合并展示,详情/编辑中仍保留学历、毕业院校、毕业年月、专业等候选人基础字段。
|
||||
- [x] 详情页模块顺序为:招聘岗位信息、录用情况、候选人情况、候选人历史工作经历、面试官信息。
|
||||
- [x] 编辑页模块顺序与详情页保持一致:招聘岗位信息、录用情况、候选人情况、面试官信息。
|
||||
- [x] 详情页“面试官信息”统一按四个字段展示:面试官1姓名、面试官1工号、面试官2姓名、面试官2工号。
|
||||
- [x] 详情页不再展示重复的“社招工作经历摘要”,只保留“候选人历史工作经历”。
|
||||
- [x] 工作经历导入使用独立入口、独立模板、独立上传接口。
|
||||
|
||||
## 后端接口与数据结构
|
||||
|
||||
- [x] 主表 `ccdi_staff_recruitment` 保留原有创建/更新人员字段命名,不改动既有审计字段口径。
|
||||
- [x] 主表新增 `recruit_type`,用于区分社招、校招。
|
||||
- [x] 历史工作经历使用独立表 `ccdi_staff_recruitment_work`,不把工作经历摘要字段放入主表。
|
||||
- [x] 列表查询聚合返回历史工作经历段数,避免前端列表加载完整经历明细。
|
||||
- [x] 详情查询返回完整历史工作经历列表。
|
||||
- [x] 删除招聘记录时同步删除对应历史工作经历。
|
||||
- [x] 工作经历导入以招聘记录编号为唯一匹配依据。
|
||||
- [x] 工作经历导入时,候选人姓名、招聘项目名称、职位名称仅用于人工核对和导入校验。
|
||||
- [x] 工作经历导入时,三个辅助字段与主表不一致则禁止导入。
|
||||
- [x] 工作经历导入只允许社招记录导入,校招记录禁止导入。
|
||||
- [x] 同一个招聘记录编号在工作经历导入文件中任意一行失败时,该招聘记录编号下本次所有工作经历均不覆盖入库。
|
||||
|
||||
## 数据库与联调样例数据
|
||||
|
||||
- [x] 已补充数据库迁移脚本:`sql/migration/2026-04-15-add-staff-recruitment-social-work-summary.sql`。
|
||||
- [x] 已补充现有数据联调样例脚本:`sql/migration/2026-04-20-seed-staff-recruitment-work-existing-data.sql`。
|
||||
- [x] 样例脚本不改动已有招聘项目名称、职位名称、候选人姓名、录用情况、面试官等原始业务信息。
|
||||
- [x] 样例脚本只在招聘类型为空时补充 `recruit_type`,并生成带标记的历史工作经历样例。
|
||||
- [x] 数据库验证结果:`SOCIAL = 4646`,`CAMPUS = 1355`。
|
||||
- [x] 数据库验证结果:已生成历史工作经历样例 `25` 条,覆盖社招招聘记录 `20` 条。
|
||||
|
||||
## 构建与验证
|
||||
|
||||
- [x] 后端编译通过:`mvn -pl ccdi-info-collection -am compile -DskipTests`。
|
||||
- [x] 前端生产构建通过:`npm run build:prod`。
|
||||
- [x] 前端构建仅存在体积提示类 warning,未出现编译错误。
|
||||
- [x] 前端预览截图已生成,覆盖列表、工作经历导入、详情面试官展示。
|
||||
- [x] 验证过程中启动的前端预览进程已停止,未保留 8088 端口监听。
|
||||
|
||||
## 预览截图
|
||||
|
||||
- 列表页:`C:\Users\20696\codex-preview\staff-recruitment-work-import-list.png`
|
||||
- 工作经历导入弹窗:`C:\Users\20696\codex-preview\staff-recruitment-work-import-dialog.png`
|
||||
- 详情页面试官四字段展示:`C:\Users\20696\codex-preview\staff-recruitment-detail-interviewer-separated.png`
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 当前机器无法通过 `bin/mysql_utf8_exec.sh` 调用 MySQL 客户端执行中文 SQL,实际数据库脚本执行采用本地 Maven 缓存中的 MySQL JDBC 驱动,并显式设置 `utf8mb4` 会话字符集。
|
||||
- 列表默认第一页如果主要是校招记录,“历史工作经历”可能显示为 `-`;筛选“社招”后可看到已补充的工作经历段数。
|
||||
- 仓库中存在与本次招聘功能无关的未跟踪 `docx` 文件,本次未处理、未纳入验收范围。
|
||||
@@ -0,0 +1,51 @@
|
||||
# 证据库最小改造验证记录
|
||||
|
||||
## 验证时间
|
||||
|
||||
2026-04-21
|
||||
|
||||
## 验证环境
|
||||
|
||||
- 前端:`http://localhost:62319`
|
||||
- 后端:`http://localhost:62318`
|
||||
- 项目:`test`
|
||||
- 项目 ID:`90337`
|
||||
|
||||
## 验证结果
|
||||
|
||||
| 验证项 | 结果 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 后端编译 | 通过 | `mvn -pl ccdi-project -am compile -DskipTests` 成功 |
|
||||
| 前端构建 | 通过 | `npm run build:prod` 成功,仅存在原有包体积 warning |
|
||||
| 数据库表 | 通过 | `ccdi_evidence` 已存在 |
|
||||
| 模型证据入库 | 通过 | 模型详情小号「加入证据库」可打开弹窗并保存,生成 `EV-001` |
|
||||
| 流水证据入库 | 通过 | 流水详情小号「加入证据库」可打开弹窗并保存,当前代码已改为使用 32 位 MD5 指纹作为 `source_record_id` |
|
||||
| 资产证据入库 | 通过 | 资产详情小号「加入证据库」可打开弹窗并保存,已验证旧规则测试数据 `EV-003` 与新指纹规则测试数据 `EV-004` |
|
||||
| 证据线索抽屉 | 通过 | 抽屉展示三类证据,包含编号、类型、关联人员、摘要、来源、确认人、备注 |
|
||||
| 前端控制台 | 通过 | 验证后未发现 error/warn |
|
||||
| 模型/资产来源指纹更新 | 通过 | 已重启后端并通过 MCP 页面验证:模型证据、资产证据均可打开确认弹窗,本次未确认入库,避免新增测试数据 |
|
||||
| 证据抽屉跳转入口 | 通过 | 本期不做原记录跳转,已移除抽屉卡片中的「查看流水详情」「查看模型详情」「查看资产详情」按钮 |
|
||||
|
||||
## 落库核对
|
||||
|
||||
项目 `90337` 当前证据数:
|
||||
|
||||
| 类型 | 数量 |
|
||||
| --- | ---: |
|
||||
| FLOW | 1 |
|
||||
| MODEL | 1 |
|
||||
| ASSET | 2 |
|
||||
| 合计 | 4 |
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 本次验证产生了测试证据数据,如正式交付前需要干净环境,可按项目 ID 清理。
|
||||
- 历史已保存的测试证据可能保留旧来源标识,新保存的流水、模型、资产证据会按当前规则生成 MD5 指纹。
|
||||
- 当前代码已将模型证据来源标识改为 `md5(人员身份证+模型编码)`,资产证据来源标识改为 `md5(人员身份证+资产字段)`,均不拼接项目 ID。
|
||||
- 为让模型详情前端拿到模型编码,后端仅补充返回 `modelCode` 字段,不涉及表结构和接口路径变更。
|
||||
|
||||
## 后续边界
|
||||
|
||||
- 证据卡片「查看详情」本期不做真实跳转,当前抽屉不展示跳转按钮;后续如要定位原记录,可基于 `source_type`、`source_record_id`、`snapshot_json` 增加跳转逻辑。
|
||||
- 跨项目引用/复用 UI 本期不做;当前 `source_record_id` 已按不拼接项目 ID 的规则生成,后续具备按同一来源指纹做跨项目比对的基础。
|
||||
- 重复证据拦截本期不做;当前允许同一项目内重复确认,后续可按 `project_id + evidence_type + source_type + source_record_id` 增加唯一性提示或软拦截。
|
||||
62
ruoyi-ui/src/api/ccdiAccountInfo.js
Normal file
62
ruoyi-ui/src/api/ccdiAccountInfo.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询账户库列表
|
||||
export function listAccountInfo(query) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询账户库详情
|
||||
export function getAccountInfo(id) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增账户
|
||||
export function addAccountInfo(data) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改账户
|
||||
export function updateAccountInfo(data) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除账户
|
||||
export function delAccountInfo(ids) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo/' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询员工下拉
|
||||
export function listAccountStaffOptions(query) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo/staffOptions',
|
||||
method: 'get',
|
||||
params: { query }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询关系人下拉
|
||||
export function listAccountRelationOptions(staffId) {
|
||||
return request({
|
||||
url: '/ccdi/accountInfo/relationOptions',
|
||||
method: 'get',
|
||||
params: { staffId }
|
||||
})
|
||||
}
|
||||
27
ruoyi-ui/src/api/ccdiEvidence.js
Normal file
27
ruoyi-ui/src/api/ccdiEvidence.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 保存证据
|
||||
export function saveEvidence(data) {
|
||||
return request({
|
||||
url: '/ccdi/evidence',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目证据列表
|
||||
export function listEvidence(params) {
|
||||
return request({
|
||||
url: '/ccdi/evidence/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询证据详情
|
||||
export function getEvidence(evidenceId) {
|
||||
return request({
|
||||
url: '/ccdi/evidence/' + evidenceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/login', '/register']
|
||||
const whiteList = ['/login', '/register', '/prototype/account-library', '/prototype/staff-recruitment']
|
||||
|
||||
const isWhiteList = (path) => {
|
||||
return whiteList.some(pattern => isPathMatch(pattern, path))
|
||||
|
||||
@@ -77,6 +77,27 @@ export const constantRoutes = [
|
||||
name: 'ProjectDetail',
|
||||
hidden: true,
|
||||
meta: { title: '项目详情', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'prototype/account-library',
|
||||
component: () => import('@/views/ccdiAccountInfoPrototype/index'),
|
||||
name: 'AccountLibraryPrototype',
|
||||
hidden: true,
|
||||
meta: { title: '账户库管理原型', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'prototype/staff-recruitment',
|
||||
component: () => import('@/views/ccdiStaffRecruitment/index'),
|
||||
name: 'StaffRecruitmentPrototype',
|
||||
hidden: true,
|
||||
meta: { title: '招聘信息预览', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'ccdiAccountInfo',
|
||||
component: () => import('@/views/ccdiAccountInfo/index'),
|
||||
name: 'CcdiAccountInfo',
|
||||
hidden: true,
|
||||
meta: { title: '账户库管理', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
78
ruoyi-ui/src/utils/ccdiEvidence.js
Normal file
78
ruoyi-ui/src/utils/ccdiEvidence.js
Normal file
@@ -0,0 +1,78 @@
|
||||
import md5 from "@/utils/md5";
|
||||
|
||||
export const FLOW_EVIDENCE_FINGERPRINT_RULE =
|
||||
"md5(leAccountNo+leAccountName+customerAccountNo+customerAccountName+trxDate+displayAmount+userMemo)";
|
||||
|
||||
export const MODEL_EVIDENCE_FINGERPRINT_RULE = "md5(personIdCard+modelCode)";
|
||||
|
||||
export const ASSET_EVIDENCE_FINGERPRINT_RULE =
|
||||
"md5(staffIdCard+totalIncome+totalDebt+totalAsset+riskLevelCode)";
|
||||
|
||||
function normalizeFingerprintValue(value) {
|
||||
if (value === null || value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return String(value).trim();
|
||||
}
|
||||
|
||||
function resolveCounterpartyName(detail) {
|
||||
return detail.customerAccountName || detail.customerName || detail.counterpartyName || "";
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceFingerprintSource(detail = {}) {
|
||||
return [
|
||||
detail.leAccountNo,
|
||||
detail.leAccountName,
|
||||
detail.customerAccountNo,
|
||||
resolveCounterpartyName(detail),
|
||||
detail.trxDate,
|
||||
detail.displayAmount,
|
||||
detail.userMemo,
|
||||
]
|
||||
.map(normalizeFingerprintValue)
|
||||
.join("");
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceFingerprint(detail = {}) {
|
||||
const source = buildFlowEvidenceFingerprintSource(detail);
|
||||
return source ? md5(source) : "";
|
||||
}
|
||||
|
||||
export function buildFlowEvidenceSnapshot(detail = {}) {
|
||||
const evidenceFingerprint = buildFlowEvidenceFingerprint(detail);
|
||||
return {
|
||||
...detail,
|
||||
evidenceFingerprint,
|
||||
evidenceFingerprintRule: FLOW_EVIDENCE_FINGERPRINT_RULE,
|
||||
};
|
||||
}
|
||||
|
||||
export function buildModelEvidenceFingerprint(personIdCard, modelCode) {
|
||||
const idCard = normalizeFingerprintValue(personIdCard);
|
||||
const code = normalizeFingerprintValue(modelCode);
|
||||
return idCard && code ? md5(idCard + code) : "";
|
||||
}
|
||||
|
||||
export function buildAssetEvidenceFingerprint(row = {}) {
|
||||
const idCard = normalizeFingerprintValue(row.staffIdCard);
|
||||
const assetSource = [
|
||||
row.totalIncome,
|
||||
row.totalDebt,
|
||||
row.totalAsset,
|
||||
row.riskLevelCode,
|
||||
]
|
||||
.map(normalizeFingerprintValue)
|
||||
.join("");
|
||||
return idCard && assetSource ? md5(idCard + assetSource) : "";
|
||||
}
|
||||
|
||||
export function buildAssetEvidenceSnapshot(row = {}, detail = {}, summary = {}) {
|
||||
const evidenceFingerprint = buildAssetEvidenceFingerprint(row);
|
||||
return {
|
||||
row,
|
||||
detail,
|
||||
summary,
|
||||
evidenceFingerprint,
|
||||
evidenceFingerprintRule: ASSET_EVIDENCE_FINGERPRINT_RULE,
|
||||
};
|
||||
}
|
||||
161
ruoyi-ui/src/utils/md5.js
Normal file
161
ruoyi-ui/src/utils/md5.js
Normal file
@@ -0,0 +1,161 @@
|
||||
function safeAdd(x, y) {
|
||||
const lsw = (x & 0xffff) + (y & 0xffff);
|
||||
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xffff);
|
||||
}
|
||||
|
||||
function rotateLeft(num, cnt) {
|
||||
return (num << cnt) | (num >>> (32 - cnt));
|
||||
}
|
||||
|
||||
function cmn(q, a, b, x, s, t) {
|
||||
return safeAdd(rotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
||||
}
|
||||
|
||||
function ff(a, b, c, d, x, s, t) {
|
||||
return cmn((b & c) | (~b & d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function gg(a, b, c, d, x, s, t) {
|
||||
return cmn((b & d) | (c & ~d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function hh(a, b, c, d, x, s, t) {
|
||||
return cmn(b ^ c ^ d, a, b, x, s, t);
|
||||
}
|
||||
|
||||
function ii(a, b, c, d, x, s, t) {
|
||||
return cmn(c ^ (b | ~d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
function wordsToRaw(input) {
|
||||
let output = "";
|
||||
for (let i = 0; i < input.length * 32; i += 8) {
|
||||
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function rawToWords(input) {
|
||||
const output = [];
|
||||
output[(input.length >> 2) - 1] = undefined;
|
||||
for (let i = 0; i < output.length; i++) {
|
||||
output[i] = 0;
|
||||
}
|
||||
for (let i = 0; i < input.length * 8; i += 8) {
|
||||
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function calculate(words, len) {
|
||||
words[len >> 5] |= 0x80 << (len % 32);
|
||||
words[(((len + 64) >>> 9) << 4) + 14] = len;
|
||||
|
||||
let a = 1732584193;
|
||||
let b = -271733879;
|
||||
let c = -1732584194;
|
||||
let d = 271733878;
|
||||
|
||||
for (let i = 0; i < words.length; i += 16) {
|
||||
const olda = a;
|
||||
const oldb = b;
|
||||
const oldc = c;
|
||||
const oldd = d;
|
||||
|
||||
a = ff(a, b, c, d, words[i], 7, -680876936);
|
||||
d = ff(d, a, b, c, words[i + 1], 12, -389564586);
|
||||
c = ff(c, d, a, b, words[i + 2], 17, 606105819);
|
||||
b = ff(b, c, d, a, words[i + 3], 22, -1044525330);
|
||||
a = ff(a, b, c, d, words[i + 4], 7, -176418897);
|
||||
d = ff(d, a, b, c, words[i + 5], 12, 1200080426);
|
||||
c = ff(c, d, a, b, words[i + 6], 17, -1473231341);
|
||||
b = ff(b, c, d, a, words[i + 7], 22, -45705983);
|
||||
a = ff(a, b, c, d, words[i + 8], 7, 1770035416);
|
||||
d = ff(d, a, b, c, words[i + 9], 12, -1958414417);
|
||||
c = ff(c, d, a, b, words[i + 10], 17, -42063);
|
||||
b = ff(b, c, d, a, words[i + 11], 22, -1990404162);
|
||||
a = ff(a, b, c, d, words[i + 12], 7, 1804603682);
|
||||
d = ff(d, a, b, c, words[i + 13], 12, -40341101);
|
||||
c = ff(c, d, a, b, words[i + 14], 17, -1502002290);
|
||||
b = ff(b, c, d, a, words[i + 15], 22, 1236535329);
|
||||
|
||||
a = gg(a, b, c, d, words[i + 1], 5, -165796510);
|
||||
d = gg(d, a, b, c, words[i + 6], 9, -1069501632);
|
||||
c = gg(c, d, a, b, words[i + 11], 14, 643717713);
|
||||
b = gg(b, c, d, a, words[i], 20, -373897302);
|
||||
a = gg(a, b, c, d, words[i + 5], 5, -701558691);
|
||||
d = gg(d, a, b, c, words[i + 10], 9, 38016083);
|
||||
c = gg(c, d, a, b, words[i + 15], 14, -660478335);
|
||||
b = gg(b, c, d, a, words[i + 4], 20, -405537848);
|
||||
a = gg(a, b, c, d, words[i + 9], 5, 568446438);
|
||||
d = gg(d, a, b, c, words[i + 14], 9, -1019803690);
|
||||
c = gg(c, d, a, b, words[i + 3], 14, -187363961);
|
||||
b = gg(b, c, d, a, words[i + 8], 20, 1163531501);
|
||||
a = gg(a, b, c, d, words[i + 13], 5, -1444681467);
|
||||
d = gg(d, a, b, c, words[i + 2], 9, -51403784);
|
||||
c = gg(c, d, a, b, words[i + 7], 14, 1735328473);
|
||||
b = gg(b, c, d, a, words[i + 12], 20, -1926607734);
|
||||
|
||||
a = hh(a, b, c, d, words[i + 5], 4, -378558);
|
||||
d = hh(d, a, b, c, words[i + 8], 11, -2022574463);
|
||||
c = hh(c, d, a, b, words[i + 11], 16, 1839030562);
|
||||
b = hh(b, c, d, a, words[i + 14], 23, -35309556);
|
||||
a = hh(a, b, c, d, words[i + 1], 4, -1530992060);
|
||||
d = hh(d, a, b, c, words[i + 4], 11, 1272893353);
|
||||
c = hh(c, d, a, b, words[i + 7], 16, -155497632);
|
||||
b = hh(b, c, d, a, words[i + 10], 23, -1094730640);
|
||||
a = hh(a, b, c, d, words[i + 13], 4, 681279174);
|
||||
d = hh(d, a, b, c, words[i], 11, -358537222);
|
||||
c = hh(c, d, a, b, words[i + 3], 16, -722521979);
|
||||
b = hh(b, c, d, a, words[i + 6], 23, 76029189);
|
||||
a = hh(a, b, c, d, words[i + 9], 4, -640364487);
|
||||
d = hh(d, a, b, c, words[i + 12], 11, -421815835);
|
||||
c = hh(c, d, a, b, words[i + 15], 16, 530742520);
|
||||
b = hh(b, c, d, a, words[i + 2], 23, -995338651);
|
||||
|
||||
a = ii(a, b, c, d, words[i], 6, -198630844);
|
||||
d = ii(d, a, b, c, words[i + 7], 10, 1126891415);
|
||||
c = ii(c, d, a, b, words[i + 14], 15, -1416354905);
|
||||
b = ii(b, c, d, a, words[i + 5], 21, -57434055);
|
||||
a = ii(a, b, c, d, words[i + 12], 6, 1700485571);
|
||||
d = ii(d, a, b, c, words[i + 3], 10, -1894986606);
|
||||
c = ii(c, d, a, b, words[i + 10], 15, -1051523);
|
||||
b = ii(b, c, d, a, words[i + 1], 21, -2054922799);
|
||||
a = ii(a, b, c, d, words[i + 8], 6, 1873313359);
|
||||
d = ii(d, a, b, c, words[i + 15], 10, -30611744);
|
||||
c = ii(c, d, a, b, words[i + 6], 15, -1560198380);
|
||||
b = ii(b, c, d, a, words[i + 13], 21, 1309151649);
|
||||
a = ii(a, b, c, d, words[i + 4], 6, -145523070);
|
||||
d = ii(d, a, b, c, words[i + 11], 10, -1120210379);
|
||||
c = ii(c, d, a, b, words[i + 2], 15, 718787259);
|
||||
b = ii(b, c, d, a, words[i + 9], 21, -343485551);
|
||||
|
||||
a = safeAdd(a, olda);
|
||||
b = safeAdd(b, oldb);
|
||||
c = safeAdd(c, oldc);
|
||||
d = safeAdd(d, oldd);
|
||||
}
|
||||
|
||||
return [a, b, c, d];
|
||||
}
|
||||
|
||||
function rawToHex(input) {
|
||||
const hex = "0123456789abcdef";
|
||||
let output = "";
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const x = input.charCodeAt(i);
|
||||
output += hex.charAt((x >>> 4) & 0x0f) + hex.charAt(x & 0x0f);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function toUtf8Raw(input) {
|
||||
return unescape(encodeURIComponent(input));
|
||||
}
|
||||
|
||||
export default function md5(input) {
|
||||
const value = input === null || input === undefined ? "" : String(input);
|
||||
const raw = toUtf8Raw(value);
|
||||
return rawToHex(wordsToRaw(calculate(rawToWords(raw), raw.length * 8)));
|
||||
}
|
||||
903
ruoyi-ui/src/views/ccdiAccountInfo/index.vue
Normal file
903
ruoyi-ui/src/views/ccdiAccountInfo/index.vue
Normal file
@@ -0,0 +1,903 @@
|
||||
<template>
|
||||
<div class="app-container account-page">
|
||||
<div class="board">
|
||||
<el-form
|
||||
v-show="showSearch"
|
||||
ref="queryForm"
|
||||
:model="queryParams"
|
||||
size="small"
|
||||
:inline="true"
|
||||
class="query-form"
|
||||
label-width="96px"
|
||||
>
|
||||
<el-form-item label="所属人类型">
|
||||
<el-select v-model="queryParams.ownerType" placeholder="请选择所属人类型" clearable style="width: 180px">
|
||||
<el-option label="员工" value="EMPLOYEE" />
|
||||
<el-option label="员工关系人" value="RELATION" />
|
||||
<el-option label="中介" value="INTERMEDIARY" />
|
||||
<el-option label="外部人员" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="queryParams.staffName" placeholder="请输入员工姓名" clearable style="width: 220px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="账户范围">
|
||||
<el-select v-model="queryParams.bankScope" placeholder="请选择账户范围" clearable style="width: 160px">
|
||||
<el-option label="行内" value="INTERNAL" />
|
||||
<el-option label="行外" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关系类型">
|
||||
<el-select v-model="queryParams.relationType" placeholder="请选择关系类型" clearable style="width: 180px">
|
||||
<el-option v-for="item in relationTypeOptions" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="账户姓名">
|
||||
<el-input v-model="queryParams.accountName" placeholder="请输入账户姓名" clearable style="width: 220px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="账户类型">
|
||||
<el-select v-model="queryParams.accountType" placeholder="请选择账户类型" clearable style="width: 180px">
|
||||
<el-option label="银行账户" value="BANK" />
|
||||
<el-option label="证券账户" value="SECURITIES" />
|
||||
<el-option label="支付账户" value="PAYMENT" />
|
||||
<el-option label="其他" value="OTHER" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否实控">
|
||||
<el-select v-model="queryParams.isActualControl" placeholder="请选择是否实控" clearable style="width: 180px">
|
||||
<el-option label="是" :value="1" />
|
||||
<el-option label="否" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="风险等级">
|
||||
<el-select v-model="queryParams.riskLevel" placeholder="请选择风险等级" clearable style="width: 180px">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable style="width: 160px">
|
||||
<el-option label="正常" :value="1" />
|
||||
<el-option label="已销户" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-actions">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="openCreateDialog"
|
||||
v-hasPermi="['ccdi:accountInfo:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['ccdi:accountInfo:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ccdi:accountInfo:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rows" stripe border class="account-table">
|
||||
<el-table-column label="员工姓名" prop="staffName" min-width="120">
|
||||
<template slot-scope="scope">{{ scope.row.staffName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属人类型" prop="ownerType" width="132" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="ownerTypeTagType(scope.row.ownerType)" size="mini" effect="plain">
|
||||
{{ ownerTypeLabel(scope.row.ownerType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系类型" prop="relationType" width="90" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.relationType || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="证件号" prop="ownerId" min-width="170" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.ownerId || scope.row.relationCertNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户姓名" prop="accountName" min-width="120">
|
||||
<template slot-scope="scope">{{ scope.row.accountName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户号码" prop="accountNo" min-width="180" />
|
||||
<el-table-column label="账户类型" prop="accountType" width="110" align="center">
|
||||
<template slot-scope="scope">{{ accountTypeLabel(scope.row.accountType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户范围" prop="bankScope" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="bankScopeTagType(scope.row.bankScope)" effect="plain">{{ bankScopeLabel(scope.row.bankScope) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开户机构" prop="openBank" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column label="是否实控" prop="isActualControl" width="92" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isActualControl === null || scope.row.isActualControl === undefined">-</span>
|
||||
<el-tag v-else size="mini" :type="scope.row.isActualControl ? 'success' : 'danger'">
|
||||
{{ scope.row.isActualControl ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月均笔数" prop="avgMonthTxnCount" width="90" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.avgMonthTxnCount === null || scope.row.avgMonthTxnCount === undefined ? '-' : scope.row.avgMonthTxnCount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月均金额" prop="avgMonthTxnAmount" min-width="120" align="right">
|
||||
<template slot-scope="scope">{{ formatAmount(scope.row.avgMonthTxnAmount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="频率等级" prop="txnFrequencyLevel" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.txnFrequencyLevel">-</span>
|
||||
<el-tag v-else size="mini" :type="frequencyTagType(scope.row.txnFrequencyLevel)">{{ scope.row.txnFrequencyLevel }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险等级" prop="txnRiskLevel" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="!scope.row.txnRiskLevel">-</span>
|
||||
<el-tag v-else size="mini" effect="dark" :type="riskTagType(scope.row.txnRiskLevel)">{{ scope.row.txnRiskLevel }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="scope.row.status === 1 ? 'success' : 'danger'">{{ scope.row.status === 1 ? '正常' : '已销户' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" fixed="right" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetailDialog(scope.row)">详情</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="openEditDialog(scope.row)"
|
||||
v-hasPermi="['ccdi:accountInfo:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ccdi:accountInfo:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="1160px" append-to-body>
|
||||
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="120px">
|
||||
<div class="form-section">
|
||||
<div class="section-head"><span>归属信息</span></div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属人类型" prop="ownerType">
|
||||
<el-radio-group v-model="form.ownerType" :disabled="dialogMode === 'detail'" @change="handleOwnerTypeChange">
|
||||
<el-radio label="EMPLOYEE">员工</el-radio>
|
||||
<el-radio label="RELATION">员工关系人</el-radio>
|
||||
<el-radio label="INTERMEDIARY">中介</el-radio>
|
||||
<el-radio label="EXTERNAL">外部人员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item v-if="isInternalOwner" label="员工姓名" prop="staffId">
|
||||
<el-select v-model="form.staffId" placeholder="请选择员工" filterable clearable style="width: 100%" :disabled="dialogMode === 'detail'" @change="handleStaffChange">
|
||||
<el-option v-for="item in staffOptions" :key="item.staffId" :label="item.name" :value="item.staffId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-else :label="manualOwnerNameLabel" prop="accountName">
|
||||
<el-input v-model="form.accountName" :placeholder="manualOwnerNamePlaceholder" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否本人账户">
|
||||
<el-input :value="form.ownerType === 'EMPLOYEE' ? '是' : '否'" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16" v-if="form.ownerType === 'RELATION'">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系人姓名" prop="relationId">
|
||||
<el-select v-model="form.relationId" placeholder="请选择关系人" clearable style="width: 100%" :disabled="dialogMode === 'detail'" @change="fillRelationMeta">
|
||||
<el-option v-for="item in relationOptions" :key="item.id" :label="item.relationName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系类型">
|
||||
<el-input v-model="form.relationType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系人证件号">
|
||||
<el-input v-model="form.relationCertNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件号" prop="ownerId">
|
||||
<el-input
|
||||
v-if="!isRelationOwner"
|
||||
v-model="form.ownerId"
|
||||
:placeholder="ownerIdPlaceholder"
|
||||
:disabled="dialogMode === 'detail' || isEmployeeOwner"
|
||||
/>
|
||||
<el-input v-else :value="form.relationCertNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-head"><span>账户信息</span></div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户号码" prop="accountNo">
|
||||
<el-input v-model="form.accountNo" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户类型" prop="accountType">
|
||||
<el-select v-model="form.accountType" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="银行账户" value="BANK" />
|
||||
<el-option label="证券账户" value="SECURITIES" />
|
||||
<el-option label="支付账户" value="PAYMENT" />
|
||||
<el-option label="其他" value="OTHER" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户范围" prop="bankScope">
|
||||
<el-select v-model="form.bankScope" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="行内" value="INTERNAL" />
|
||||
<el-option label="行外" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户姓名" prop="accountName" v-if="isInternalOwner">
|
||||
<el-input v-model="form.accountName" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户机构" prop="openBank">
|
||||
<el-input v-model="form.openBank" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行代码">
|
||||
<el-input v-model="form.bankCode" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="币种">
|
||||
<el-input v-model="form.currency" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="form.status" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="正常" :value="1" />
|
||||
<el-option label="已销户" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生效日期" prop="effectiveDate">
|
||||
<el-date-picker v-model="form.effectiveDate" type="date" value-format="yyyy-MM-dd" style="width: 100%" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="失效日期" prop="invalidDate">
|
||||
<el-date-picker v-model="form.invalidDate" type="date" value-format="yyyy-MM-dd" style="width: 100%" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section accent-section">
|
||||
<div class="section-head"><span>分析信息</span></div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否实控账户">
|
||||
<el-select v-model="form.isActualControl" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="是" :value="1" />
|
||||
<el-option label="否" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="月均交易笔数">
|
||||
<el-input-number v-model="form.avgMonthTxnCount" :min="0" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="月均交易金额">
|
||||
<el-input-number v-model="form.avgMonthTxnAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="频率等级">
|
||||
<el-select v-model="form.txnFrequencyLevel" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="风险等级">
|
||||
<el-select v-model="form.txnRiskLevel" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借方单笔最高额">
|
||||
<el-input-number v-model="form.debitSingleMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="贷方单笔最高额">
|
||||
<el-input-number v-model="form.creditSingleMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借方日累计最高额">
|
||||
<el-input-number v-model="form.debitDailyMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="贷方日累计最高额">
|
||||
<el-input-number v-model="form.creditDailyMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">{{ dialogMode === 'detail' ? '关 闭' : '取 消' }}</el-button>
|
||||
<el-button v-if="dialogMode !== 'detail'" type="primary" @click="submitForm">保 存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
@close="handleImportDialogClose"
|
||||
v-loading="upload.isUploading"
|
||||
element-loading-text="正在导入数据,请稍候..."
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.7)"
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx,.xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
<span>仅允许导入 xls、xlsx 文件。</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm" :loading="upload.isUploading">确 定</el-button>
|
||||
<el-button @click="upload.open = false" :disabled="upload.isUploading">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<import-result-dialog
|
||||
:visible.sync="importResultVisible"
|
||||
:content="importResultContent"
|
||||
title="导入结果"
|
||||
@close="handleImportResultClose"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ImportResultDialog from '@/components/ImportResultDialog.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {
|
||||
addAccountInfo,
|
||||
delAccountInfo,
|
||||
getAccountInfo,
|
||||
listAccountInfo,
|
||||
listAccountRelationOptions,
|
||||
listAccountStaffOptions,
|
||||
updateAccountInfo
|
||||
} from '@/api/ccdiAccountInfo'
|
||||
|
||||
const RELATION_TYPES = ['配偶', '父亲', '母亲', '子女', '兄弟姐妹', '朋友', '同事', '其他']
|
||||
|
||||
function createEmptyForm() {
|
||||
return {
|
||||
id: null,
|
||||
ownerType: 'EMPLOYEE',
|
||||
ownerId: '',
|
||||
staffId: undefined,
|
||||
relationId: undefined,
|
||||
relationType: '',
|
||||
relationName: '',
|
||||
relationCertNo: '',
|
||||
accountNo: '',
|
||||
accountType: 'BANK',
|
||||
bankScope: 'EXTERNAL',
|
||||
accountName: '',
|
||||
openBank: '',
|
||||
bankCode: '',
|
||||
currency: 'CNY',
|
||||
status: 1,
|
||||
effectiveDate: '',
|
||||
invalidDate: '',
|
||||
isActualControl: 1,
|
||||
avgMonthTxnCount: 0,
|
||||
avgMonthTxnAmount: 0,
|
||||
txnFrequencyLevel: 'MEDIUM',
|
||||
debitSingleMaxAmount: 0,
|
||||
creditSingleMaxAmount: 0,
|
||||
debitDailyMaxAmount: 0,
|
||||
creditDailyMaxAmount: 0,
|
||||
txnRiskLevel: 'LOW'
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'CcdiAccountInfo',
|
||||
components: { ImportResultDialog },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
rows: [],
|
||||
dialogVisible: false,
|
||||
dialogMode: 'create',
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
staffName: '',
|
||||
ownerType: '',
|
||||
bankScope: '',
|
||||
relationType: '',
|
||||
accountName: '',
|
||||
accountType: '',
|
||||
isActualControl: undefined,
|
||||
riskLevel: '',
|
||||
status: undefined
|
||||
},
|
||||
form: createEmptyForm(),
|
||||
staffOptions: [],
|
||||
relationOptions: [],
|
||||
relationTypeOptions: RELATION_TYPES,
|
||||
upload: {
|
||||
open: false,
|
||||
title: '导入账户数据',
|
||||
isUploading: false,
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/ccdi/accountInfo/importData'
|
||||
},
|
||||
importResultVisible: false,
|
||||
importResultContent: '',
|
||||
rules: {
|
||||
ownerType: [{ required: true, message: '请选择所属人类型', trigger: 'change' }],
|
||||
staffId: [{ validator: (rule, value, callback) => {
|
||||
if (this.isInternalOwner && !value) {
|
||||
callback(new Error('请选择员工'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}, trigger: 'change' }],
|
||||
relationId: [{ validator: (rule, value, callback) => {
|
||||
if (this.form.ownerType === 'RELATION' && !value) {
|
||||
callback(new Error('请选择关系人'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}, trigger: 'change' }],
|
||||
ownerId: [{ validator: (rule, value, callback) => {
|
||||
if (!this.isInternalOwner && !value) {
|
||||
callback(new Error('请输入证件号'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}, trigger: 'blur' }],
|
||||
accountNo: [{ required: true, message: '请输入账户号码', trigger: 'blur' }],
|
||||
accountType: [{ required: true, message: '请选择账户类型', trigger: 'change' }],
|
||||
bankScope: [{ required: true, message: '请选择账户范围', trigger: 'change' }],
|
||||
accountName: [{ required: true, message: '请输入账户姓名', trigger: 'blur' }],
|
||||
openBank: [{ required: true, message: '请输入开户机构', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '请选择状态', trigger: 'change' }],
|
||||
effectiveDate: [{ required: true, message: '请选择生效日期', trigger: 'change' }],
|
||||
invalidDate: [{ validator: (rule, value, callback) => {
|
||||
if (value && this.form.effectiveDate && value < this.form.effectiveDate) {
|
||||
callback(new Error('失效日期不能早于生效日期'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}, trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isEmployeeOwner() {
|
||||
return this.form.ownerType === 'EMPLOYEE'
|
||||
},
|
||||
isRelationOwner() {
|
||||
return this.form.ownerType === 'RELATION'
|
||||
},
|
||||
isInternalOwner() {
|
||||
return this.isEmployeeOwner || this.isRelationOwner
|
||||
},
|
||||
manualOwnerNameLabel() {
|
||||
return this.form.ownerType === 'INTERMEDIARY' ? '中介名称' : '外部人员姓名'
|
||||
},
|
||||
manualOwnerNamePlaceholder() {
|
||||
return this.form.ownerType === 'INTERMEDIARY' ? '请输入中介名称' : '请输入外部人员姓名'
|
||||
},
|
||||
ownerIdPlaceholder() {
|
||||
return this.form.ownerType === 'INTERMEDIARY' ? '请输入中介证件号' : '请输入身份证号'
|
||||
},
|
||||
analysisReadonly() {
|
||||
return this.dialogMode === 'detail' || this.form.bankScope === 'INTERNAL'
|
||||
},
|
||||
dialogTitle() {
|
||||
if (this.dialogMode === 'detail') return '账户详情'
|
||||
if (this.dialogMode === 'edit') return '编辑账户'
|
||||
return '新增账户'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listAccountInfo(this.queryParams).then(response => {
|
||||
this.rows = response.rows || []
|
||||
this.total = response.total || 0
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async loadStaffOptions(query = '') {
|
||||
const response = await listAccountStaffOptions(query)
|
||||
this.staffOptions = response.data || []
|
||||
},
|
||||
async loadRelationOptions(staffId) {
|
||||
if (!staffId) {
|
||||
this.relationOptions = []
|
||||
return
|
||||
}
|
||||
const response = await listAccountRelationOptions(staffId)
|
||||
this.relationOptions = response.data || []
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
staffName: '',
|
||||
ownerType: '',
|
||||
bankScope: '',
|
||||
relationType: '',
|
||||
accountName: '',
|
||||
accountType: '',
|
||||
isActualControl: undefined,
|
||||
riskLevel: '',
|
||||
status: undefined
|
||||
}
|
||||
this.resetForm('queryForm')
|
||||
this.getList()
|
||||
},
|
||||
handleImport() {
|
||||
this.upload.open = true
|
||||
},
|
||||
handleExport() {
|
||||
this.download('ccdi/accountInfo/export', {
|
||||
...this.queryParams
|
||||
}, `账户库管理_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
importTemplate() {
|
||||
this.download('ccdi/accountInfo/importTemplate', {}, `账户库导入模板_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleFileUploadProgress() {
|
||||
this.upload.isUploading = true
|
||||
},
|
||||
handleFileSuccess(response) {
|
||||
this.upload.isUploading = false
|
||||
this.upload.open = false
|
||||
this.$refs.upload.clearFiles()
|
||||
if (response.code !== 200) {
|
||||
this.$modal.msgError(response.msg || '导入失败')
|
||||
return
|
||||
}
|
||||
const importData = response.data || {}
|
||||
this.importResultContent = this.buildImportResultHtml(importData)
|
||||
this.importResultVisible = true
|
||||
this.getList()
|
||||
},
|
||||
buildImportResultHtml(importData) {
|
||||
const totalCount = importData.totalCount || 0
|
||||
const successCount = importData.successCount || 0
|
||||
const failureCount = importData.failureCount || 0
|
||||
let html = '<div style="padding: 10px;">'
|
||||
html += `<p><strong>导入完成</strong></p><p>总数:${totalCount} 条</p><p>成功:${successCount} 条</p><p>失败:${failureCount} 条</p>`
|
||||
html += '</div>'
|
||||
return html
|
||||
},
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
handleImportDialogClose() {
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload && this.$refs.upload.clearFiles()
|
||||
},
|
||||
handleImportResultClose() {
|
||||
this.importResultVisible = false
|
||||
this.importResultContent = ''
|
||||
},
|
||||
formatAmount(value) {
|
||||
if (value === null || value === undefined || value === '') return '-'
|
||||
return Number(value).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
},
|
||||
accountTypeLabel(type) {
|
||||
return { BANK: '银行账户', SECURITIES: '证券账户', PAYMENT: '支付账户', OTHER: '其他' }[type] || type
|
||||
},
|
||||
bankScopeLabel(scope) {
|
||||
return { INTERNAL: '行内', EXTERNAL: '行外' }[scope] || scope
|
||||
},
|
||||
bankScopeTagType(scope) {
|
||||
return scope === 'INTERNAL' ? 'success' : 'warning'
|
||||
},
|
||||
ownerTypeLabel(type) {
|
||||
return { EMPLOYEE: '员工', RELATION: '员工关系人', INTERMEDIARY: '中介', EXTERNAL: '外部人员' }[type] || type
|
||||
},
|
||||
ownerTypeTagType(type) {
|
||||
return { EMPLOYEE: 'success', RELATION: 'info', INTERMEDIARY: 'danger', EXTERNAL: 'warning' }[type] || 'info'
|
||||
},
|
||||
riskTagType(level) {
|
||||
return { LOW: 'success', MEDIUM: 'warning', HIGH: 'danger' }[level] || 'info'
|
||||
},
|
||||
frequencyTagType(level) {
|
||||
return { LOW: 'info', MEDIUM: '', HIGH: 'danger' }[level] || 'info'
|
||||
},
|
||||
async openCreateDialog() {
|
||||
this.dialogMode = 'create'
|
||||
this.form = createEmptyForm()
|
||||
this.relationOptions = []
|
||||
await this.loadStaffOptions()
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => this.clearDialogValidate())
|
||||
},
|
||||
async openEditDialog(row) {
|
||||
await this.openDialog('edit', row.id)
|
||||
},
|
||||
async openDetailDialog(row) {
|
||||
await this.openDialog('detail', row.id)
|
||||
},
|
||||
async openDialog(mode, id) {
|
||||
this.dialogMode = mode
|
||||
await this.loadStaffOptions()
|
||||
const response = await getAccountInfo(id)
|
||||
const data = response.data || {}
|
||||
if (data.ownerType === 'RELATION' && data.staffId) {
|
||||
await this.loadRelationOptions(data.staffId)
|
||||
} else {
|
||||
this.relationOptions = []
|
||||
}
|
||||
this.form = Object.assign(createEmptyForm(), data, {
|
||||
staffId: data.staffId || undefined,
|
||||
relationId: data.relationId || undefined,
|
||||
invalidDate: data.invalidDate || ''
|
||||
})
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => this.clearDialogValidate())
|
||||
},
|
||||
handleOwnerTypeChange(value) {
|
||||
if (value !== 'RELATION') {
|
||||
this.form.relationId = undefined
|
||||
this.form.relationType = ''
|
||||
this.form.relationName = ''
|
||||
this.form.relationCertNo = ''
|
||||
this.relationOptions = []
|
||||
}
|
||||
if (!this.isInternalOwner) {
|
||||
this.form.staffId = undefined
|
||||
this.form.relationId = undefined
|
||||
this.form.relationType = ''
|
||||
this.form.relationName = ''
|
||||
this.form.relationCertNo = ''
|
||||
this.form.accountName = ''
|
||||
this.form.ownerId = ''
|
||||
} else if (value === 'EMPLOYEE' && this.form.staffId) {
|
||||
this.handleStaffChange(this.form.staffId)
|
||||
} else if (value === 'RELATION' && this.form.staffId) {
|
||||
this.loadRelationOptions(this.form.staffId)
|
||||
this.form.accountName = ''
|
||||
this.form.ownerId = ''
|
||||
}
|
||||
},
|
||||
async handleStaffChange(staffId) {
|
||||
const staff = this.staffOptions.find(item => item.staffId === staffId)
|
||||
if (this.form.ownerType === 'EMPLOYEE') {
|
||||
this.form.accountName = staff ? staff.name : ''
|
||||
this.form.ownerId = staff ? (staff.idCard || '') : ''
|
||||
} else if (this.form.ownerType === 'RELATION') {
|
||||
this.form.relationId = undefined
|
||||
this.form.relationType = ''
|
||||
this.form.relationName = ''
|
||||
this.form.relationCertNo = ''
|
||||
this.form.accountName = ''
|
||||
this.form.ownerId = ''
|
||||
await this.loadRelationOptions(staffId)
|
||||
}
|
||||
},
|
||||
fillRelationMeta(relationId) {
|
||||
const relation = this.relationOptions.find(item => item.id === relationId)
|
||||
if (!relation) return
|
||||
this.form.relationType = relation.relationType
|
||||
this.form.relationName = relation.relationName
|
||||
this.form.relationCertNo = relation.relationCertNo
|
||||
this.form.ownerId = relation.relationCertNo
|
||||
this.form.accountName = relation.relationName
|
||||
},
|
||||
buildPayload() {
|
||||
return {
|
||||
id: this.form.id,
|
||||
ownerType: this.form.ownerType,
|
||||
ownerId: this.form.ownerId,
|
||||
accountNo: this.form.accountNo,
|
||||
accountType: this.form.accountType,
|
||||
bankScope: this.form.bankScope,
|
||||
accountName: this.form.accountName,
|
||||
openBank: this.form.openBank,
|
||||
bankCode: this.form.bankCode,
|
||||
currency: this.form.currency,
|
||||
status: this.form.status,
|
||||
effectiveDate: this.form.effectiveDate,
|
||||
invalidDate: this.form.invalidDate || null,
|
||||
isActualControl: this.form.isActualControl,
|
||||
avgMonthTxnCount: this.form.avgMonthTxnCount,
|
||||
avgMonthTxnAmount: this.form.avgMonthTxnAmount,
|
||||
txnFrequencyLevel: this.form.txnFrequencyLevel,
|
||||
debitSingleMaxAmount: this.form.debitSingleMaxAmount,
|
||||
creditSingleMaxAmount: this.form.creditSingleMaxAmount,
|
||||
debitDailyMaxAmount: this.form.debitDailyMaxAmount,
|
||||
creditDailyMaxAmount: this.form.creditDailyMaxAmount,
|
||||
txnRiskLevel: this.form.txnRiskLevel
|
||||
}
|
||||
},
|
||||
clearDialogValidate() {
|
||||
if (this.$refs.dialogForm) {
|
||||
this.$refs.dialogForm.clearValidate()
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs.dialogForm.validate(valid => {
|
||||
if (!valid) return
|
||||
const payload = this.buildPayload()
|
||||
const request = this.dialogMode === 'edit' ? updateAccountInfo(payload) : addAccountInfo(payload)
|
||||
request.then(() => {
|
||||
this.$modal.msgSuccess(this.dialogMode === 'edit' ? '修改成功' : '新增成功')
|
||||
this.dialogVisible = false
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除账户号码为“' + row.accountNo + '”的数据项?').then(() => {
|
||||
return delAccountInfo(row.id)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
this.getList()
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.account-page {
|
||||
min-height: calc(100vh - 84px);
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.board {
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.account-table ::v-deep .el-table__header th {
|
||||
background: #f8f8f9;
|
||||
color: #515a6e;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
margin-bottom: 18px;
|
||||
padding: 18px 18px 4px;
|
||||
border-radius: 8px;
|
||||
background: #f9fafb;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.accent-section {
|
||||
background: #f9fafb;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-head span {
|
||||
color: #303133;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.query-form ::v-deep .el-form-item {
|
||||
display: block;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
622
ruoyi-ui/src/views/ccdiAccountInfoPrototype/index.vue
Normal file
622
ruoyi-ui/src/views/ccdiAccountInfoPrototype/index.vue
Normal file
@@ -0,0 +1,622 @@
|
||||
<template>
|
||||
<div class="app-container account-prototype-page">
|
||||
<div class="board">
|
||||
<el-form
|
||||
v-show="showSearch"
|
||||
ref="queryForm"
|
||||
:model="queryParams"
|
||||
size="small"
|
||||
:inline="true"
|
||||
class="query-form"
|
||||
label-width="96px"
|
||||
>
|
||||
<el-form-item label="所属人类型">
|
||||
<el-select v-model="queryParams.ownerType" placeholder="请选择所属人类型" clearable style="width: 180px">
|
||||
<el-option label="员工" value="EMPLOYEE" />
|
||||
<el-option label="员工关系人" value="RELATION" />
|
||||
<el-option label="中介" value="INTERMEDIARY" />
|
||||
<el-option label="外部人员" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="员工姓名">
|
||||
<el-input v-model="queryParams.staffName" placeholder="请输入员工姓名" clearable style="width: 220px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="账户范围">
|
||||
<el-select v-model="queryParams.bankScope" placeholder="请选择账户范围" clearable style="width: 160px">
|
||||
<el-option label="行内" value="INTERNAL" />
|
||||
<el-option label="行外" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关系类型">
|
||||
<el-select v-model="queryParams.relationType" placeholder="请选择关系类型" clearable style="width: 180px">
|
||||
<el-option v-for="item in relationTypeOptions" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="账户姓名">
|
||||
<el-input v-model="queryParams.accountName" placeholder="请输入账户姓名" clearable style="width: 220px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="账户类型">
|
||||
<el-select v-model="queryParams.accountType" placeholder="请选择账户类型" clearable style="width: 180px">
|
||||
<el-option label="银行账户" value="BANK" />
|
||||
<el-option label="证券账户" value="SECURITIES" />
|
||||
<el-option label="支付账户" value="PAYMENT" />
|
||||
<el-option label="其他" value="OTHER" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否实控">
|
||||
<el-select v-model="queryParams.isActualControl" placeholder="请选择是否实控" clearable style="width: 180px">
|
||||
<el-option label="是" :value="1" />
|
||||
<el-option label="否" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="风险等级">
|
||||
<el-select v-model="queryParams.riskLevel" placeholder="请选择风险等级" clearable style="width: 180px">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable style="width: 160px">
|
||||
<el-option label="正常" :value="1" />
|
||||
<el-option label="已销户" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-actions">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openCreateDialog">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-upload2" size="mini">导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table :data="pageRows" stripe border class="account-table">
|
||||
<el-table-column label="员工姓名" prop="staffName" min-width="120" />
|
||||
<el-table-column label="所属人类型" prop="ownerType" width="132" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="ownerTypeTagType(scope.row.ownerType)" size="mini" effect="plain">
|
||||
{{ ownerTypeLabel(scope.row.ownerType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="关系类型" prop="relationType" width="90" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.relationType || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="证件号" prop="ownerId" min-width="170" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.ownerId || scope.row.relationCertNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户姓名" prop="accountName" min-width="120">
|
||||
<template slot-scope="scope">{{ scope.row.accountName || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户号码" prop="accountNo" min-width="180" />
|
||||
<el-table-column label="账户类型" prop="accountType" width="110" align="center">
|
||||
<template slot-scope="scope">{{ accountTypeLabel(scope.row.accountType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户范围" prop="bankScope" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="bankScopeTagType(scope.row.bankScope)" effect="plain">{{ bankScopeLabel(scope.row.bankScope) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开户机构" prop="openBank" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column label="是否实控" prop="isActualControl" width="92" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="scope.row.isActualControl ? 'success' : 'danger'">
|
||||
{{ scope.row.isActualControl ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月均笔数" prop="avgMonthTxnCount" width="90" align="center" />
|
||||
<el-table-column label="月均金额" prop="avgMonthTxnAmount" min-width="120" align="right">
|
||||
<template slot-scope="scope">{{ formatAmount(scope.row.avgMonthTxnAmount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="频率等级" prop="txnFrequencyLevel" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="frequencyTagType(scope.row.txnFrequencyLevel)">{{ scope.row.txnFrequencyLevel }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险等级" prop="txnRiskLevel" width="96" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" effect="dark" :type="riskTagType(scope.row.txnRiskLevel)">{{ scope.row.txnRiskLevel }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" :type="scope.row.status === 1 ? 'success' : 'danger'">{{ scope.row.status === 1 ? '正常' : '已销户' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-view" @click="openDetailDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" @click="openEditDialog(scope.row)">编辑</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-delete">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="filteredRows.length > 0" :total="filteredRows.length" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="handlePagination" />
|
||||
</div>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="1160px" append-to-body>
|
||||
<el-form ref="dialogForm" :model="form" label-width="120px">
|
||||
<div class="form-section">
|
||||
<div class="section-head"><span>归属信息</span></div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属人类型">
|
||||
<el-radio-group v-model="form.ownerType" :disabled="dialogMode === 'detail'" @change="handleOwnerTypeChange">
|
||||
<el-radio label="EMPLOYEE">员工</el-radio>
|
||||
<el-radio label="RELATION">员工关系人</el-radio>
|
||||
<el-radio label="INTERMEDIARY">中介</el-radio>
|
||||
<el-radio label="EXTERNAL">外部人员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item v-if="form.ownerType !== 'EXTERNAL' && form.ownerType !== 'INTERMEDIARY'" label="员工姓名">
|
||||
<el-select v-model="form.staffId" placeholder="请选择员工" style="width: 100%" :disabled="dialogMode === 'detail'" @change="handleStaffChange">
|
||||
<el-option v-for="item in staffOptions" :key="item.staffId" :label="item.name" :value="item.staffId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-else :label="form.ownerType === 'INTERMEDIARY' ? '中介名称' : '外部人员姓名'">
|
||||
<el-input v-model="form.accountName" :placeholder="form.ownerType === 'INTERMEDIARY' ? '请输入中介名称' : '请输入外部人员姓名'" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否本人账户">
|
||||
<el-input :value="form.ownerType === 'EMPLOYEE' ? '是' : '否'" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16" v-if="form.ownerType === 'RELATION'">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系人姓名">
|
||||
<el-select v-model="form.relationId" placeholder="请选择关系人" style="width: 100%" :disabled="dialogMode === 'detail'" @change="fillRelationMeta">
|
||||
<el-option v-for="item in relationOptions" :key="item.id" :label="item.relationName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系类型">
|
||||
<el-select v-model="form.relationType" style="width: 100%" :disabled="dialogMode !== 'create'">
|
||||
<el-option v-for="item in relationTypeOptions" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关系人证件号">
|
||||
<el-input v-model="form.relationCertNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件号">
|
||||
<el-input v-model="form.ownerId" :placeholder="form.ownerType === 'INTERMEDIARY' ? '请输入中介证件号' : '请输入身份证号'" :disabled="dialogMode === 'detail' || form.ownerType === 'EMPLOYEE'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-head"><span>账户信息</span></div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户号码">
|
||||
<el-input v-model="form.accountNo" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户类型">
|
||||
<el-select v-model="form.accountType" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="银行账户" value="BANK" />
|
||||
<el-option label="证券账户" value="SECURITIES" />
|
||||
<el-option label="支付账户" value="PAYMENT" />
|
||||
<el-option label="其他" value="OTHER" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户范围">
|
||||
<el-select v-model="form.bankScope" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="行内" value="INTERNAL" />
|
||||
<el-option label="行外" value="EXTERNAL" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户机构">
|
||||
<el-input v-model="form.openBank" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行代码">
|
||||
<el-input v-model="form.bankCode" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="币种">
|
||||
<el-input v-model="form.currency" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="form.status" style="width: 100%" :disabled="dialogMode === 'detail'">
|
||||
<el-option label="正常" :value="1" />
|
||||
<el-option label="已销户" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生效日期">
|
||||
<el-date-picker v-model="form.effectiveDate" type="date" value-format="yyyy-MM-dd" style="width: 100%" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="失效日期">
|
||||
<el-date-picker v-model="form.invalidDate" type="date" value-format="yyyy-MM-dd" style="width: 100%" :disabled="dialogMode === 'detail'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section accent-section">
|
||||
<div class="section-head">
|
||||
<span>分析信息</span>
|
||||
</div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否实控账户">
|
||||
<el-select v-model="form.isActualControl" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="是" :value="1" />
|
||||
<el-option label="否" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="月均交易笔数">
|
||||
<el-input-number v-model="form.avgMonthTxnCount" :min="0" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="月均交易金额">
|
||||
<el-input-number v-model="form.avgMonthTxnAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="频率等级">
|
||||
<el-select v-model="form.txnFrequencyLevel" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="风险等级">
|
||||
<el-select v-model="form.txnRiskLevel" style="width: 100%" :disabled="analysisReadonly">
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借方单笔最高额">
|
||||
<el-input-number v-model="form.debitSingleMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="贷方单笔最高额">
|
||||
<el-input-number v-model="form.creditSingleMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="借方日累计最高额">
|
||||
<el-input-number v-model="form.debitDailyMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="贷方日累计最高额">
|
||||
<el-input-number v-model="form.creditDailyMaxAmount" :min="0" :precision="2" :disabled="analysisReadonly" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">{{ dialogMode === 'detail' ? '关 闭' : '取 消' }}</el-button>
|
||||
<el-button v-if="dialogMode !== 'detail'" type="primary" @click="dialogVisible = false">保 存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const RELATION_TYPES = ['配偶', '父亲', '母亲', '子女', '兄弟姐妹', '朋友', '同事', '其他']
|
||||
|
||||
const ROWS = [
|
||||
{ id: 1, staffId: 100001, staffName: '陈志远', ownerType: 'EMPLOYEE', ownerId: '330106198801126211', relationId: null, relationType: '', relationName: '', accountName: '陈志远', relationCertNo: '', accountNo: '6222024300000187612', accountType: 'BANK', bankScope: 'INTERNAL', openBank: '本行营业部', bankCode: '102331000001', currency: 'CNY', status: 1, isActualControl: 1, avgMonthTxnCount: 82, avgMonthTxnAmount: 356800, txnFrequencyLevel: 'HIGH', debitSingleMaxAmount: 58000, creditSingleMaxAmount: 120000, debitDailyMaxAmount: 132000, creditDailyMaxAmount: 168000, txnRiskLevel: 'MEDIUM', effectiveDate: '2024-01-08', invalidDate: '' },
|
||||
{ id: 2, staffId: 100001, staffName: '陈志远', ownerType: 'RELATION', ownerId: '330102198903075428', relationId: 90011, relationType: '配偶', relationName: '陆瑶', accountName: '陆瑶', relationCertNo: '330102198903075428', accountNo: '6217002876309918271', accountType: 'BANK', bankScope: 'EXTERNAL', openBank: '建设银行城西支行', bankCode: '105331000017', currency: 'CNY', status: 1, isActualControl: 1, avgMonthTxnCount: 41, avgMonthTxnAmount: 168400, txnFrequencyLevel: 'MEDIUM', debitSingleMaxAmount: 66000, creditSingleMaxAmount: 83000, debitDailyMaxAmount: 91000, creditDailyMaxAmount: 103000, txnRiskLevel: 'LOW', effectiveDate: '2024-06-18', invalidDate: '' },
|
||||
{ id: 3, staffId: 100002, staffName: '高嘉宁', ownerType: 'RELATION', relationId: 90021, relationType: '父亲', relationName: '高国平', accountName: '高国平', relationCertNo: '330106196603128414', accountNo: '3100038899226611007', accountType: 'SECURITIES', bankScope: 'EXTERNAL', openBank: '国金证券杭州营业部', bankCode: '', currency: 'CNY', status: 1, isActualControl: 0, avgMonthTxnCount: 16, avgMonthTxnAmount: 912000, txnFrequencyLevel: 'LOW', debitSingleMaxAmount: 380000, creditSingleMaxAmount: 420000, debitDailyMaxAmount: 460000, creditDailyMaxAmount: 500000, txnRiskLevel: 'HIGH', effectiveDate: '2025-02-01', invalidDate: '' },
|
||||
{ id: 4, staffId: 100003, staffName: '宋文洁', ownerType: 'EMPLOYEE', ownerId: '330106199110018922', relationId: null, relationType: '', relationName: '', accountName: '宋文洁', relationCertNo: '', accountNo: '0903001000017623312', accountType: 'BANK', bankScope: 'INTERNAL', openBank: '本行滨江支行', bankCode: '102331000009', currency: 'CNY', status: 1, isActualControl: 1, avgMonthTxnCount: 65, avgMonthTxnAmount: 204600, txnFrequencyLevel: 'MEDIUM', debitSingleMaxAmount: 36000, creditSingleMaxAmount: 92000, debitDailyMaxAmount: 88000, creditDailyMaxAmount: 112000, txnRiskLevel: 'LOW', effectiveDate: '2023-09-20', invalidDate: '' },
|
||||
{ id: 5, staffId: 100004, staffName: '周明浩', ownerType: 'RELATION', ownerId: '330108201407210024', relationId: 90031, relationType: '子女', relationName: '周晨熙', accountName: '周晨熙', relationCertNo: '330108201407210024', accountNo: '6212260018273009177', accountType: 'BANK', bankScope: 'EXTERNAL', openBank: '农业银行滨江支行', bankCode: '103331000018', currency: 'CNY', status: 1, isActualControl: 1, avgMonthTxnCount: 9, avgMonthTxnAmount: 12800, txnFrequencyLevel: 'LOW', debitSingleMaxAmount: 2500, creditSingleMaxAmount: 10000, debitDailyMaxAmount: 2600, creditDailyMaxAmount: 10000, txnRiskLevel: 'LOW', effectiveDate: '2025-03-15', invalidDate: '' },
|
||||
{ id: 6, staffId: 100002, staffName: '高嘉宁', ownerType: 'EMPLOYEE', ownerId: '330106199002163517', relationId: null, relationType: '', relationName: '', accountName: '高嘉宁', relationCertNo: '', accountNo: '9558803029941256618', accountType: 'BANK', bankScope: 'EXTERNAL', openBank: '邮储银行滨江支行', bankCode: '403331000003', currency: 'CNY', status: 2, isActualControl: 0, avgMonthTxnCount: 4, avgMonthTxnAmount: 8600, txnFrequencyLevel: 'LOW', debitSingleMaxAmount: 4300, creditSingleMaxAmount: 5000, debitDailyMaxAmount: 4300, creditDailyMaxAmount: 5000, txnRiskLevel: 'MEDIUM', effectiveDate: '2022-11-11', invalidDate: '' },
|
||||
{ id: 7, staffId: null, staffName: '-', ownerType: 'EXTERNAL', ownerId: '91330108MA2H8X8X2Q', relationId: null, relationType: '其他', relationName: '', accountName: '边界科技有限公司', relationCertNo: '', accountNo: '6214830019287765102', accountType: 'BANK', bankScope: 'EXTERNAL', openBank: '招商银行钱江支行', bankCode: '308331000112', currency: 'CNY', status: 1, isActualControl: 0, avgMonthTxnCount: 28, avgMonthTxnAmount: 68400, txnFrequencyLevel: 'MEDIUM', debitSingleMaxAmount: 32000, creditSingleMaxAmount: 45000, debitDailyMaxAmount: 58000, creditDailyMaxAmount: 76000, txnRiskLevel: 'LOW', effectiveDate: '2025-07-01', invalidDate: '' },
|
||||
{ id: 8, staffId: null, staffName: '-', ownerType: 'INTERMEDIARY', ownerId: '330105198512124411', relationId: null, relationType: '', relationName: '', accountName: '吴晓峰', relationCertNo: '', accountNo: '13857123456', accountType: 'PAYMENT', bankScope: 'EXTERNAL', openBank: '支付宝', bankCode: '', currency: 'CNY', status: 1, isActualControl: 0, avgMonthTxnCount: 12, avgMonthTxnAmount: 48600, txnFrequencyLevel: 'MEDIUM', debitSingleMaxAmount: 9000, creditSingleMaxAmount: 12000, debitDailyMaxAmount: 15000, creditDailyMaxAmount: 18000, txnRiskLevel: 'LOW', effectiveDate: '2025-04-01', invalidDate: '' }
|
||||
]
|
||||
|
||||
const STAFF_OPTIONS = [
|
||||
{ staffId: 100001, name: '陈志远', ownerId: '330106198801126211' },
|
||||
{ staffId: 100002, name: '高嘉宁', ownerId: '330106199002163517' },
|
||||
{ staffId: 100003, name: '宋文洁', ownerId: '330106199110018922' },
|
||||
{ staffId: 100004, name: '周明浩', ownerId: '330106198612104136' }
|
||||
]
|
||||
|
||||
const RELATION_OPTIONS = [
|
||||
{ id: 90011, staffId: 100001, relationName: '陆瑶', relationType: '配偶', relationCertNo: '330102198903075428' },
|
||||
{ id: 90021, staffId: 100002, relationName: '高国平', relationType: '父亲', relationCertNo: '330106196603128414' },
|
||||
{ id: 90031, staffId: 100004, relationName: '周晨熙', relationType: '子女', relationCertNo: '330108201407210024' }
|
||||
]
|
||||
|
||||
function createEmptyForm() {
|
||||
return {
|
||||
id: null,
|
||||
staffId: undefined,
|
||||
ownerType: 'EMPLOYEE',
|
||||
ownerId: '',
|
||||
relationId: undefined,
|
||||
relationType: '',
|
||||
relationName: '',
|
||||
accountName: '',
|
||||
relationCertNo: '',
|
||||
accountNo: '',
|
||||
accountType: 'BANK',
|
||||
bankScope: 'EXTERNAL',
|
||||
openBank: '',
|
||||
bankCode: '',
|
||||
currency: 'CNY',
|
||||
status: 1,
|
||||
effectiveDate: '',
|
||||
invalidDate: '',
|
||||
isActualControl: 1,
|
||||
avgMonthTxnCount: 0,
|
||||
avgMonthTxnAmount: 0,
|
||||
txnFrequencyLevel: 'MEDIUM',
|
||||
debitSingleMaxAmount: 0,
|
||||
creditSingleMaxAmount: 0,
|
||||
debitDailyMaxAmount: 0,
|
||||
creditDailyMaxAmount: 0,
|
||||
txnRiskLevel: 'LOW'
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'CcdiAccountInfoPrototype',
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
dialogVisible: false,
|
||||
dialogMode: 'create',
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
staffName: '',
|
||||
ownerType: '',
|
||||
bankScope: '',
|
||||
relationType: '',
|
||||
accountName: '',
|
||||
accountType: '',
|
||||
isActualControl: undefined,
|
||||
riskLevel: '',
|
||||
status: undefined
|
||||
},
|
||||
rows: ROWS,
|
||||
form: createEmptyForm(),
|
||||
staffOptions: STAFF_OPTIONS,
|
||||
allRelationOptions: RELATION_OPTIONS,
|
||||
relationTypeOptions: RELATION_TYPES
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredRows() {
|
||||
return this.rows.filter((row) => {
|
||||
if (this.queryParams.staffName && !row.staffName.includes(this.queryParams.staffName)) return false
|
||||
if (this.queryParams.ownerType && row.ownerType !== this.queryParams.ownerType) return false
|
||||
if (this.queryParams.bankScope && row.bankScope !== this.queryParams.bankScope) return false
|
||||
if (this.queryParams.relationType && row.relationType !== this.queryParams.relationType) return false
|
||||
if (this.queryParams.accountName && !row.accountName.includes(this.queryParams.accountName)) return false
|
||||
if (this.queryParams.accountType && row.accountType !== this.queryParams.accountType) return false
|
||||
if (this.queryParams.isActualControl !== undefined && row.isActualControl !== this.queryParams.isActualControl) return false
|
||||
if (this.queryParams.riskLevel && row.txnRiskLevel !== this.queryParams.riskLevel) return false
|
||||
if (this.queryParams.status !== undefined && row.status !== this.queryParams.status) return false
|
||||
return true
|
||||
})
|
||||
},
|
||||
pageRows() {
|
||||
const start = (this.queryParams.pageNum - 1) * this.queryParams.pageSize
|
||||
return this.filteredRows.slice(start, start + this.queryParams.pageSize)
|
||||
},
|
||||
relationOptions() {
|
||||
if (!this.form.staffId) return []
|
||||
return this.allRelationOptions.filter(item => item.staffId === this.form.staffId)
|
||||
},
|
||||
analysisReadonly() {
|
||||
return this.dialogMode === 'detail' || this.form.bankScope === 'INTERNAL'
|
||||
},
|
||||
dialogTitle() {
|
||||
if (this.dialogMode === 'detail') return '账户详情'
|
||||
if (this.dialogMode === 'edit') return '编辑账户'
|
||||
return '新增账户'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.queryParams.pageNum = 1
|
||||
},
|
||||
formatAmount(value) {
|
||||
if (value === null || value === undefined || value === '') return '0.00'
|
||||
return Number(value).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
},
|
||||
accountTypeLabel(type) {
|
||||
return { BANK: '银行账户', SECURITIES: '证券账户', PAYMENT: '支付账户', OTHER: '其他' }[type] || type
|
||||
},
|
||||
bankScopeLabel(scope) {
|
||||
return { INTERNAL: '行内', EXTERNAL: '行外' }[scope] || scope
|
||||
},
|
||||
bankScopeTagType(scope) {
|
||||
return scope === 'INTERNAL' ? 'success' : 'warning'
|
||||
},
|
||||
ownerTypeLabel(type) {
|
||||
return { EMPLOYEE: '员工', RELATION: '员工关系人', INTERMEDIARY: '中介', EXTERNAL: '外部人员' }[type] || type
|
||||
},
|
||||
ownerTypeTagType(type) {
|
||||
return { EMPLOYEE: 'success', RELATION: 'info', INTERMEDIARY: 'danger', EXTERNAL: 'warning' }[type] || 'info'
|
||||
},
|
||||
riskTagType(level) {
|
||||
return { LOW: 'success', MEDIUM: 'warning', HIGH: 'danger' }[level] || 'info'
|
||||
},
|
||||
frequencyTagType(level) {
|
||||
return { LOW: 'info', MEDIUM: '', HIGH: 'danger' }[level] || 'info'
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
staffName: '',
|
||||
ownerType: '',
|
||||
bankScope: '',
|
||||
relationType: '',
|
||||
accountName: '',
|
||||
accountType: '',
|
||||
isActualControl: undefined,
|
||||
riskLevel: '',
|
||||
status: undefined
|
||||
}
|
||||
},
|
||||
handlePagination() {},
|
||||
openCreateDialog() {
|
||||
this.dialogMode = 'create'
|
||||
this.form = createEmptyForm()
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEditDialog(row) {
|
||||
this.dialogMode = 'edit'
|
||||
this.form = { ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openDetailDialog(row) {
|
||||
this.dialogMode = 'detail'
|
||||
this.form = { ...row }
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleOwnerTypeChange(value) {
|
||||
if (value !== 'RELATION') {
|
||||
this.form.relationId = undefined
|
||||
this.form.relationType = ''
|
||||
this.form.relationCertNo = ''
|
||||
}
|
||||
if (value === 'EMPLOYEE') {
|
||||
this.form.relationName = ''
|
||||
const staff = this.staffOptions.find(item => item.staffId === this.form.staffId)
|
||||
this.form.accountName = staff ? staff.name : ''
|
||||
this.form.ownerId = staff ? (staff.ownerId || '') : this.form.ownerId
|
||||
}
|
||||
if (value === 'EXTERNAL' || value === 'INTERMEDIARY') this.form.staffId = undefined
|
||||
},
|
||||
handleStaffChange(staffId) {
|
||||
if (this.form.ownerType !== 'EMPLOYEE') return
|
||||
const staff = this.staffOptions.find(item => item.staffId === staffId)
|
||||
this.form.accountName = staff ? staff.name : ''
|
||||
},
|
||||
fillRelationMeta(relationId) {
|
||||
const relation = this.allRelationOptions.find(item => item.id === relationId)
|
||||
if (!relation) return
|
||||
this.form.relationName = relation.relationName
|
||||
this.form.accountName = relation.relationName
|
||||
this.form.relationType = relation.relationType
|
||||
this.form.relationCertNo = relation.relationCertNo
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.account-prototype-page {
|
||||
min-height: calc(100vh - 84px);
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.board {
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid #ebeef5;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.account-table ::v-deep .el-table__header th {
|
||||
background: #f8f8f9;
|
||||
color: #515a6e;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
margin-bottom: 18px;
|
||||
padding: 18px 18px 4px;
|
||||
border-radius: 8px;
|
||||
background: #f9fafb;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.accent-section {
|
||||
background: #f9fafb;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-head span {
|
||||
color: #303133;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.section-head small {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.query-form ::v-deep .el-form-item {
|
||||
display: block;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -283,10 +283,23 @@
|
||||
:visible.sync="detailVisible"
|
||||
append-to-body
|
||||
custom-class="detail-dialog"
|
||||
title="流水详情"
|
||||
width="980px"
|
||||
@close="closeDetailDialog"
|
||||
>
|
||||
<template slot="title">
|
||||
<div class="detail-dialog-title">
|
||||
<span>流水详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="detailLoading || !buildFlowEvidenceFingerprint(detailData)"
|
||||
@click="handleAddEvidence"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div v-loading="detailLoading" class="detail-dialog-body">
|
||||
<div class="detail-overview-grid">
|
||||
<div class="detail-field">
|
||||
@@ -394,6 +407,7 @@ import {
|
||||
getBankStatementOptions,
|
||||
getBankStatementDetail,
|
||||
} from "@/api/ccdiProjectBankStatement";
|
||||
import { buildFlowEvidenceFingerprint, buildFlowEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
|
||||
const TAB_MAP = {
|
||||
all: "all",
|
||||
@@ -518,6 +532,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildFlowEvidenceFingerprint,
|
||||
async getList() {
|
||||
this.syncProjectId();
|
||||
if (!this.queryParams.projectId) {
|
||||
@@ -638,6 +653,29 @@ export default {
|
||||
this.detailLoading = false;
|
||||
this.detailData = createEmptyDetailData();
|
||||
},
|
||||
handleAddEvidence() {
|
||||
const detail = this.detailData || {};
|
||||
const sourceRecordId = buildFlowEvidenceFingerprint(detail);
|
||||
const amountText = this.formatSignedAmount(detail.displayAmount);
|
||||
const counterparty = this.formatCounterpartyName(detail);
|
||||
const hitTagText = Array.isArray(detail.hitTags) && detail.hitTags.length
|
||||
? `,命中${detail.hitTags.map((tag) => tag.ruleName).filter(Boolean).join("、")}标签`
|
||||
: "";
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "FLOW",
|
||||
relatedPersonName: this.resolveFlowRelatedPerson(detail),
|
||||
relatedPersonId: detail.cretNo || "",
|
||||
evidenceTitle: `${this.resolveFlowRelatedPerson(detail)} / ${this.formatField(detail.leAccountNo)}`,
|
||||
evidenceSummary: `${this.formatField(detail.trxDate)},${this.resolveFlowRelatedPerson(detail)}账户与${counterparty}发生交易,金额${amountText}${hitTagText}。`,
|
||||
sourceType: "BANK_STATEMENT",
|
||||
sourceRecordId,
|
||||
sourcePage: "流水详情",
|
||||
snapshotJson: JSON.stringify(buildFlowEvidenceSnapshot(detail)),
|
||||
});
|
||||
},
|
||||
resolveFlowRelatedPerson(detail) {
|
||||
return this.formatField(detail.leAccountName) === "-" ? "关联人员" : this.formatField(detail.leAccountName);
|
||||
},
|
||||
handleExport() {
|
||||
if (this.total === 0) {
|
||||
return;
|
||||
@@ -751,6 +789,26 @@ export default {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.detail-dialog-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.shell-sidebar,
|
||||
.shell-main {
|
||||
border: 1px solid #ebeef5;
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
append-to-body
|
||||
title="确认为证据"
|
||||
width="560px"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form label-position="top" class="evidence-confirm-form">
|
||||
<el-form-item label="证据类型">
|
||||
<el-input :value="typeLabel" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联人员">
|
||||
<el-input :value="payload.relatedPersonName || '-'" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="证据摘要">
|
||||
<el-input
|
||||
:value="payload.evidenceSummary || '-'"
|
||||
readonly
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认理由/备注" required>
|
||||
<el-input
|
||||
v-model.trim="confirmReason"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
placeholder="请填写为什么将该详情确认为证据"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="handleSubmit">
|
||||
确认入库
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveEvidence } from "@/api/ccdiEvidence";
|
||||
|
||||
const TYPE_LABEL_MAP = {
|
||||
FLOW: "流水证据",
|
||||
MODEL: "模型证据",
|
||||
ASSET: "资产证据",
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "EvidenceConfirmDialog",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
payload: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
confirmReason: "",
|
||||
submitting: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible;
|
||||
},
|
||||
set(value) {
|
||||
if (!value) {
|
||||
this.handleClose();
|
||||
}
|
||||
},
|
||||
},
|
||||
typeLabel() {
|
||||
return TYPE_LABEL_MAP[this.payload.evidenceType] || this.payload.evidenceType || "-";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (value) {
|
||||
this.confirmReason = "";
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
if (this.submitting) {
|
||||
return;
|
||||
}
|
||||
this.$emit("update:visible", false);
|
||||
},
|
||||
async handleSubmit() {
|
||||
if (!this.confirmReason) {
|
||||
this.$message.warning("请填写确认理由/备注");
|
||||
return;
|
||||
}
|
||||
this.submitting = true;
|
||||
try {
|
||||
const data = {
|
||||
...this.payload,
|
||||
confirmReason: this.confirmReason,
|
||||
};
|
||||
const response = await saveEvidence(data);
|
||||
this.$message.success("证据入库成功");
|
||||
this.$emit("saved", response.data);
|
||||
this.$emit("update:visible", false);
|
||||
} catch (error) {
|
||||
this.$message.error("证据入库失败");
|
||||
console.error("证据入库失败", error);
|
||||
} finally {
|
||||
this.submitting = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.evidence-confirm-form {
|
||||
:deep(.el-form-item__label) {
|
||||
padding-bottom: 6px;
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="drawerVisible"
|
||||
append-to-body
|
||||
title="证据线索"
|
||||
size="420px"
|
||||
custom-class="evidence-drawer"
|
||||
@open="loadEvidence"
|
||||
>
|
||||
<div class="evidence-drawer-body">
|
||||
<el-input
|
||||
v-model.trim="keyword"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
placeholder="搜索姓名、账号、证据编号"
|
||||
@keyup.enter.native="loadEvidence"
|
||||
@clear="loadEvidence"
|
||||
>
|
||||
<el-button slot="append" @click="loadEvidence">查询</el-button>
|
||||
</el-input>
|
||||
|
||||
<div class="evidence-list" v-loading="loading">
|
||||
<el-empty
|
||||
v-if="!loading && evidenceList.length === 0"
|
||||
:image-size="80"
|
||||
description="暂无证据线索"
|
||||
/>
|
||||
<article
|
||||
v-for="item in evidenceList"
|
||||
:key="item.evidenceId"
|
||||
class="evidence-card"
|
||||
>
|
||||
<div class="evidence-card__header">
|
||||
<span class="evidence-code">EV-{{ formatEvidenceId(item.evidenceId) }} {{ formatType(item.evidenceType) }}</span>
|
||||
<el-tag size="mini" type="danger" effect="plain">确认可疑</el-tag>
|
||||
</div>
|
||||
<div class="evidence-title">{{ item.evidenceTitle }}</div>
|
||||
<div class="evidence-summary">{{ item.evidenceSummary }}</div>
|
||||
<div class="evidence-meta">
|
||||
来源:{{ item.sourcePage || formatSource(item.sourceType) }};确认人:{{ item.confirmBy || "-" }}
|
||||
</div>
|
||||
<div v-if="item.confirmReason" class="evidence-meta">
|
||||
备注:{{ item.confirmReason }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEvidence } from "@/api/ccdiEvidence";
|
||||
|
||||
const TYPE_LABEL_MAP = {
|
||||
FLOW: "流水证据",
|
||||
MODEL: "模型证据",
|
||||
ASSET: "资产证据",
|
||||
};
|
||||
|
||||
const SOURCE_LABEL_MAP = {
|
||||
BANK_STATEMENT: "流水详情",
|
||||
MODEL_DETAIL: "模型详情",
|
||||
ASSET_DETAIL: "资产详情",
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "EvidenceDrawer",
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
projectId: {
|
||||
type: [String, Number],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
keyword: "",
|
||||
loading: false,
|
||||
evidenceList: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
drawerVisible: {
|
||||
get() {
|
||||
return this.visible;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:visible", value);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async loadEvidence() {
|
||||
if (!this.projectId) {
|
||||
this.evidenceList = [];
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
try {
|
||||
const response = await listEvidence({
|
||||
projectId: this.projectId,
|
||||
keyword: this.keyword,
|
||||
});
|
||||
this.evidenceList = response.data || [];
|
||||
} catch (error) {
|
||||
this.evidenceList = [];
|
||||
this.$message.error("加载证据线索失败");
|
||||
console.error("加载证据线索失败", error);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
formatEvidenceId(value) {
|
||||
return String(value || "").padStart(3, "0");
|
||||
},
|
||||
formatType(type) {
|
||||
return TYPE_LABEL_MAP[type] || type || "证据";
|
||||
},
|
||||
formatSource(sourceType) {
|
||||
return SOURCE_LABEL_MAP[sourceType] || sourceType || "-";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.evidence-drawer-body {
|
||||
padding: 0 16px 16px;
|
||||
}
|
||||
|
||||
.evidence-list {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.evidence-card {
|
||||
padding: 14px;
|
||||
margin-bottom: 12px;
|
||||
border: 1px solid #e5eaf2;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.evidence-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-code {
|
||||
color: #2474e8;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.evidence-title {
|
||||
margin-top: 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.evidence-summary {
|
||||
margin-top: 8px;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: #475467;
|
||||
}
|
||||
|
||||
.evidence-meta {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #8a96a8;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
@@ -21,10 +21,24 @@
|
||||
</template>
|
||||
<el-table-column type="expand" width="1">
|
||||
<template slot-scope="scope">
|
||||
<family-asset-liability-detail
|
||||
:detail="detailCache[scope.row.staffIdCard]"
|
||||
:loading="Boolean(detailLoadingMap[scope.row.staffIdCard])"
|
||||
/>
|
||||
<div class="family-detail-wrapper">
|
||||
<div class="family-detail-toolbar">
|
||||
<span class="family-detail-title">资产详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="Boolean(detailLoadingMap[scope.row.staffIdCard]) || !buildAssetEvidenceFingerprint(scope.row)"
|
||||
@click="handleAddEvidence(scope.row)"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
<family-asset-liability-detail
|
||||
:detail="detailCache[scope.row.staffIdCard]"
|
||||
:loading="Boolean(detailLoadingMap[scope.row.staffIdCard])"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
@@ -67,6 +81,7 @@
|
||||
|
||||
<script>
|
||||
import { getFamilyAssetLiabilityDetail } from "@/api/ccdi/projectSpecialCheck";
|
||||
import { buildAssetEvidenceFingerprint, buildAssetEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
import FamilyAssetLiabilityDetail from "./FamilyAssetLiabilityDetail";
|
||||
|
||||
export default {
|
||||
@@ -114,6 +129,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildAssetEvidenceFingerprint,
|
||||
resolveRiskTagType(riskLevelCode) {
|
||||
const riskTagTypeMap = {
|
||||
NORMAL: "success",
|
||||
@@ -164,6 +180,30 @@ export default {
|
||||
this.detailCache = {};
|
||||
this.detailLoadingMap = {};
|
||||
},
|
||||
handleAddEvidence(row) {
|
||||
if (!row || !row.staffIdCard) {
|
||||
return;
|
||||
}
|
||||
const sourceRecordId = buildAssetEvidenceFingerprint(row);
|
||||
if (!sourceRecordId) {
|
||||
this.$message.warning("缺少人员身份证或资产字段,暂不能加入证据库");
|
||||
return;
|
||||
}
|
||||
const detail = this.detailCache[row.staffIdCard] || {};
|
||||
const summary = detail.summary || {};
|
||||
const evidenceSummary = `${row.staffName}家庭资产负债核查:家庭总年收入${this.formatAmount(row.totalIncome)},家庭总负债${this.formatAmount(row.totalDebt)},家庭总资产${this.formatAmount(row.totalAsset)},风险情况${row.riskLevelName || "-" }。`;
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "ASSET",
|
||||
relatedPersonName: row.staffName || "关联人员",
|
||||
relatedPersonId: row.staffIdCard || "",
|
||||
evidenceTitle: `${row.staffName || "关联人员"} / 家庭资产负债核查`,
|
||||
evidenceSummary,
|
||||
sourceType: "ASSET_DETAIL",
|
||||
sourceRecordId,
|
||||
sourcePage: "资产详情",
|
||||
snapshotJson: JSON.stringify(buildAssetEvidenceSnapshot(row, detail, summary)),
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -204,6 +244,39 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.family-detail-wrapper {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.family-detail-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.family-detail-title {
|
||||
margin-right: auto;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.family-table th) {
|
||||
background: #f8fafc;
|
||||
color: #64748b;
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
@selection-change="handleRiskModelSelectionChange"
|
||||
@view-project-analysis="handleRiskModelProjectAnalysis"
|
||||
/>
|
||||
<risk-detail-section :section-data="currentData.riskDetails" />
|
||||
<risk-detail-section
|
||||
:section-data="currentData.riskDetails"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</div>
|
||||
<project-analysis-dialog
|
||||
:visible.sync="projectAnalysisDialogVisible"
|
||||
@@ -43,6 +46,7 @@
|
||||
:model-summary="projectAnalysisModelSummary"
|
||||
:project-name="projectInfo.projectName"
|
||||
@close="handleProjectAnalysisDialogClose"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -75,15 +75,28 @@
|
||||
<div v-else-if='group.groupType === "OBJECT"' class="object-card-grid">
|
||||
<article
|
||||
v-for="(item, index) in group.records || []"
|
||||
:key="`${item.title || index}-object`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || 'object'}-${index}`"
|
||||
class="object-card"
|
||||
>
|
||||
<div class="object-card__title">{{ item.title || "-" }}</div>
|
||||
<div class="object-card__subtitle">{{ item.subtitle || "-" }}</div>
|
||||
<div class="object-card__header">
|
||||
<div>
|
||||
<div class="object-card__title">{{ item.title || "-" }}</div>
|
||||
<div class="object-card__subtitle">{{ item.subtitle || "-" }}</div>
|
||||
</div>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="!buildModelEvidenceFingerprint(resolvePersonIdCard(), item.modelCode)"
|
||||
@click="handleAddModelEvidence(item, group)"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="item.riskTags && item.riskTags.length" class="tag-list">
|
||||
<el-tag
|
||||
v-for="(tag, tagIndex) in item.riskTags"
|
||||
:key="`${item.title || index}-risk-${tagIndex}`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || index}-risk-${tagIndex}`"
|
||||
size="mini"
|
||||
effect="plain"
|
||||
>
|
||||
@@ -97,7 +110,7 @@
|
||||
<p class="object-card__summary">{{ item.summary || "-" }}</p>
|
||||
<div
|
||||
v-for="(field, fieldIndex) in item.extraFields || []"
|
||||
:key="`${item.title || index}-field-${fieldIndex}`"
|
||||
:key="`${resolveGroupKey(group, groupIndex)}-${item.title || index}-field-${fieldIndex}`"
|
||||
class="summary-row"
|
||||
>
|
||||
<span class="summary-row__label">{{ field.label }}</span>
|
||||
@@ -113,6 +126,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { buildModelEvidenceFingerprint, MODEL_EVIDENCE_FINGERPRINT_RULE } from "@/utils/ccdiEvidence";
|
||||
|
||||
export default {
|
||||
name: "ProjectAnalysisAbnormalTab",
|
||||
props: {
|
||||
@@ -122,6 +137,14 @@ export default {
|
||||
groups: [],
|
||||
}),
|
||||
},
|
||||
person: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
projectId: {
|
||||
type: [String, Number],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -150,6 +173,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildModelEvidenceFingerprint,
|
||||
resolveGroupKey(group, index = 0) {
|
||||
return group.groupCode || group.groupName || `BANK_STATEMENT_${index}`;
|
||||
},
|
||||
@@ -170,6 +194,48 @@ export default {
|
||||
const groupKey = this.resolveGroupKey(group);
|
||||
this.$set(this.statementPageMap, groupKey, page);
|
||||
},
|
||||
handleAddModelEvidence(item, group) {
|
||||
const safeItem = item || {};
|
||||
const safeGroup = group || {};
|
||||
const relatedPersonName = this.resolveRelatedPersonName(safeItem);
|
||||
const personIdCard = this.resolvePersonIdCard();
|
||||
const sourceRecordId = buildModelEvidenceFingerprint(personIdCard, safeItem.modelCode);
|
||||
if (!sourceRecordId) {
|
||||
this.$message.warning("缺少人员身份证或模型编码,暂不能加入证据库");
|
||||
return;
|
||||
}
|
||||
const riskTags = Array.isArray(safeItem.riskTags) ? safeItem.riskTags.join("、") : "";
|
||||
const reason = safeItem.reasonDetail || safeItem.summary || "-";
|
||||
const payload = {
|
||||
evidenceType: "MODEL",
|
||||
relatedPersonName,
|
||||
relatedPersonId: personIdCard,
|
||||
evidenceTitle: `${relatedPersonName} / ${safeItem.title || safeGroup.groupName || "模型异常"}`,
|
||||
evidenceSummary: `${safeItem.title || safeGroup.groupName || "模型异常"}:${reason}`,
|
||||
sourceType: "MODEL_DETAIL",
|
||||
sourceRecordId,
|
||||
sourcePage: "模型详情",
|
||||
snapshotJson: JSON.stringify({
|
||||
group: safeGroup,
|
||||
item: safeItem,
|
||||
person: this.person,
|
||||
riskTags,
|
||||
evidenceFingerprint: sourceRecordId,
|
||||
evidenceFingerprintRule: MODEL_EVIDENCE_FINGERPRINT_RULE,
|
||||
}),
|
||||
};
|
||||
this.$emit("evidence-confirm", payload);
|
||||
this.$root.$emit("ccdi-evidence-confirm", payload);
|
||||
},
|
||||
resolvePersonIdCard() {
|
||||
return (this.person && (this.person.idNo || this.person.staffIdCard)) || "";
|
||||
},
|
||||
resolveRelatedPersonName(item) {
|
||||
if (this.person && (this.person.name || this.person.staffName)) {
|
||||
return this.person.name || this.person.staffName;
|
||||
}
|
||||
return item.title || "关联人员";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -252,12 +318,35 @@ export default {
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.object-card__header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.object-card__title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
flex: 0 0 auto;
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.object-card__subtitle {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -46,7 +46,12 @@
|
||||
</el-alert>
|
||||
<el-tabs v-model="activeTab" class="project-analysis-tabs" stretch>
|
||||
<el-tab-pane label="异常明细" name="abnormalDetail">
|
||||
<project-analysis-abnormal-tab :detail-data="dialogData.abnormalDetail" />
|
||||
<project-analysis-abnormal-tab
|
||||
:detail-data="dialogData.abnormalDetail"
|
||||
:person="person"
|
||||
:project-id="projectId"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="资产分析" name="assetAnalysis">
|
||||
<project-analysis-placeholder-tab :tab-data="getTabData('assetAnalysis')" />
|
||||
|
||||
@@ -207,10 +207,23 @@
|
||||
:visible.sync="detailVisible"
|
||||
append-to-body
|
||||
custom-class="detail-dialog"
|
||||
title="流水详情"
|
||||
width="980px"
|
||||
@close="closeDetailDialog"
|
||||
>
|
||||
<template slot="title">
|
||||
<div class="detail-dialog-title">
|
||||
<span>流水详情</span>
|
||||
<el-button
|
||||
class="evidence-corner-btn"
|
||||
size="mini"
|
||||
plain
|
||||
:disabled="detailLoading || !buildFlowEvidenceFingerprint(detailData)"
|
||||
@click="handleAddEvidence"
|
||||
>
|
||||
加入证据库
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div v-loading="detailLoading" class="detail-dialog-body">
|
||||
<div class="detail-overview-grid">
|
||||
<div class="detail-field">
|
||||
@@ -318,6 +331,7 @@ import {
|
||||
getOverviewSuspiciousTransactions,
|
||||
} from "@/api/ccdi/projectOverview";
|
||||
import { getBankStatementDetail } from "@/api/ccdiProjectBankStatement";
|
||||
import { buildFlowEvidenceFingerprint, buildFlowEvidenceSnapshot } from "@/utils/ccdiEvidence";
|
||||
|
||||
const SUSPICIOUS_TYPE_OPTIONS = [
|
||||
{ value: "ALL", label: "全部可疑人员类型" },
|
||||
@@ -428,6 +442,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
buildFlowEvidenceFingerprint,
|
||||
async handleSuspiciousTypeChange(command) {
|
||||
this.currentSuspiciousType = command;
|
||||
this.suspiciousPageNum = 1;
|
||||
@@ -586,6 +601,31 @@ export default {
|
||||
this.detailLoading = false;
|
||||
this.detailData = createEmptyDetailData();
|
||||
},
|
||||
handleAddEvidence() {
|
||||
const detail = this.detailData || {};
|
||||
const sourceRecordId = buildFlowEvidenceFingerprint(detail);
|
||||
const amountText = this.formatSignedAmount(detail.displayAmount);
|
||||
const counterparty = this.formatCounterpartyName(detail);
|
||||
const relatedPersonName = this.resolveFlowRelatedPerson(detail);
|
||||
const hitTagText = Array.isArray(detail.hitTags) && detail.hitTags.length
|
||||
? `,命中${detail.hitTags.map((tag) => tag.ruleName).filter(Boolean).join("、")}标签`
|
||||
: "";
|
||||
this.$emit("evidence-confirm", {
|
||||
evidenceType: "FLOW",
|
||||
relatedPersonName,
|
||||
relatedPersonId: detail.cretNo || "",
|
||||
evidenceTitle: `${relatedPersonName} / ${this.formatField(detail.leAccountNo)}`,
|
||||
evidenceSummary: `${this.formatField(detail.trxDate)},${relatedPersonName}账户与${counterparty}发生交易,金额${amountText}${hitTagText}。`,
|
||||
sourceType: "BANK_STATEMENT",
|
||||
sourceRecordId,
|
||||
sourcePage: "流水详情",
|
||||
snapshotJson: JSON.stringify(buildFlowEvidenceSnapshot(detail)),
|
||||
});
|
||||
},
|
||||
resolveFlowRelatedPerson(detail) {
|
||||
const value = this.formatField(detail.leAccountName);
|
||||
return value === "-" ? "关联人员" : value;
|
||||
},
|
||||
handleRiskDetailExport() {
|
||||
if (!this.projectId) {
|
||||
return;
|
||||
@@ -960,6 +1000,26 @@ export default {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.detail-dialog-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.evidence-corner-btn {
|
||||
padding: 4px 9px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: #2474e8;
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.detail-dialog) {
|
||||
border-radius: 8px;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:project-id="projectId"
|
||||
:title="sectionTitle"
|
||||
:subtitle="sectionSubtitle"
|
||||
@evidence-confirm="$emit('evidence-confirm', $event)"
|
||||
/>
|
||||
|
||||
<section class="graph-placeholder-card">
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<el-button
|
||||
class="evidence-entry-btn"
|
||||
size="mini"
|
||||
plain
|
||||
icon="el-icon-collection-tag"
|
||||
@click="evidenceDrawerVisible = true"
|
||||
>
|
||||
证据线索
|
||||
</el-button>
|
||||
<el-menu
|
||||
:default-active="activeTab"
|
||||
mode="horizontal"
|
||||
@@ -59,6 +68,18 @@
|
||||
@name-selected="handleNameSelected"
|
||||
@generate-report="handleGenerateReport"
|
||||
@fetch-bank-info="handleFetchBankInfo"
|
||||
@evidence-confirm="handleEvidenceConfirm"
|
||||
/>
|
||||
|
||||
<evidence-confirm-dialog
|
||||
:visible.sync="evidenceConfirmVisible"
|
||||
:payload="evidencePayload"
|
||||
@saved="handleEvidenceSaved"
|
||||
/>
|
||||
<evidence-drawer
|
||||
ref="evidenceDrawer"
|
||||
:visible.sync="evidenceDrawerVisible"
|
||||
:project-id="projectId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -69,6 +90,8 @@ import ParamConfig from "./components/detail/ParamConfig";
|
||||
import PreliminaryCheck from "./components/detail/PreliminaryCheck";
|
||||
import SpecialCheck from "./components/detail/SpecialCheck";
|
||||
import DetailQuery from "./components/detail/DetailQuery";
|
||||
import EvidenceConfirmDialog from "./components/detail/EvidenceConfirmDialog";
|
||||
import EvidenceDrawer from "./components/detail/EvidenceDrawer";
|
||||
import { getProject } from "@/api/ccdiProject";
|
||||
|
||||
export default {
|
||||
@@ -79,6 +102,8 @@ export default {
|
||||
PreliminaryCheck,
|
||||
SpecialCheck,
|
||||
DetailQuery,
|
||||
EvidenceConfirmDialog,
|
||||
EvidenceDrawer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -102,6 +127,9 @@ export default {
|
||||
warningThreshold: 60,
|
||||
projectStatus: "0",
|
||||
},
|
||||
evidenceConfirmVisible: false,
|
||||
evidenceDrawerVisible: false,
|
||||
evidencePayload: {},
|
||||
projectStatusPollingTimer: null,
|
||||
projectStatusPollingInterval: 1000,
|
||||
projectStatusPollingLoading: false,
|
||||
@@ -139,8 +167,10 @@ export default {
|
||||
// 初始化页面数据
|
||||
this.initActiveTabFromRoute();
|
||||
this.initPageData();
|
||||
this.$root.$on("ccdi-evidence-confirm", this.handleEvidenceConfirm);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$root.$off("ccdi-evidence-confirm", this.handleEvidenceConfirm);
|
||||
this.stopProjectStatusPolling();
|
||||
},
|
||||
methods: {
|
||||
@@ -400,6 +430,21 @@ export default {
|
||||
handleRefreshProject() {
|
||||
this.initPageData();
|
||||
},
|
||||
handleEvidenceConfirm(payload) {
|
||||
this.evidencePayload = {
|
||||
projectId: this.projectId,
|
||||
...(payload || {}),
|
||||
};
|
||||
this.evidenceConfirmVisible = true;
|
||||
},
|
||||
handleEvidenceSaved() {
|
||||
this.evidenceDrawerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.evidenceDrawer) {
|
||||
this.$refs.evidenceDrawer.loadEvidence();
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导出报告 */
|
||||
handleExport() {
|
||||
console.log("导出报告");
|
||||
@@ -496,6 +541,21 @@ export default {
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.evidence-entry-btn {
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
color: #5b7fb8;
|
||||
border-color: #d6e4f7;
|
||||
background: #f8fbff;
|
||||
|
||||
&:hover {
|
||||
color: var(--ccdi-primary);
|
||||
border-color: #9fc3ff;
|
||||
background: #edf5ff;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
// 移除默认背景色和边框
|
||||
|
||||
@@ -44,6 +44,16 @@
|
||||
<el-option label="放弃" value="放弃" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="招聘类型" prop="recruitType">
|
||||
<el-select v-model="queryParams.recruitType" placeholder="请选择招聘类型" clearable style="width: 240px">
|
||||
<el-option
|
||||
v-for="item in recruitTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -53,6 +63,15 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
@@ -63,6 +82,15 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
>导入</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
@@ -73,6 +101,34 @@
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handleWorkImport"
|
||||
>导入工作经历</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-upload"
|
||||
size="mini"
|
||||
@click="handleWorkImport"
|
||||
v-hasPermi="['ccdi:staffRecruitment:import']"
|
||||
>导入工作经历</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
@@ -100,13 +156,10 @@
|
||||
|
||||
<el-table v-loading="loading" :data="recruitmentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="招聘项目编号" align="center" prop="recruitId" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘项目名称" align="center" prop="recruitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘记录编号" align="center" prop="recruitId" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="招聘项目名称" align="center" prop="recruitName" min-width="220" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位名称" align="center" prop="posName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="候选人姓名" align="center" prop="candName" width="120"/>
|
||||
<el-table-column label="证件号码" align="center" prop="candId" width="180"/>
|
||||
<el-table-column label="毕业院校" align="center" prop="candSchool" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="专业" align="center" prop="candMajor" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="录用情况" align="center" prop="admitStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.admitStatus === '录用'" type="success" size="small">录用</el-tag>
|
||||
@@ -114,14 +167,34 @@
|
||||
<el-tag v-else type="warning" size="small">放弃</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="学历 / 毕业学校" align="center" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
<span>{{ formatEducationSchool(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="招聘类型" align="center" prop="recruitType" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.recruitType === 'SOCIAL' ? 'success' : 'info'" size="small">
|
||||
{{ formatRecruitType(scope.row.recruitType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="历史工作经历" align="center" prop="workExperienceCount" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ formatWorkExperienceCount(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@@ -129,6 +202,14 @@
|
||||
v-hasPermi="['ccdi:staffRecruitment:query']"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@@ -136,6 +217,14 @@
|
||||
v-hasPermi="['ccdi:staffRecruitment:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
v-if="isPreviewMode()"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@@ -157,11 +246,11 @@
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-divider content-position="left">招聘项目信息</el-divider>
|
||||
<el-divider content-position="left">招聘岗位信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="招聘项目编号" prop="recruitId">
|
||||
<el-input v-model="form.recruitId" placeholder="请输入招聘项目编号" maxlength="32" :disabled="!isAdd" />
|
||||
<el-form-item label="招聘记录编号" prop="recruitId">
|
||||
<el-input v-model="form.recruitId" placeholder="请输入招聘记录编号" maxlength="32" :disabled="!isAdd" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -171,7 +260,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">职位信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职位名称" prop="posName">
|
||||
@@ -188,18 +276,43 @@
|
||||
<el-input v-model="form.posDesc" type="textarea" :rows="3" placeholder="请输入职位描述" />
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">候选人信息</el-divider>
|
||||
<el-divider content-position="left">录用情况</el-divider>
|
||||
<el-form-item label="录用情况" prop="admitStatus">
|
||||
<el-radio-group v-model="form.admitStatus">
|
||||
<el-radio label="录用">录用</el-radio>
|
||||
<el-radio label="未录用">未录用</el-radio>
|
||||
<el-radio label="放弃">放弃</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">候选人情况</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="候选人姓名" prop="candName">
|
||||
<el-input v-model="form.candName" placeholder="请输入候选人姓名" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="招聘类型" prop="recruitType">
|
||||
<el-radio-group v-model="form.recruitType">
|
||||
<el-radio
|
||||
v-for="item in recruitTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学历" prop="candEdu">
|
||||
<el-input v-model="form.candEdu" placeholder="请输入学历" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12"></el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
@@ -226,15 +339,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left">录用信息</el-divider>
|
||||
<el-form-item label="录用情况" prop="admitStatus">
|
||||
<el-radio-group v-model="form.admitStatus">
|
||||
<el-radio label="录用">录用</el-radio>
|
||||
<el-radio label="未录用">未录用</el-radio>
|
||||
<el-radio label="放弃">放弃</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left">面试官信息</el-divider>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
@@ -270,30 +374,16 @@
|
||||
<!-- 详情对话框 -->
|
||||
<el-dialog title="招聘信息详情" :visible.sync="detailOpen" width="900px" append-to-body>
|
||||
<div class="detail-container">
|
||||
<el-divider content-position="left">招聘项目信息</el-divider>
|
||||
<el-divider content-position="left">招聘岗位信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="招聘项目编号">{{ recruitmentDetail.recruitId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘记录编号">{{ recruitmentDetail.recruitId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘项目名称">{{ recruitmentDetail.recruitName || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">职位信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="职位名称">{{ recruitmentDetail.posName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职位类别">{{ recruitmentDetail.posCategory || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职位描述" :span="2">{{ recruitmentDetail.posDesc || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">候选人信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="候选人姓名">{{ recruitmentDetail.candName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">{{ recruitmentDetail.candEdu || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ recruitmentDetail.candId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业年月">{{ recruitmentDetail.candGrad || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业院校">{{ recruitmentDetail.candSchool || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业">{{ recruitmentDetail.candMajor || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">录用信息</el-divider>
|
||||
<el-divider content-position="left">录用情况</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="录用情况">
|
||||
<el-tag v-if="recruitmentDetail.admitStatus === '录用'" type="success" size="small">录用</el-tag>
|
||||
@@ -302,18 +392,48 @@
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-divider content-position="left">候选人情况</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="候选人姓名">{{ recruitmentDetail.candName || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="招聘类型">{{ formatRecruitType(recruitmentDetail.recruitType) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">{{ recruitmentDetail.candEdu || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">{{ recruitmentDetail.candId || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业年月">{{ recruitmentDetail.candGrad || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="毕业院校">{{ recruitmentDetail.candSchool || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="专业">{{ recruitmentDetail.candMajor || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-if="isSocialRecruitment(recruitmentDetail)">
|
||||
<el-divider content-position="left">候选人历史工作经历</el-divider>
|
||||
<el-table
|
||||
v-if="recruitmentDetail.workExperienceList && recruitmentDetail.workExperienceList.length"
|
||||
:data="recruitmentDetail.workExperienceList"
|
||||
border
|
||||
>
|
||||
<el-table-column label="序号" align="center" prop="sortOrder" width="80" />
|
||||
<el-table-column label="工作单位" align="center" prop="companyName" min-width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="岗位" align="center" prop="positionName" min-width="140" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="任职时间" align="center" min-width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ getEmploymentPeriod(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离职原因" align="center" prop="departureReason" min-width="220" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<el-empty
|
||||
v-else
|
||||
description="暂无历史工作经历"
|
||||
:image-size="72"
|
||||
class="work-experience-empty"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<el-divider content-position="left">面试官信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="面试官1">{{ recruitmentDetail.interviewerName1 || '-' }} ({{ recruitmentDetail.interviewerId1 || '-' }})</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2">{{ recruitmentDetail.interviewerName2 || '-' }} ({{ recruitmentDetail.interviewerId2 || '-' }})</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">
|
||||
{{ recruitmentDetail.createTime ? parseTime(recruitmentDetail.createTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人">{{ recruitmentDetail.createdBy || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">
|
||||
{{ recruitmentDetail.updateTime ? parseTime(recruitmentDetail.updateTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="更新人">{{ recruitmentDetail.updatedBy || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官1姓名">{{ recruitmentDetail.interviewerName1 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官1工号">{{ recruitmentDetail.interviewerId1 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2姓名">{{ recruitmentDetail.interviewerName2 || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="面试官2工号">{{ recruitmentDetail.interviewerId2 || '-' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -341,7 +461,7 @@
|
||||
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<span>仅允许导入"xls"或"xlsx"格式文件。</span>
|
||||
<span>{{ upload.tip }}</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -374,11 +494,33 @@
|
||||
/>
|
||||
|
||||
<el-table :data="failureList" v-loading="failureLoading">
|
||||
<el-table-column label="招聘项目编号" prop="recruitId" align="center" width="150" />
|
||||
<el-table-column label="招聘记录编号" prop="recruitId" align="center" width="150" />
|
||||
<el-table-column label="招聘项目名称" prop="recruitName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位名称" prop="posName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="候选人姓名" prop="candName" align="center" width="120"/>
|
||||
<el-table-column label="证件号码" prop="candId" align="center" width="180"/>
|
||||
<el-table-column
|
||||
v-if="currentImportType !== 'work'"
|
||||
label="证件号码"
|
||||
prop="candId"
|
||||
align="center"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="currentImportType === 'work'"
|
||||
label="工作单位"
|
||||
prop="companyName"
|
||||
align="center"
|
||||
min-width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="currentImportType === 'work'"
|
||||
label="岗位"
|
||||
prop="positionName"
|
||||
align="center"
|
||||
min-width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="失败原因" prop="errorMessage" align="center" min-width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
@@ -416,6 +558,109 @@ import ImportResultDialog from "@/components/ImportResultDialog.vue";
|
||||
const idCardPattern = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/;
|
||||
// 毕业年月校验正则 (YYYYMM)
|
||||
const gradPattern = /^((19|20)\d{2})(0[1-9]|1[0-2])$/;
|
||||
const previewRecruitmentList = [
|
||||
{
|
||||
recruitId: "RC2025001205",
|
||||
recruitName: "2024年社会招聘-技术部",
|
||||
posName: "Java开发工程师",
|
||||
posCategory: "技术研发",
|
||||
posDesc: "负责核心业务系统设计、开发与维护。",
|
||||
candName: "杨丽思思",
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: "本科",
|
||||
candId: "330101199403150021",
|
||||
candSchool: "四川大学",
|
||||
candMajor: "法学",
|
||||
candGrad: "202110",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 2,
|
||||
interviewerName1: "陈志远",
|
||||
interviewerId1: "I0001",
|
||||
interviewerName2: "王晨",
|
||||
interviewerId2: "I0002",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:00:00",
|
||||
updateTime: "2026-04-15 09:20:00",
|
||||
workExperienceList: [
|
||||
{
|
||||
sortOrder: 1,
|
||||
companyName: "杭州数联科技有限公司",
|
||||
positionName: "Java开发工程师",
|
||||
jobStartMonth: "2022-07",
|
||||
jobEndMonth: "2024-12",
|
||||
departureReason: "个人职业发展需要,期望参与更大规模系统建设"
|
||||
},
|
||||
{
|
||||
sortOrder: 2,
|
||||
companyName: "成都云启信息技术有限公司",
|
||||
positionName: "初级开发工程师",
|
||||
jobStartMonth: "2021-07",
|
||||
jobEndMonth: "2022-06",
|
||||
departureReason: "项目阶段结束后选择新的发展机会"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
recruitId: "RC2025001206",
|
||||
recruitName: "2024年社会招聘-技术部",
|
||||
posName: "数据分析师",
|
||||
posCategory: "数据分析",
|
||||
posDesc: "负责经营分析、指标体系建设与专题分析。",
|
||||
candName: "罗军晓东",
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: "本科",
|
||||
candId: "420106199603120018",
|
||||
candSchool: "华中科技大学",
|
||||
candMajor: "软件工程",
|
||||
candGrad: "202003",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 1,
|
||||
interviewerName1: "李倩",
|
||||
interviewerId1: "I0003",
|
||||
interviewerName2: "周腾",
|
||||
interviewerId2: "I0004",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:05:00",
|
||||
updateTime: "2026-04-15 09:25:00",
|
||||
workExperienceList: [
|
||||
{
|
||||
sortOrder: 1,
|
||||
companyName: "上海明策数据服务有限公司",
|
||||
positionName: "数据分析师",
|
||||
jobStartMonth: "2021-03",
|
||||
jobEndMonth: "2025-01",
|
||||
departureReason: "期望转向更深入的数据建模分析工作"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
recruitId: "RC2025001003",
|
||||
recruitName: "2024年春季校园招聘",
|
||||
posName: "Java开发工程师",
|
||||
posCategory: "技术研发",
|
||||
posDesc: "参与项目需求开发与系统维护。",
|
||||
candName: "黄伟梓萱",
|
||||
recruitType: "CAMPUS",
|
||||
candEdu: "本科",
|
||||
candId: "440105200001018888",
|
||||
candSchool: "中山大学",
|
||||
candMajor: "建筑学",
|
||||
candGrad: "202108",
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 0,
|
||||
interviewerName1: "陈志远",
|
||||
interviewerId1: "I0001",
|
||||
interviewerName2: "王晨",
|
||||
interviewerId2: "I0002",
|
||||
createdBy: "admin",
|
||||
updatedBy: "admin",
|
||||
createTime: "2026-04-15 09:10:00",
|
||||
updateTime: "2026-04-15 09:30:00",
|
||||
workExperienceList: []
|
||||
}
|
||||
];
|
||||
|
||||
export default {
|
||||
name: "StaffRecruitment",
|
||||
@@ -436,6 +681,10 @@ export default {
|
||||
total: 0,
|
||||
// 招聘信息表格数据
|
||||
recruitmentList: [],
|
||||
recruitTypeOptions: [
|
||||
{ value: "SOCIAL", label: "社招" },
|
||||
{ value: "CAMPUS", label: "校招" }
|
||||
],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -455,6 +704,7 @@ export default {
|
||||
candName: null,
|
||||
candId: null,
|
||||
admitStatus: null,
|
||||
recruitType: null,
|
||||
interviewerName: null,
|
||||
interviewerId: null
|
||||
},
|
||||
@@ -463,8 +713,8 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
recruitId: [
|
||||
{ required: true, message: "招聘项目编号不能为空", trigger: "blur" },
|
||||
{ max: 32, message: "招聘项目编号长度不能超过32个字符", trigger: "blur" }
|
||||
{ required: true, message: "招聘记录编号不能为空", trigger: "blur" },
|
||||
{ max: 32, message: "招聘记录编号长度不能超过32个字符", trigger: "blur" }
|
||||
],
|
||||
recruitName: [
|
||||
{ required: true, message: "招聘项目名称不能为空", trigger: "blur" },
|
||||
@@ -485,6 +735,9 @@ export default {
|
||||
{ required: true, message: "候选人姓名不能为空", trigger: "blur" },
|
||||
{ max: 20, message: "候选人姓名长度不能超过20个字符", trigger: "blur" }
|
||||
],
|
||||
recruitType: [
|
||||
{ required: true, message: "招聘类型不能为空", trigger: "change" }
|
||||
],
|
||||
candEdu: [
|
||||
{ required: true, message: "学历不能为空", trigger: "blur" },
|
||||
{ max: 20, message: "学历长度不能超过20个字符", trigger: "blur" }
|
||||
@@ -515,6 +768,10 @@ export default {
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 导入类型
|
||||
importType: "recruitment",
|
||||
// 弹窗提示
|
||||
tip: "仅允许导入\"xls\"或\"xlsx\"格式文件。",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
@@ -531,6 +788,8 @@ export default {
|
||||
showFailureButton: false,
|
||||
// 当前导入任务ID
|
||||
currentTaskId: null,
|
||||
// 当前导入类型
|
||||
currentImportType: "recruitment",
|
||||
// 失败记录对话框
|
||||
failureDialogVisible: false,
|
||||
failureList: [],
|
||||
@@ -549,12 +808,16 @@ export default {
|
||||
lastImportInfo() {
|
||||
const savedTask = this.getImportTaskFromStorage();
|
||||
if (savedTask && savedTask.totalCount) {
|
||||
return `导入时间: ${this.parseTime(savedTask.saveTime)} | 总数: ${savedTask.totalCount}条 | 成功: ${savedTask.successCount}条 | 失败: ${savedTask.failureCount}条`;
|
||||
return `导入类型: ${this.getImportTypeLabel(savedTask.importType || 'recruitment')} | 导入时间: ${this.parseTime(savedTask.saveTime)} | 总数: ${savedTask.totalCount}条 | 成功: ${savedTask.successCount}条 | 失败: ${savedTask.failureCount}条`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.loadPreviewPage();
|
||||
return;
|
||||
}
|
||||
this.getList();
|
||||
this.restoreImportState(); // 恢复导入状态
|
||||
},
|
||||
@@ -568,6 +831,10 @@ export default {
|
||||
methods: {
|
||||
/** 查询招聘信息列表 */
|
||||
getList() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.loadPreviewList();
|
||||
return;
|
||||
}
|
||||
this.loading = true;
|
||||
listStaffRecruitment(this.queryParams).then(response => {
|
||||
this.recruitmentList = response.rows;
|
||||
@@ -589,12 +856,15 @@ export default {
|
||||
posCategory: null,
|
||||
posDesc: null,
|
||||
candName: null,
|
||||
recruitType: "SOCIAL",
|
||||
candEdu: null,
|
||||
candId: null,
|
||||
candSchool: null,
|
||||
candMajor: null,
|
||||
candGrad: null,
|
||||
admitStatus: "录用",
|
||||
workExperienceCount: 0,
|
||||
workExperienceList: [],
|
||||
interviewerName1: null,
|
||||
interviewerId1: null,
|
||||
interviewerName2: null,
|
||||
@@ -629,8 +899,26 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recruitId = row.recruitId || this.ids[0];
|
||||
if (this.isPreviewMode()) {
|
||||
const target = this.findPreviewRecruitment(recruitId);
|
||||
if (target) {
|
||||
this.form = {
|
||||
...this.form,
|
||||
...target,
|
||||
workExperienceList: this.normalizeWorkExperienceList(target.workExperienceList)
|
||||
};
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改招聘信息";
|
||||
this.isAdd = false;
|
||||
return;
|
||||
}
|
||||
getStaffRecruitment(recruitId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form = {
|
||||
...this.form,
|
||||
...response.data,
|
||||
workExperienceList: this.normalizeWorkExperienceList(response.data && response.data.workExperienceList)
|
||||
};
|
||||
this.open = true;
|
||||
this.title = "修改招聘信息";
|
||||
this.isAdd = false;
|
||||
@@ -639,15 +927,114 @@ export default {
|
||||
/** 详情按钮操作 */
|
||||
handleDetail(row) {
|
||||
const recruitId = row.recruitId;
|
||||
if (this.isPreviewMode()) {
|
||||
const target = this.findPreviewRecruitment(recruitId);
|
||||
if (target) {
|
||||
this.recruitmentDetail = {
|
||||
...target,
|
||||
workExperienceList: this.normalizeWorkExperienceList(target.workExperienceList)
|
||||
};
|
||||
this.detailOpen = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
getStaffRecruitment(recruitId).then(response => {
|
||||
this.recruitmentDetail = response.data;
|
||||
this.recruitmentDetail = {
|
||||
...response.data,
|
||||
workExperienceList: this.normalizeWorkExperienceList(response.data && response.data.workExperienceList)
|
||||
};
|
||||
this.detailOpen = true;
|
||||
});
|
||||
},
|
||||
/** 招聘类型格式化 */
|
||||
formatRecruitType(value) {
|
||||
const matched = this.recruitTypeOptions.find(item => item.value === value);
|
||||
return matched ? matched.label : "-";
|
||||
},
|
||||
/** 学历与毕业学校格式化 */
|
||||
formatEducationSchool(row) {
|
||||
if (!row) {
|
||||
return "-";
|
||||
}
|
||||
const edu = row.candEdu || "-";
|
||||
const school = row.candSchool || "-";
|
||||
return `${edu} / ${school}`;
|
||||
},
|
||||
/** 历史工作经历展示 */
|
||||
formatWorkExperienceCount(row) {
|
||||
if (!row || row.recruitType !== "SOCIAL") {
|
||||
return "-";
|
||||
}
|
||||
const count = Number(row.workExperienceCount || 0);
|
||||
return `${count}段`;
|
||||
},
|
||||
/** 是否为社招 */
|
||||
isSocialRecruitment(row) {
|
||||
return row && row.recruitType === "SOCIAL";
|
||||
},
|
||||
/** 任职时间展示 */
|
||||
getEmploymentPeriod(row) {
|
||||
if (!row) {
|
||||
return "-";
|
||||
}
|
||||
const start = row.jobStartMonth || "-";
|
||||
const end = row.jobEndMonth || "至今";
|
||||
return `${start} ~ ${end}`;
|
||||
},
|
||||
/** 工作经历列表归一化 */
|
||||
normalizeWorkExperienceList(list) {
|
||||
if (!Array.isArray(list)) {
|
||||
return [];
|
||||
}
|
||||
return list.slice().sort((a, b) => {
|
||||
const first = Number(a.sortOrder || 0);
|
||||
const second = Number(b.sortOrder || 0);
|
||||
return first - second;
|
||||
});
|
||||
},
|
||||
/** 是否为预览模式 */
|
||||
isPreviewMode() {
|
||||
return this.$route && this.$route.query && this.$route.query.preview === "1";
|
||||
},
|
||||
/** 加载预览页面 */
|
||||
loadPreviewPage() {
|
||||
this.loadPreviewList();
|
||||
const mode = this.$route.query.mode;
|
||||
const recruitId = this.$route.query.recruitId || "RC2025001205";
|
||||
if (mode === "detail") {
|
||||
this.handleDetail({ recruitId });
|
||||
} else if (mode === "edit") {
|
||||
this.handleUpdate({ recruitId });
|
||||
} else if (mode === "workImport") {
|
||||
this.handleWorkImport();
|
||||
} else if (mode === "import") {
|
||||
this.handleImport();
|
||||
} else if (mode === "add") {
|
||||
this.handleAdd();
|
||||
}
|
||||
},
|
||||
/** 加载预览列表 */
|
||||
loadPreviewList() {
|
||||
this.loading = false;
|
||||
this.recruitmentList = previewRecruitmentList.map(item => ({
|
||||
...item,
|
||||
workExperienceList: this.normalizeWorkExperienceList(item.workExperienceList)
|
||||
}));
|
||||
this.total = this.recruitmentList.length;
|
||||
},
|
||||
/** 查找预览记录 */
|
||||
findPreviewRecruitment(recruitId) {
|
||||
return previewRecruitmentList.find(item => item.recruitId === recruitId) || null;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(this.isAdd ? "预览模式:新增成功" : "预览模式:修改成功");
|
||||
this.open = false;
|
||||
return;
|
||||
}
|
||||
if (this.isAdd) {
|
||||
addStaffRecruitment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
@@ -667,6 +1054,10 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recruitIds = row.recruitId || this.ids;
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(`预览模式:已模拟删除 ${recruitIds}`);
|
||||
return;
|
||||
}
|
||||
this.$modal.confirm('是否确认删除招聘信息编号为"' + recruitIds + '"的数据项?').then(function() {
|
||||
return delStaffRecruitment(recruitIds);
|
||||
}).then(() => {
|
||||
@@ -682,11 +1073,36 @@ export default {
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "招聘信息数据导入";
|
||||
this.openImportDialog("recruitment");
|
||||
},
|
||||
/** 导入工作经历按钮操作 */
|
||||
handleWorkImport() {
|
||||
this.openImportDialog("work");
|
||||
},
|
||||
/** 打开导入弹窗 */
|
||||
openImportDialog(importType) {
|
||||
const isWorkImport = importType === "work";
|
||||
this.upload.importType = importType;
|
||||
this.currentImportType = importType;
|
||||
this.upload.title = isWorkImport ? "历史工作经历数据导入" : "招聘信息数据导入";
|
||||
this.upload.url = process.env.VUE_APP_BASE_API + (isWorkImport
|
||||
? "/ccdi/staffRecruitment/importWorkData"
|
||||
: "/ccdi/staffRecruitment/importData");
|
||||
this.upload.tip = isWorkImport
|
||||
? "仅允许导入\"xls\"或\"xlsx\"格式文件;招聘记录编号用于匹配,姓名/项目/职位用于校验。"
|
||||
: "仅允许导入\"xls\"或\"xlsx\"格式文件。";
|
||||
if (this.isPreviewMode()) {
|
||||
this.upload.open = true;
|
||||
return;
|
||||
}
|
||||
this.upload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
if (this.upload.importType === "work") {
|
||||
this.download('ccdi/staffRecruitment/workImportTemplate', {}, `历史工作经历导入模板_${new Date().getTime()}.xlsx`);
|
||||
return;
|
||||
}
|
||||
this.download('ccdi/staffRecruitment/importTemplate', {}, `招聘信息导入模板_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
// 文件上传中处理
|
||||
@@ -722,17 +1138,19 @@ export default {
|
||||
taskId: taskId,
|
||||
status: 'PROCESSING',
|
||||
timestamp: Date.now(),
|
||||
hasFailures: false
|
||||
hasFailures: false,
|
||||
importType: this.upload.importType
|
||||
});
|
||||
|
||||
// 重置状态
|
||||
this.showFailureButton = false;
|
||||
this.currentTaskId = taskId;
|
||||
this.currentImportType = this.upload.importType;
|
||||
|
||||
// 显示后台处理提示
|
||||
this.$notify({
|
||||
title: '导入任务已提交',
|
||||
message: '正在后台处理中,处理完成后将通知您',
|
||||
message: `${this.getImportTypeLabel(this.upload.importType)}正在后台处理中,处理完成后将通知您`,
|
||||
type: 'info',
|
||||
duration: 3000
|
||||
});
|
||||
@@ -780,14 +1198,15 @@ export default {
|
||||
hasFailures: statusResult.failureCount > 0,
|
||||
totalCount: statusResult.totalCount,
|
||||
successCount: statusResult.successCount,
|
||||
failureCount: statusResult.failureCount
|
||||
failureCount: statusResult.failureCount,
|
||||
importType: this.currentImportType
|
||||
});
|
||||
|
||||
if (statusResult.status === 'SUCCESS') {
|
||||
// 全部成功
|
||||
this.$notify({
|
||||
title: '导入完成',
|
||||
message: `全部成功!共导入${statusResult.totalCount}条数据`,
|
||||
message: `${this.getImportTypeLabel(this.currentImportType)}全部成功!共导入${statusResult.totalCount}条数据`,
|
||||
type: 'success',
|
||||
duration: 5000
|
||||
});
|
||||
@@ -797,7 +1216,7 @@ export default {
|
||||
// 部分失败
|
||||
this.$notify({
|
||||
title: '导入完成',
|
||||
message: `成功${statusResult.successCount}条,失败${statusResult.failureCount}条`,
|
||||
message: `${this.getImportTypeLabel(this.currentImportType)}成功${statusResult.successCount}条,失败${statusResult.failureCount}条`,
|
||||
type: 'warning',
|
||||
duration: 5000
|
||||
});
|
||||
@@ -866,6 +1285,7 @@ export default {
|
||||
// 如果有失败记录,恢复按钮显示
|
||||
if (savedTask.hasFailures && savedTask.taskId) {
|
||||
this.currentTaskId = savedTask.taskId;
|
||||
this.currentImportType = savedTask.importType || "recruitment";
|
||||
this.showFailureButton = true;
|
||||
}
|
||||
},
|
||||
@@ -875,7 +1295,7 @@ export default {
|
||||
if (savedTask && savedTask.saveTime) {
|
||||
const date = new Date(savedTask.saveTime);
|
||||
const timeStr = this.parseTime(date, '{y}-{m}-{d} {h}:{i}');
|
||||
return `上次导入: ${timeStr}`;
|
||||
return `上次${this.getImportTypeLabel(savedTask.importType || 'recruitment')}: ${timeStr}`;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@@ -954,12 +1374,21 @@ export default {
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
if (this.isPreviewMode()) {
|
||||
this.$modal.msgSuccess(`预览模式:已模拟提交${this.getImportTypeLabel(this.upload.importType)}`);
|
||||
this.upload.open = false;
|
||||
return;
|
||||
}
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 关闭导入对话框
|
||||
handleImportDialogClose() {
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
},
|
||||
/** 导入类型展示 */
|
||||
getImportTypeLabel(importType) {
|
||||
return importType === "work" ? "历史工作经历导入" : "招聘信息导入";
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -973,4 +1402,8 @@ export default {
|
||||
.el-divider {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.work-experience-empty {
|
||||
padding: 24px 0 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -36,8 +36,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: baseUrl,
|
||||
target: "http://116.62.17.81:62318",
|
||||
target: baseUrl,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
145
sql/migration/2026-04-10-split-ccdi-account-info.sql
Normal file
145
sql/migration/2026-04-10-split-ccdi-account-info.sql
Normal file
@@ -0,0 +1,145 @@
|
||||
-- 拆分账户信息表:账户基础信息保留在 ccdi_account_info,动态交易画像迁移到 ccdi_account_result。
|
||||
-- 执行说明:涉及中文内容时请使用 bin/mysql_utf8_exec.sh 执行,确保会话字符集为 utf8mb4。
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ccdi_account_result` (
|
||||
`result_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键,唯一标识',
|
||||
`account_no` VARCHAR(240) NOT NULL COMMENT '账户号码(加密存储)',
|
||||
`is_self_account` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否本人实控账户:0-否 1-是',
|
||||
`monthly_avg_trans_count` INT DEFAULT 0 COMMENT '近6个月平均交易笔数',
|
||||
`monthly_avg_trans_amount` DECIMAL(18,2) DEFAULT 0.00 COMMENT '近6个月平均交易金额',
|
||||
`trans_freq_type` VARCHAR(20) DEFAULT 'MEDIUM' COMMENT 'LOW:低频, MEDIUM:中频, HIGH:高频',
|
||||
`dr_max_single_amount` DECIMAL(18,2) COMMENT '借方单笔交易最高额',
|
||||
`cr_max_single_amount` DECIMAL(18,2) COMMENT '贷方单笔交易最高额',
|
||||
`dr_max_daily_amount` DECIMAL(18,2) COMMENT '借方日累计交易最高额',
|
||||
`cr_max_daily_amount` DECIMAL(18,2) COMMENT '贷方日累计交易最高额',
|
||||
`trans_risk_level` VARCHAR(10) DEFAULT 'LOW' COMMENT '交易风险等级',
|
||||
`create_by` VARCHAR(64) DEFAULT NULL COMMENT '创建者',
|
||||
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` VARCHAR(64) DEFAULT NULL COMMENT '更新者',
|
||||
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`result_id`),
|
||||
UNIQUE KEY `uk_ccdi_account_result_account_no` (`account_no`),
|
||||
KEY `idx_ccdi_account_result_risk_level` (`trans_risk_level`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='账户结果表';
|
||||
|
||||
DELIMITER //
|
||||
|
||||
DROP PROCEDURE IF EXISTS `migrate_ccdi_account_info_split`//
|
||||
CREATE PROCEDURE `migrate_ccdi_account_info_split`()
|
||||
BEGIN
|
||||
DECLARE dynamic_column_count INT DEFAULT 0;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO dynamic_column_count
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'ccdi_account_info'
|
||||
AND COLUMN_NAME IN (
|
||||
'is_self_account',
|
||||
'monthly_avg_trans_count',
|
||||
'monthly_avg_trans_amount',
|
||||
'trans_freq_type',
|
||||
'dr_max_single_amount',
|
||||
'cr_max_single_amount',
|
||||
'dr_max_daily_amount',
|
||||
'cr_max_daily_amount',
|
||||
'trans_risk_level'
|
||||
);
|
||||
|
||||
IF dynamic_column_count = 9 THEN
|
||||
INSERT INTO `ccdi_account_result` (
|
||||
`account_no`,
|
||||
`is_self_account`,
|
||||
`monthly_avg_trans_count`,
|
||||
`monthly_avg_trans_amount`,
|
||||
`trans_freq_type`,
|
||||
`dr_max_single_amount`,
|
||||
`cr_max_single_amount`,
|
||||
`dr_max_daily_amount`,
|
||||
`cr_max_daily_amount`,
|
||||
`trans_risk_level`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_by`,
|
||||
`update_time`
|
||||
)
|
||||
SELECT
|
||||
`account_no`,
|
||||
COALESCE(`is_self_account`, 1),
|
||||
COALESCE(CAST(`monthly_avg_trans_count` AS SIGNED), 0),
|
||||
COALESCE(`monthly_avg_trans_amount`, 0.00),
|
||||
COALESCE(`trans_freq_type`, 'MEDIUM'),
|
||||
`dr_max_single_amount`,
|
||||
`cr_max_single_amount`,
|
||||
`dr_max_daily_amount`,
|
||||
`cr_max_daily_amount`,
|
||||
COALESCE(`trans_risk_level`, 'LOW'),
|
||||
`create_by`,
|
||||
COALESCE(`create_time`, CURRENT_TIMESTAMP),
|
||||
`update_by`,
|
||||
COALESCE(`update_time`, CURRENT_TIMESTAMP)
|
||||
FROM `ccdi_account_info`
|
||||
ON DUPLICATE KEY UPDATE
|
||||
`is_self_account` = VALUES(`is_self_account`),
|
||||
`monthly_avg_trans_count` = VALUES(`monthly_avg_trans_count`),
|
||||
`monthly_avg_trans_amount` = VALUES(`monthly_avg_trans_amount`),
|
||||
`trans_freq_type` = VALUES(`trans_freq_type`),
|
||||
`dr_max_single_amount` = VALUES(`dr_max_single_amount`),
|
||||
`cr_max_single_amount` = VALUES(`cr_max_single_amount`),
|
||||
`dr_max_daily_amount` = VALUES(`dr_max_daily_amount`),
|
||||
`cr_max_daily_amount` = VALUES(`cr_max_daily_amount`),
|
||||
`trans_risk_level` = VALUES(`trans_risk_level`),
|
||||
`update_by` = VALUES(`update_by`),
|
||||
`update_time` = VALUES(`update_time`);
|
||||
|
||||
ALTER TABLE `ccdi_account_info`
|
||||
DROP COLUMN `is_self_account`,
|
||||
DROP COLUMN `monthly_avg_trans_count`,
|
||||
DROP COLUMN `monthly_avg_trans_amount`,
|
||||
DROP COLUMN `trans_freq_type`,
|
||||
DROP COLUMN `dr_max_single_amount`,
|
||||
DROP COLUMN `cr_max_single_amount`,
|
||||
DROP COLUMN `dr_max_daily_amount`,
|
||||
DROP COLUMN `cr_max_daily_amount`,
|
||||
DROP COLUMN `trans_risk_level`;
|
||||
ELSEIF dynamic_column_count <> 0 THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'ccdi_account_info dynamic columns are partially migrated; please check schema before running this migration.';
|
||||
END IF;
|
||||
END//
|
||||
|
||||
CALL `migrate_ccdi_account_info_split`()//
|
||||
DROP PROCEDURE IF EXISTS `migrate_ccdi_account_info_split`//
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
DELIMITER //
|
||||
|
||||
DROP PROCEDURE IF EXISTS `add_ccdi_account_info_bank_scope`//
|
||||
CREATE PROCEDURE `add_ccdi_account_info_bank_scope`()
|
||||
BEGIN
|
||||
DECLARE column_count INT DEFAULT 0;
|
||||
|
||||
SELECT COUNT(*)
|
||||
INTO column_count
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'ccdi_account_info'
|
||||
AND COLUMN_NAME = 'bank_scope';
|
||||
|
||||
IF column_count = 0 THEN
|
||||
ALTER TABLE `ccdi_account_info`
|
||||
ADD COLUMN `bank_scope` VARCHAR(20) NOT NULL DEFAULT 'INTERNAL' COMMENT '账户范围:INTERNAL-行内,EXTERNAL-行外'
|
||||
AFTER `account_type`;
|
||||
END IF;
|
||||
|
||||
UPDATE `ccdi_account_info`
|
||||
SET `bank_scope` = 'INTERNAL'
|
||||
WHERE `bank_scope` IS NULL
|
||||
OR `bank_scope` = '';
|
||||
END//
|
||||
|
||||
CALL `add_ccdi_account_info_bank_scope`()//
|
||||
DROP PROCEDURE IF EXISTS `add_ccdi_account_info_bank_scope`//
|
||||
|
||||
DELIMITER ;
|
||||
381
sql/migration/2026-04-13-add-ccdi-account-info-menu.sql
Normal file
381
sql/migration/2026-04-13-add-ccdi-account-info-menu.sql
Normal file
@@ -0,0 +1,381 @@
|
||||
-- 账户库管理菜单
|
||||
-- 挂载到“信息维护”目录下,可重复执行
|
||||
|
||||
SET @parent_menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE menu_name = '信息维护'
|
||||
AND parent_id = 0
|
||||
LIMIT 1
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
)
|
||||
SELECT
|
||||
'账户库管理',
|
||||
@parent_menu_id,
|
||||
11,
|
||||
'accountInfo',
|
||||
'ccdiAccountInfo/index',
|
||||
1,
|
||||
0,
|
||||
'C',
|
||||
'0',
|
||||
'0',
|
||||
'ccdi:accountInfo:list',
|
||||
'documentation',
|
||||
'admin',
|
||||
NOW(),
|
||||
'',
|
||||
NULL,
|
||||
'账户库管理菜单'
|
||||
FROM dual
|
||||
WHERE @parent_menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @parent_menu_id
|
||||
AND path = 'accountInfo'
|
||||
);
|
||||
|
||||
SET @menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @parent_menu_id
|
||||
AND path = 'accountInfo'
|
||||
LIMIT 1
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户查询', @menu_id, 1, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:query', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:query'
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户新增', @menu_id, 2, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:add', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:add'
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户修改', @menu_id, 3, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:edit', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:edit'
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户删除', @menu_id, 4, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:remove', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:remove'
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户导入', @menu_id, 5, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:import', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:import'
|
||||
);
|
||||
|
||||
INSERT INTO sys_menu (
|
||||
menu_name,
|
||||
parent_id,
|
||||
order_num,
|
||||
path,
|
||||
component,
|
||||
is_frame,
|
||||
is_cache,
|
||||
menu_type,
|
||||
visible,
|
||||
status,
|
||||
perms,
|
||||
icon,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
)
|
||||
SELECT '账户导出', @menu_id, 6, '', '', 1, 0, 'F', '0', '0', 'ccdi:accountInfo:export', '#', 'admin', NOW(), ''
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:export'
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1, @menu_id
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = @menu_id
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:query'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:query'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:import'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:import'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:export'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:export'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:add'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:add'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:edit'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:edit'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT 1,
|
||||
(
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:remove'
|
||||
LIMIT 1
|
||||
)
|
||||
FROM dual
|
||||
WHERE @menu_id IS NOT NULL
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM sys_role_menu
|
||||
WHERE role_id = 1
|
||||
AND menu_id = (
|
||||
SELECT menu_id
|
||||
FROM sys_menu
|
||||
WHERE parent_id = @menu_id
|
||||
AND perms = 'ccdi:accountInfo:remove'
|
||||
LIMIT 1
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
UPDATE ccdi_account_info
|
||||
SET
|
||||
account_name = '测试员工A行外卡',
|
||||
bank = '杭州联合银行城东支行',
|
||||
update_by = 'system'
|
||||
WHERE account_no = '622202440000010001';
|
||||
@@ -0,0 +1,274 @@
|
||||
-- Seed account test data for external scenarios.
|
||||
-- Covers EMPLOYEE / RELATION / INTERMEDIARY / EXTERNAL owner types.
|
||||
|
||||
INSERT INTO ccdi_account_info (
|
||||
account_no,
|
||||
account_type,
|
||||
bank_scope,
|
||||
account_name,
|
||||
owner_type,
|
||||
owner_id,
|
||||
bank,
|
||||
bank_code,
|
||||
currency,
|
||||
status,
|
||||
effective_date,
|
||||
invalid_date,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'622202440000010001',
|
||||
'BANK',
|
||||
'EXTERNAL',
|
||||
'测试员工A行外卡',
|
||||
'EMPLOYEE',
|
||||
'330101199001010001',
|
||||
'杭州联合银行城东支行',
|
||||
'HZLH001',
|
||||
'CNY',
|
||||
1,
|
||||
'2026-04-13',
|
||||
NULL,
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_info WHERE account_no = '622202440000010001'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_result (
|
||||
account_no,
|
||||
is_self_account,
|
||||
monthly_avg_trans_count,
|
||||
monthly_avg_trans_amount,
|
||||
trans_freq_type,
|
||||
dr_max_single_amount,
|
||||
cr_max_single_amount,
|
||||
dr_max_daily_amount,
|
||||
cr_max_daily_amount,
|
||||
trans_risk_level,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'622202440000010001',
|
||||
1,
|
||||
12,
|
||||
28600.00,
|
||||
'MEDIUM',
|
||||
8800.00,
|
||||
12000.00,
|
||||
16000.00,
|
||||
22000.00,
|
||||
'MEDIUM',
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_result WHERE account_no = '622202440000010001'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_info (
|
||||
account_no,
|
||||
account_type,
|
||||
bank_scope,
|
||||
account_name,
|
||||
owner_type,
|
||||
owner_id,
|
||||
bank,
|
||||
bank_code,
|
||||
currency,
|
||||
status,
|
||||
effective_date,
|
||||
invalid_date,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'ZQ330101199104010101',
|
||||
'SECURITIES',
|
||||
'EXTERNAL',
|
||||
'边界配偶甲',
|
||||
'RELATION',
|
||||
'330101199104010101',
|
||||
'国泰君安杭州营业部',
|
||||
'GTJAHZ01',
|
||||
'CNY',
|
||||
1,
|
||||
'2026-04-13',
|
||||
NULL,
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_info WHERE account_no = 'ZQ330101199104010101'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_result (
|
||||
account_no,
|
||||
is_self_account,
|
||||
monthly_avg_trans_count,
|
||||
monthly_avg_trans_amount,
|
||||
trans_freq_type,
|
||||
dr_max_single_amount,
|
||||
cr_max_single_amount,
|
||||
dr_max_daily_amount,
|
||||
cr_max_daily_amount,
|
||||
trans_risk_level,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'ZQ330101199104010101',
|
||||
0,
|
||||
6,
|
||||
152000.00,
|
||||
'LOW',
|
||||
68000.00,
|
||||
72000.00,
|
||||
98000.00,
|
||||
116000.00,
|
||||
'HIGH',
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_result WHERE account_no = 'ZQ330101199104010101'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_info (
|
||||
account_no,
|
||||
account_type,
|
||||
bank_scope,
|
||||
account_name,
|
||||
owner_type,
|
||||
owner_id,
|
||||
bank,
|
||||
bank_code,
|
||||
currency,
|
||||
status,
|
||||
effective_date,
|
||||
invalid_date,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'13700000035',
|
||||
'PAYMENT',
|
||||
'EXTERNAL',
|
||||
'模型异常中介',
|
||||
'INTERMEDIARY',
|
||||
'330101197901010055',
|
||||
'支付宝',
|
||||
'ALIPAY',
|
||||
'CNY',
|
||||
1,
|
||||
'2026-04-13',
|
||||
NULL,
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_info WHERE account_no = '13700000035'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_result (
|
||||
account_no,
|
||||
is_self_account,
|
||||
monthly_avg_trans_count,
|
||||
monthly_avg_trans_amount,
|
||||
trans_freq_type,
|
||||
dr_max_single_amount,
|
||||
cr_max_single_amount,
|
||||
dr_max_daily_amount,
|
||||
cr_max_daily_amount,
|
||||
trans_risk_level,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'13700000035',
|
||||
0,
|
||||
18,
|
||||
46800.00,
|
||||
'MEDIUM',
|
||||
9000.00,
|
||||
13800.00,
|
||||
18800.00,
|
||||
21600.00,
|
||||
'LOW',
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_result WHERE account_no = '13700000035'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_info (
|
||||
account_no,
|
||||
account_type,
|
||||
bank_scope,
|
||||
account_name,
|
||||
owner_type,
|
||||
owner_id,
|
||||
bank,
|
||||
bank_code,
|
||||
currency,
|
||||
status,
|
||||
effective_date,
|
||||
invalid_date,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'wx-ext-20260413-001',
|
||||
'OTHER',
|
||||
'EXTERNAL',
|
||||
'外部合作机构测试',
|
||||
'EXTERNAL',
|
||||
'91330100EXT20260413',
|
||||
'微信支付',
|
||||
'WXPAY',
|
||||
'CNY',
|
||||
1,
|
||||
'2026-04-13',
|
||||
NULL,
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_info WHERE account_no = 'wx-ext-20260413-001'
|
||||
);
|
||||
|
||||
INSERT INTO ccdi_account_result (
|
||||
account_no,
|
||||
is_self_account,
|
||||
monthly_avg_trans_count,
|
||||
monthly_avg_trans_amount,
|
||||
trans_freq_type,
|
||||
dr_max_single_amount,
|
||||
cr_max_single_amount,
|
||||
dr_max_daily_amount,
|
||||
cr_max_daily_amount,
|
||||
trans_risk_level,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
SELECT
|
||||
'wx-ext-20260413-001',
|
||||
0,
|
||||
9,
|
||||
9800.00,
|
||||
'LOW',
|
||||
3200.00,
|
||||
4100.00,
|
||||
5600.00,
|
||||
7000.00,
|
||||
'LOW',
|
||||
'system',
|
||||
'system'
|
||||
FROM dual
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM ccdi_account_result WHERE account_no = 'wx-ext-20260413-001'
|
||||
);
|
||||
@@ -0,0 +1,44 @@
|
||||
-- 员工招聘:招聘类型与候选人历史工作经历结构变更
|
||||
-- 说明:
|
||||
-- 1. 本脚本对应招聘功能正式表结构变更,需要进入代码仓库作为后续部署、测试和合并依据。
|
||||
-- 2. 当前联调数据库已于 2026-04-20 手工/脚本执行过等价结构变更:
|
||||
-- - ccdi_staff_recruitment 已存在 recruit_type 字段;
|
||||
-- - ccdi_staff_recruitment_work 子表已创建。
|
||||
-- 3. 后续环境执行前请先确认字段和表是否已存在;若已存在,不要重复执行 ALTER ADD COLUMN,避免重复字段报错。
|
||||
-- 4. 本脚本只负责结构与招聘类型基础回填,不包含演示/联调造数。
|
||||
|
||||
ALTER TABLE `ccdi_staff_recruitment`
|
||||
ADD COLUMN `recruit_type` VARCHAR(20) NULL COMMENT '招聘类型:SOCIAL-社招,CAMPUS-校招' AFTER `cand_grad`;
|
||||
|
||||
UPDATE `ccdi_staff_recruitment`
|
||||
SET `recruit_type` = CASE
|
||||
WHEN `recruit_name` LIKE '%校园%' THEN 'CAMPUS'
|
||||
ELSE 'SOCIAL'
|
||||
END
|
||||
WHERE `recruit_type` IS NULL
|
||||
OR `recruit_type` = '';
|
||||
|
||||
ALTER TABLE `ccdi_staff_recruitment`
|
||||
MODIFY COLUMN `recruit_type` VARCHAR(20) NOT NULL COMMENT '招聘类型:SOCIAL-社招,CAMPUS-校招';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ccdi_staff_recruitment_work`
|
||||
(
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`recruit_id` VARCHAR(32) NOT NULL COMMENT '关联招聘记录编号',
|
||||
`sort_order` INT NOT NULL DEFAULT 1 COMMENT '排序号,1 表示最近一段经历',
|
||||
`company_name` VARCHAR(200) NOT NULL COMMENT '工作单位',
|
||||
`department_name` VARCHAR(100) DEFAULT NULL COMMENT '所属部门',
|
||||
`position_name` VARCHAR(100) DEFAULT NULL COMMENT '岗位名称',
|
||||
`job_start_month` VARCHAR(7) NOT NULL COMMENT '入职年月,格式 YYYY-MM',
|
||||
`job_end_month` VARCHAR(7) DEFAULT NULL COMMENT '离职年月,格式 YYYY-MM',
|
||||
`departure_reason` VARCHAR(500) DEFAULT NULL COMMENT '离职原因',
|
||||
`work_content` VARCHAR(1000) DEFAULT NULL COMMENT '主要工作内容',
|
||||
`remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
|
||||
`created_by` VARCHAR(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`updated_by` VARCHAR(20) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_recruit_id` (`recruit_id`),
|
||||
KEY `idx_recruit_id_sort_order` (`recruit_id`, `sort_order`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招聘信息历史工作经历表';
|
||||
26
sql/migration/2026-04-21-create-ccdi-evidence.sql
Normal file
26
sql/migration/2026-04-21-create-ccdi-evidence.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- 项目证据表
|
||||
CREATE TABLE IF NOT EXISTS ccdi_evidence (
|
||||
evidence_id BIGINT NOT NULL AUTO_INCREMENT COMMENT '证据ID',
|
||||
project_id BIGINT NOT NULL COMMENT '项目ID',
|
||||
evidence_type VARCHAR(32) NOT NULL COMMENT '证据类型:FLOW/MODEL/ASSET',
|
||||
related_person_name VARCHAR(100) NOT NULL COMMENT '关联人员姓名',
|
||||
related_person_id VARCHAR(64) DEFAULT NULL COMMENT '关联人员标识,优先存身份证号或员工号',
|
||||
evidence_title VARCHAR(255) NOT NULL COMMENT '证据标题',
|
||||
evidence_summary VARCHAR(1000) NOT NULL COMMENT '证据摘要',
|
||||
source_type VARCHAR(64) NOT NULL COMMENT '来源类型:BANK_STATEMENT/MODEL_DETAIL/ASSET_DETAIL',
|
||||
source_record_id VARCHAR(128) DEFAULT NULL COMMENT '来源记录ID',
|
||||
source_page VARCHAR(100) DEFAULT NULL COMMENT '来源页面名称',
|
||||
snapshot_json LONGTEXT DEFAULT NULL COMMENT '证据快照JSON',
|
||||
confirm_reason VARCHAR(1000) NOT NULL COMMENT '确认理由/备注',
|
||||
confirm_by VARCHAR(64) DEFAULT NULL COMMENT '确认人',
|
||||
confirm_time DATETIME DEFAULT NULL COMMENT '确认时间',
|
||||
create_by VARCHAR(64) DEFAULT '' COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT NULL COMMENT '创建时间',
|
||||
update_by VARCHAR(64) DEFAULT '' COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (evidence_id),
|
||||
KEY idx_ccdi_evidence_project (project_id),
|
||||
KEY idx_ccdi_evidence_type (evidence_type),
|
||||
KEY idx_ccdi_evidence_person (related_person_id),
|
||||
KEY idx_ccdi_evidence_source (source_type, source_record_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目证据表';
|
||||
Reference in New Issue
Block a user