guoziyun 9 miesięcy temu
rodzic
commit
e3c9f3c3ce

+ 6 - 0
oms/dist/src/controllers/messageRecordController.js

@@ -185,6 +185,7 @@ class MessageRecordController {
          */
         this.getOverallStatistics = async (req, res) => {
             try {
+                console.log("getOverallStatistics");
                 const stats = await this.messageRecordService.getOverallStatistics();
                 return res.status(200).json({ success: true, data: stats });
             }
@@ -200,6 +201,7 @@ class MessageRecordController {
          */
         this.getStatisticsByActivity = async (req, res) => {
             try {
+                console.log("getStatisticsByActivity");
                 const stats = await this.messageRecordService.getStatisticsByActivity();
                 return res.status(200).json({ success: true, data: stats });
             }
@@ -215,6 +217,7 @@ class MessageRecordController {
          */
         this.getStatisticsByStrategy = async (req, res) => {
             try {
+                console.log("getStatisticsByStrategy");
                 const stats = await this.messageRecordService.getStatisticsByStrategy();
                 return res.status(200).json({ success: true, data: stats });
             }
@@ -230,6 +233,7 @@ class MessageRecordController {
          */
         this.getStatisticsByTemplate = async (req, res) => {
             try {
+                console.log("getStatisticsByTemplate");
                 const stats = await this.messageRecordService.getStatisticsByTemplate();
                 return res.status(200).json({ success: true, data: stats });
             }
@@ -245,6 +249,7 @@ class MessageRecordController {
          */
         this.getDailySentTrends = async (req, res) => {
             try {
+                console.log("getDailySentTrends");
                 const stats = await this.messageRecordService.getDailySentTrends();
                 return res.status(200).json({ success: true, data: stats });
             }
@@ -260,6 +265,7 @@ class MessageRecordController {
          */
         this.getAverageDeliveryTime = async (req, res) => {
             try {
+                console.log("getAverageDeliveryTime");
                 const stats = await this.messageRecordService.getAverageDeliveryTime();
                 return res.status(200).json({ success: true, data: stats });
             }

+ 1 - 1
oms/public/app/index.html

@@ -9,5 +9,5 @@
   <style>body,html{width:100%;height:100%}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}html{--antd-wave-shadow-color:#1890ff;--scroll-bar:0}</style><link rel="stylesheet" href="styles-LXBSU6DF.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-LXBSU6DF.css"></noscript></head>
   <body>
     <app-root></app-root>
-  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-PDDYGVJ6.js" type="module"></script></body>
+  <script src="polyfills-B6TNHZQ6.js" type="module"></script><script src="main-TFE7P575.js" type="module"></script></body>
 </html>

Plik diff jest za duży
+ 0 - 0
oms/public/app/main-TFE7P575.js


+ 6 - 0
oms/src/controllers/messageRecordController.ts

@@ -202,6 +202,7 @@ class MessageRecordController {
    */
   public getOverallStatistics = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getOverallStatistics");
       const stats = await this.messageRecordService.getOverallStatistics();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {
@@ -217,6 +218,7 @@ class MessageRecordController {
    */
   public getStatisticsByActivity = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getStatisticsByActivity");
       const stats = await this.messageRecordService.getStatisticsByActivity();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {
@@ -232,6 +234,7 @@ class MessageRecordController {
    */
   public getStatisticsByStrategy = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getStatisticsByStrategy");
       const stats = await this.messageRecordService.getStatisticsByStrategy();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {
@@ -247,6 +250,7 @@ class MessageRecordController {
    */
   public getStatisticsByTemplate = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getStatisticsByTemplate");
       const stats = await this.messageRecordService.getStatisticsByTemplate();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {
@@ -262,6 +266,7 @@ class MessageRecordController {
    */
   public getDailySentTrends = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getDailySentTrends");
       const stats = await this.messageRecordService.getDailySentTrends();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {
@@ -277,6 +282,7 @@ class MessageRecordController {
    */
   public getAverageDeliveryTime = async (req: Request, res: Response): Promise<Response> => {
     try {
+      console.log("getAverageDeliveryTime");
       const stats = await this.messageRecordService.getAverageDeliveryTime();
       return res.status(200).json({ success: true, data: stats });
     } catch (error: any) {

+ 11 - 11
omsapp/src/app/pages/message-dashboard.component.ts

@@ -256,16 +256,16 @@ export class MessageDashboardComponent implements OnInit {
             return of([]);
           })
         ),
-      avgTime: this.http
-        .get('/api/message-records/statistics/avg-delivery-time')
-        .pipe(
-          map((res: any) => res?.data || null),
-          catchError((err) => {
-            console.error('Failed to load average delivery time:', err);
-            this.message.error('加载平均送达时间失败');
-            return of(null);
-          })
-        ),
+      // avgTime: this.http
+      //   .get('/api/message-records/statistics/avg-delivery-time')
+      //   .pipe(
+      //     map((res: any) => res?.data || null),
+      //     catchError((err) => {
+      //       console.error('Failed to load average delivery time:', err);
+      //       this.message.error('加载平均送达时间失败');
+      //       return of(null);
+      //     })
+      //   ),
     })
       .pipe(
         finalize(() => {
@@ -280,7 +280,7 @@ export class MessageDashboardComponent implements OnInit {
         this.strategyStats = results.strategies;
         this.templateStats = results.templates;
         this.dailyTrends = results.dailyTrends;
-        this.avgDeliveryTime = results.avgTime;
+        // this.avgDeliveryTime = results.avgTime;
 
         // Update charts based on the latest data
         this.updateChartData();

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików