AI审核改为 列表页+详情页 结构,列表带审核摘要

- 表 oa_ai_review 增加 summary 列(审核结论摘要,纯文本,列表展示用),
  已应用到生产库;分析时由结果 Markdown 提炼前160字纯文本写入
- 列表查询清空大字段 result_md 减小响应体,详情接口仍返回完整结果
- 前端拆分:
  · index.vue 重写为列表页:搜索(类型/关键字)+表格(类型/文件名/岗位/结论标签/
    审核摘要/时间)+分页,「新增审核」改为弹窗上传(类型/岗位/文件),
    审核完成后跳转详情;行可删除
  · 新增 detail.vue 详情页:元信息(文件名+下载原件/岗位/模型/时间/审核人)
    + 结论标签 + 完整 Markdown 结果,返回列表按钮
  · router 增加 /hint/aiReview/detail/:id 隐藏路由
- 原件已通过 OSS 留存,详情页可下载,下次可直接查看

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 10:04:16 +08:00
parent faca2f85eb
commit d46754ede8
7 changed files with 293 additions and 208 deletions

View File

@@ -41,6 +41,9 @@ public class OaAiReview extends BaseEntity {
/** 合同总体风险评级:高/中/低(简历为空) */
private String riskLevel;
/** AI 审核结论摘要(列表展示,纯文本) */
private String summary;
/** AI 审核结果Markdown */
private String resultMd;

View File

@@ -22,6 +22,7 @@ public class OaAiReviewVo implements Serializable {
private String position;
private Integer matchScore;
private String riskLevel;
private String summary;
private String resultMd;
private String model;
private Integer tokens;

View File

@@ -121,6 +121,7 @@ public class OaAiReviewServiceImpl implements IOaAiReviewService {
entity.setFileUrl(fileUrl);
entity.setPosition(position);
entity.setResultMd(result);
entity.setSummary(buildSummary(result));
entity.setModel(miMoProps.getModel());
if ("resume".equals(reviewType)) {
entity.setMatchScore(parseInt(SCORE_PATTERN, result, 100));
@@ -137,6 +138,16 @@ public class OaAiReviewServiceImpl implements IOaAiReviewService {
return text.length() > MAX_TEXT_LEN ? text.substring(0, MAX_TEXT_LEN) : text;
}
/** 从 Markdown 结果里提炼一段纯文本摘要,供列表展示 */
private String buildSummary(String md) {
if (StringUtils.isBlank(md)) return null;
String text = md.replaceAll("(?m)^#+\\s*", "") // 标题符号
.replaceAll("[*`>#\\-]", " ") // markdown 符号
.replaceAll("\\s+", " ") // 折叠空白
.trim();
return text.length() > 160 ? text.substring(0, 160) : text;
}
private Integer parseInt(Pattern p, String text, int max) {
Matcher m = p.matcher(text == null ? "" : text);
if (m.find()) {
@@ -194,6 +205,10 @@ public class OaAiReviewServiceImpl implements IOaAiReviewService {
}
lqw.orderByDesc(OaAiReview::getCreateTime);
Page<OaAiReviewVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
// 列表只需 summary清空大字段 resultMd 减小响应体
if (page.getRecords() != null) {
page.getRecords().forEach(v -> v.setResultMd(null));
}
return TableDataInfo.build(page);
}