From cf877c780cb964b8b1d8eefec521c46d76130836 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 30 六月 2025 14:37:44 +0800
Subject: [PATCH] 更新超时信息相关接口和服务 - 修改 `Dt_OutTime.vue` 中的 `url` 字段。 - 更新 `AssemblyInformationalVersion` 属性值。 - 新增 `IStockInfoTimeoutRepository` 和 `IStockInfoTimeoutService` 接口。 - 实现 `StockInfoTimeoutRepository` 和 `StockInfoTimeoutService` 类。 - 在 `Dt_TaskService.cs` 中添加必要的 `using` 语句。 - 新增 `StockInfoTimeoutController` 控制器。
---
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/StockInfoTimeoutController.cs | 13 ++++
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoTimeoutService.cs | 88 +++++++++++++++++++++++++++++
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 1
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Stock/IStockInfoTimeoutService.cs | 5 +
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs | 2
CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue | 2
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs | 2
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Stock/IStockInfoTimeoutRepository.cs | 6 ++
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Stock/StockInfoTimeoutRepository.cs | 9 +++
9 files changed, 125 insertions(+), 3 deletions(-)
diff --git a/CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue b/CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
index 4473a3f..7cf35e1 100644
--- a/CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
+++ b/CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
@@ -21,7 +21,7 @@
footer: "Foots",
cnName: '瓒呮椂淇℃伅',
name: 'stock/Dt_BillGroupStock',
- url: "/Task/GetTimeout",
+ url:"/StockInfoTimeout/",
sortName: "createDate"
});
const editFormFields = ref({
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
index bb5f60b..41c5d5e 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12b786bdece4bde3716279ff386b58d776090bdb")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+37b28e4f6b8c865c1df06543f124fd1c1ba244d9")]
[assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_IStoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Stock/IStockInfoTimeoutRepository.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Stock/IStockInfoTimeoutRepository.cs
new file mode 100644
index 0000000..ffa1ef1
--- /dev/null
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Stock/IStockInfoTimeoutRepository.cs
@@ -0,0 +1,6 @@
+锘縩amespace WIDESEA_IStorageBasicRepository
+{
+ public interface IStockInfoTimeoutRepository : IRepository<DtStockInfo>
+ {
+ }
+}
\ No newline at end of file
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Stock/IStockInfoTimeoutService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Stock/IStockInfoTimeoutService.cs
new file mode 100644
index 0000000..e3d5578
--- /dev/null
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Stock/IStockInfoTimeoutService.cs
@@ -0,0 +1,5 @@
+锘縩amespace WIDESEA_IStorageBasicService;
+
+public interface IStockInfoTimeoutService : IService<DtStockInfo>
+{
+}
\ No newline at end of file
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
index f0d3fea..8bba8fa 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12b786bdece4bde3716279ff386b58d776090bdb")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+37b28e4f6b8c865c1df06543f124fd1c1ba244d9")]
[assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_StoragIntegrationRepository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Stock/StockInfoTimeoutRepository.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Stock/StockInfoTimeoutRepository.cs
new file mode 100644
index 0000000..667d5cd
--- /dev/null
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Stock/StockInfoTimeoutRepository.cs
@@ -0,0 +1,9 @@
+锘縩amespace WIDESEA_StorageBasicRepository
+{
+ public class StockInfoTimeoutRepository : RepositoryBase<DtStockInfo>, IStockInfoTimeoutRepository
+ {
+ public StockInfoTimeoutRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoTimeoutService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoTimeoutService.cs
new file mode 100644
index 0000000..5007d2d
--- /dev/null
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoTimeoutService.cs
@@ -0,0 +1,88 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Cache;
+
+namespace WIDESEA_StorageBasicServices.Stock
+{
+ public class StockInfoTimeoutService : ServiceBase<DtStockInfo, IStockInfoRepository>, IStockInfoTimeoutService
+ {
+
+ private readonly ISimpleCacheService _simpleCacheService;
+ private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
+ public StockInfoTimeoutService(IStockInfoRepository BaseDal, ISimpleCacheService simpleCacheService, ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository) : base(BaseDal)
+ {
+ _simpleCacheService = simpleCacheService;
+ _locationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
+ }
+
+ public override PageGridData<DtStockInfo> GetPageData(PageDataOptions options)
+ {
+ string wheres = ValidatePageOptions(options);
+ //鑾峰彇鎺掑簭瀛楁
+ Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+ List<OrderByModel> orderByModels = new List<OrderByModel>();
+ foreach (var item in orderbyDic)
+ {
+ OrderByModel orderByModel = new()
+ {
+ FieldName = item.Key,
+ OrderByType = item.Value
+ };
+ orderByModels.Add(orderByModel);
+ }
+
+
+ int totalCount = 0;
+ List<SearchParameters> searchParametersList = new List<SearchParameters>();
+ if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+ searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ options.Filter = searchParametersList;
+ }
+ catch { }
+ }
+
+ Expression<Func<DtStockInfo, bool>> locationStatus = null;
+ Expression<Func<DtStockInfo, bool>> roadwayNo = null;
+ Expression<Func<DtStockInfo, bool>> materielCode = null;
+ foreach (var item in searchParametersList)
+ {
+ if (item.Name.Contains("locationStatus"))
+ {
+ locationStatus = x => x.LocationInfo.LocationStatus == Convert.ToInt32(item.Value);
+ }
+ else if (item.Name.Contains("roadwayNo"))
+ {
+ roadwayNo = x => x.LocationInfo.RoadwayNo.Contains(item.Value);
+ }
+ else if (item.Name.Contains("materielCode"))
+ {
+ materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode.Contains(item.Value));
+ }
+ }
+
+ var now = DateTime.Now;
+ // 浣跨敤Subtract鏂规硶
+ var threeHoursAgo = now.Subtract(TimeSpan.FromHours(3));
+
+ var data = BaseDal.Db.Queryable<DtStockInfo>()
+ .Includes(x => x.StockInfoDetails)
+ .Includes(x => x.LocationInfo)
+ .Where(x => x.OutboundTime < threeHoursAgo)
+ .WhereIF(!wheres.IsNullOrEmpty(), wheres)
+ .WhereIF(locationStatus != null, locationStatus)
+ .WhereIF(roadwayNo != null, roadwayNo)
+ .WhereIF(materielCode != null, materielCode)
+ .OrderBy(orderByModels)
+ .ToPageList(options.Page, options.Rows, ref totalCount);
+ return new PageGridData<DtStockInfo>(totalCount, data);
+ }
+ }
+}
\ No newline at end of file
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 6418cb3..7095436 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -2,6 +2,7 @@
using Masuit.Tools;
using SixLabors.Fonts.Tables.AdvancedTypographic;
using SqlSugar;
+using System.Linq.Expressions;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Cache;
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/StockInfoTimeoutController.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/StockInfoTimeoutController.cs
new file mode 100644
index 0000000..37193de
--- /dev/null
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/StockInfoTimeoutController.cs
@@ -0,0 +1,13 @@
+锘縰sing WIDESEA_IStorageBasicService;
+
+namespace WIDESEA_WMSServer.Controllers;
+
+[Route("api/StockInfoTimeout")]
+[ApiController]
+public class StockInfoTimeoutController : ApiBaseController<IStockInfoTimeoutService, DtStockInfo>
+{
+ public StockInfoTimeoutController(IStockInfoTimeoutService service) : base(service)
+ {
+ }
+
+}
\ No newline at end of file
--
Gitblit v1.9.3