|
@@ -1745,6 +1745,21 @@ public class HealthReportService {
|
|
|
if (scoreSource.get("shannonIndex") != null) {
|
|
if (scoreSource.get("shannonIndex") != null) {
|
|
|
oldReport.setShannonIndex(scoreSource.get("shannonIndex").toString());
|
|
oldReport.setShannonIndex(scoreSource.get("shannonIndex").toString());
|
|
|
}
|
|
}
|
|
|
|
|
+ // 用户可手动修正报告日期(AI 解析结果不准确时)
|
|
|
|
|
+ Object reportDateObj = scoreSource.get("reportDate");
|
|
|
|
|
+ if (reportDateObj != null && !String.valueOf(reportDateObj).trim().isEmpty()) {
|
|
|
|
|
+ String reportDateStr = String.valueOf(reportDateObj).trim();
|
|
|
|
|
+ try {
|
|
|
|
|
+ java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
+ java.util.Date parsedDate = sdf.parse(reportDateStr);
|
|
|
|
|
+ if (parsedDate != null) {
|
|
|
|
|
+ oldReport.setReportDate(new java.sql.Date(parsedDate.getTime()));
|
|
|
|
|
+ log.info("报告日期已更新: reportId={}, reportDate={}", reportId, reportDateStr);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("reportDate 格式解析失败 reportId={}, value={}: {}", reportId, reportDateStr, e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
oldReport.setUpdatedAt(new Date());
|
|
oldReport.setUpdatedAt(new Date());
|
|
|
healthReportMapper.updateById(oldReport);
|
|
healthReportMapper.updateById(oldReport);
|
|
|
|
|
|