|
@@ -1592,6 +1592,14 @@ public class HealthReportController {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
Map<String, Object> result = healthReportService.auditConfirm(draftId, subjectId, auditorId);
|
|
Map<String, Object> result = healthReportService.auditConfirm(draftId, subjectId, auditorId);
|
|
|
|
|
+ Long confirmedSubjectId = ParamUtils.getLong(result.get("subjectId"));
|
|
|
|
|
+ if (confirmedSubjectId != null) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ foodRecommendService.recalculateForUser(confirmedSubjectId);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("审核确认后刷新食材推荐失败: {}", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return Result.success(result);
|
|
return Result.success(result);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("审核确认失败", e);
|
|
log.error("审核确认失败", e);
|
|
@@ -2214,6 +2222,16 @@ public class HealthReportController {
|
|
|
Map<String, Object> result = healthReportService.auditConfirm(draftId, subjectId, userId);
|
|
Map<String, Object> result = healthReportService.auditConfirm(draftId, subjectId, userId);
|
|
|
Long reportId = (Long) result.get("reportId");
|
|
Long reportId = (Long) result.get("reportId");
|
|
|
|
|
|
|
|
|
|
+ // 维护"当前食材"推荐(有则更新,无则添加)
|
|
|
|
|
+ Long confirmedSubjectId = ParamUtils.getLong(result.get("subjectId"));
|
|
|
|
|
+ if (confirmedSubjectId != null) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ foodRecommendService.recalculateForUser(confirmedSubjectId);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.warn("代确认后刷新食材推荐失败: {}", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 设置代上传信息
|
|
// 设置代上传信息
|
|
|
if (reportId != null) {
|
|
if (reportId != null) {
|
|
|
healthReportService.setProxyUploader(reportId, userId);
|
|
healthReportService.setProxyUploader(reportId, userId);
|