From 581f48034da5f8a173d4ae1bfb0ce57d5f20e0f9 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期一, 09 九月 2024 16:52:22 +0800
Subject: [PATCH] 修改问题
---
Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs
index 258f4bf..19ab42f 100644
--- a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs
+++ b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs
@@ -1,6 +1,8 @@
锘�
using Admin.NET.Core.Service;
using Elastic.Clients.Elasticsearch;
+using WCS.Application.Entity;
+using WCS.Application.Service.WcsDevice.Dto;
namespace WCS.Application;
@@ -286,7 +288,7 @@
{
return await _wcsDeviceRep.Context.Queryable<WcsPlc>()
.Where(w => w.Type == PLCTypeEnum.RobotPalletizer || w.Type == PLCTypeEnum.StackingRobot)
- .OrderBy(o => o.Type)
+ .OrderByDescending(o => o.Type)
.Select(u => new
{
id = u.Id,
@@ -302,11 +304,24 @@
[HttpGet]
[ApiDescriptionSettings(Name = "WcsPackStationPlcList")]
[DisplayName("鑾峰彇璁惧瀵瑰簲宸ヤ綅鍒楄〃")]
- public async Task<List<WcsDevice>> WcsPackStationPlcList([FromQuery]WcsDeviceBaseInput entry)
- {
+ public async Task<List<WcsDeviceTaskOrderDto>> WcsPackStationPlcList([FromQuery]WcsDeviceBaseInput entry)
+ {
return await _wcsDeviceRep.Context.Queryable<WcsDevice>()
- .Where(w => w.PlcId == entry.PlcId)
- .OrderBy(o => o.CreateTime)
+ .LeftJoin<WcsCheckTask>((device, task) => device.StationNum == task.Port)
+ .Where((device, task) => device.PlcId == entry.PlcId)
+ .OrderBy((device, task) => device.CreateTime)
+ .Select((device, task) => new WcsDeviceTaskOrderDto()
+ {
+ Id=device.Id,
+ Text=device.Text,
+ OrderNo=task.OrderNo,
+ LotNo=task.LotNo,
+ SkuNo=task.SkuNo,
+ SkuName=task.SkuName,
+ LineNO=task.LineNO,
+ Status =task.Status,
+ Qty=task.Qty
+ })
.ToListAsync();
}
#endregion
--
Gitblit v1.8.0