From cb212ea9a9b56540a7fec33f4ec198f59a99020a Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 06 9月 2024 13:54:39 +0800
Subject: [PATCH] 测量岛数据展示

---
 iWara.SCADA.Code/iWare.Wms.Application/Service/AccessInterfaceLog/AccessInterfaceLogService.cs |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/iWara.SCADA.Code/iWare.Wms.Application/Service/AccessInterfaceLog/AccessInterfaceLogService.cs b/iWara.SCADA.Code/iWare.Wms.Application/Service/AccessInterfaceLog/AccessInterfaceLogService.cs
index 51b59ee..cec4f97 100644
--- a/iWara.SCADA.Code/iWare.Wms.Application/Service/AccessInterfaceLog/AccessInterfaceLogService.cs
+++ b/iWara.SCADA.Code/iWare.Wms.Application/Service/AccessInterfaceLog/AccessInterfaceLogService.cs
@@ -2,6 +2,7 @@
 using Furion.DependencyInjection;
 using Furion.DynamicApiController;
 using iWare.Wms.Core;
+using Mapster;
 using Microsoft.AspNetCore.Mvc;
 using Newtonsoft.Json.Linq;
 using StackExchange.Redis;
@@ -20,8 +21,8 @@
     /// <summary>
     /// 澶栭儴璁块棶鎺ュ彛鏃ュ織
     /// </summary>
-    //[ApiDescriptionSettings("澶栭儴璁块棶鎺ュ彛鏃ュ織", Name = "AccessInterfaceLog", Order = 100)]
-    //[Route("api/[Controller]")]
+    [ApiDescriptionSettings("澶栭儴璁块棶鎺ュ彛鏃ュ織", Name = "AccessInterfaceLog", Order = 100)]
+    [Route("api/[Controller]")]
     public class AccessInterfaceLogService : IAccessInterfaceLogService, IDynamicApiController, ITransient
     {
         private readonly IRepository<AccessInterfaceLog, MasterDbContextLocator> _accessInterfaceLogRep;
@@ -35,6 +36,28 @@
             _accessInterfaceLogRep = accessInterfaceLogRep;
         }
 
+
+
+        [HttpGet("page")]
+        public async Task<PageResult<AddAccessInterfaceLogOutnput>> Page([FromQuery] AccessInterfaceLogInputSearch input)
+        {
+            var workPieceOutbounds = await _accessInterfaceLogRep.DetachedEntities
+                                     .Where(!string.IsNullOrEmpty(input.WorkPieceID), u => u.WorkPieceID.Contains(input.WorkPieceID))
+                                     .Where(!string.IsNullOrEmpty(input.WorkingProcedureCurrent), u => u.WorkingProcedureCurrent.Contains(input.WorkingProcedureCurrent))
+                                     .Where(!string.IsNullOrEmpty(input.createdUserName), u => u.CreatedUserName.Contains(input.createdUserName))
+                                     .Where(input.QualityState != null, u => u.QualityState == input.QualityState)
+                                     .Where(!string.IsNullOrEmpty(input.StartTimeBeginTime.ToString()), u => u.CreatedTime >= input.StartTimeBeginTime)
+                                     .Where(!string.IsNullOrEmpty(input.StartTimeEndTime.ToString()), u => u.CreatedTime <= input.StartTimeEndTime)
+                                     //.OrderBy(PageInputOrder.OrderBuilder<AccessInterfaceLogInputSearch>(input))
+                                     .OrderByDescending(x => x.Id)
+                                     .ProjectToType<AddAccessInterfaceLogOutnput>()
+                                     .ToADPagedListAsync(input.PageNo, input.PageSize);
+            return workPieceOutbounds;
+        }
+
+
+
+
         /// <summary>
         /// 娣诲姞鏃ュ織
         /// </summary>
@@ -47,6 +70,7 @@
 
             log.WorkPieceID = input.WorkPieceID;
             log.WorkingProcedureCurrent = input.WorkingProcedureCurrent;
+            log.QualityState = input.QualityState;
 
             log.Id = input.Id;
             log.ParaJSON = input.JsonString;

--
Gitblit v1.9.3