From 482b2982ba27b18e6391c3862ec239c89a801a46 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 21 五月 2026 13:09:05 +0800
Subject: [PATCH] feat(home): 添加生产看板功能并优化订单查询性能

---
 src/main/java/com/ruoyi/ai/controller/ManufacturingAiController.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/ruoyi/ai/controller/ManufacturingAiController.java b/src/main/java/com/ruoyi/ai/controller/ManufacturingAiController.java
index 8e2948e..d36a321 100644
--- a/src/main/java/com/ruoyi/ai/controller/ManufacturingAiController.java
+++ b/src/main/java/com/ruoyi/ai/controller/ManufacturingAiController.java
@@ -24,12 +24,18 @@
 import org.springframework.web.bind.annotation.RestController;
 import reactor.core.publisher.Flux;
 
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 import java.util.List;
 
 @Tag(name = "鍒堕�犳櫤鑳藉姪鎵�")
 @RestController
 @RequestMapping("/manufacturing-ai")
 public class ManufacturingAiController extends BaseController {
+
+    private static final DateTimeFormatter CURRENT_DATE_FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+    private static final ZoneId CHINA_ZONE_ID = ZoneId.of("Asia/Shanghai");
 
     private final ManufacturingAgent manufacturingAgent;
     private final ManufacturingIntentExecutor manufacturingIntentExecutor;
@@ -76,7 +82,7 @@
             return Flux.just(directResponse);
         }
 
-        return manufacturingAgent.chat(memoryId, userMessage)
+        return manufacturingAgent.chat(memoryId, userMessage, currentDateForPrompt())
                 .doOnComplete(() -> aiChatSessionService.refreshSessionStats(memoryId, loginUser))
                 .doOnError(ex -> aiChatSessionService.refreshSessionStats(memoryId, loginUser));
     }
@@ -100,4 +106,8 @@
         aiChatSessionService.deleteCurrentUserSession(memoryId, SecurityUtils.getLoginUser());
         return R.ok();
     }
+
+    private String currentDateForPrompt() {
+        return LocalDate.now(CHINA_ZONE_ID).format(CURRENT_DATE_FMT);
+    }
 }

--
Gitblit v1.9.3