From dbde3162fd361dcba4316b58754ccecf39a81a9f Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 09 六月 2025 08:52:18 +0800
Subject: [PATCH] 修改问题

---
 Admin.NET/WCS.Application/Service/WcsTaskMonitor/WcsTaskMonitorService.cs |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/Admin.NET/WCS.Application/Service/WcsTaskMonitor/WcsTaskMonitorService.cs b/Admin.NET/WCS.Application/Service/WcsTaskMonitor/WcsTaskMonitorService.cs
index 34d7595..a536c41 100644
--- a/Admin.NET/WCS.Application/Service/WcsTaskMonitor/WcsTaskMonitorService.cs
+++ b/Admin.NET/WCS.Application/Service/WcsTaskMonitor/WcsTaskMonitorService.cs
@@ -1,11 +1,6 @@
-锘�// Admin.NET 椤圭洰鐨勭増鏉冦�佸晢鏍囥�佷笓鍒╁拰鍏朵粬鐩稿叧鏉冨埄鍧囧彈鐩稿簲娉曞緥娉曡鐨勪繚鎶ゃ�備娇鐢ㄦ湰椤圭洰搴旈伒瀹堢浉鍏虫硶寰嬫硶瑙勫拰璁稿彲璇佺殑瑕佹眰銆�
-//
-// 鏈」鐩富瑕侀伒寰� MIT 璁稿彲璇佸拰 Apache 璁稿彲璇侊紙鐗堟湰 2.0锛夎繘琛屽垎鍙戝拰浣跨敤銆傝鍙瘉浣嶄簬婧愪唬鐮佹爲鏍圭洰褰曚腑鐨� LICENSE-MIT 鍜� LICENSE-APACHE 鏂囦欢銆�
-//
-// 涓嶅緱鍒╃敤鏈」鐩粠浜嬪嵄瀹冲浗瀹跺畨鍏ㄣ�佹壈涔辩ぞ浼氱З搴忋�佷镜鐘粬浜哄悎娉曟潈鐩婄瓑娉曞緥娉曡绂佹鐨勬椿鍔紒浠讳綍鍩轰簬鏈」鐩簩娆″紑鍙戣�屼骇鐢熺殑涓�鍒囨硶寰嬬籂绾峰拰璐d换锛屾垜浠笉鎵挎媴浠讳綍璐d换锛�
+锘�
+using WCS.Application.Service.WcsTaskMonitor.Dto;
 
-using Admin.NET.Core.Service;
-using Microsoft.AspNetCore.Http;
 namespace WCS.Application;
 
 /// <summary>
@@ -28,7 +23,7 @@
     [HttpPost]
     [ApiDescriptionSettings(Name = "Page")]
     [DisplayName("鍒嗛〉鏌ヨ浠诲姟鏄庣粏鐩戞帶琛�")]
-    public async Task<SqlSugarPagedList<WcsTaskMonitorOutput>> Page(PageWcsTaskMonitorInput input)
+    public async Task<SqlSugarPagedList<WcsTaskMonitorOutput2>> Page(PageWcsTaskMonitorInput input)
     {
 		input.SearchKey = input.SearchKey?.Trim();
         var query = _wcsTaskMonitorRep.AsQueryable()
@@ -36,8 +31,17 @@
                 u.TaskNo.Contains(input.SearchKey)
             )
             .WhereIF(!string.IsNullOrWhiteSpace(input.TaskNo), u => u.TaskNo.Contains(input.TaskNo.Trim()))
-            .Select<WcsTaskMonitorOutput>();
-		return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
+            .LeftJoin<WcsDevice>((u, plcid) => u.PlcId == plcid.Id)
+            .Select((u, plcid) => new WcsTaskMonitorOutput2
+            {
+                Id = u.Id,
+                TaskNo = u.TaskNo,
+                PlcName = plcid.StationNum + "宸ヤ綅锛�" + plcid.Text,
+                InteractiveMsg = u.InteractiveMsg,
+                CreateTime = u.CreateTime
+            })
+            .OrderByDescending(u=>u.CreateTime);
+        return await query.OrderBuilder(input,"","").ToPagedListAsync(input.Page, input.PageSize);
     }
 
     /// <summary>

--
Gitblit v1.8.0